- Joined
- Oct 15, 2010
- Messages
- 71
why i can't load vjass maps into my warcraft 3, enen when saving it with jass newgen pack?
There's an option in TESH (the vjass trigger editor in Newgen) that saves the scroll position. If it's enabled (by default), every time you scroll in the trigger editor your code is changed (in the background) and you must save it again.
Unless you disable it, do not scroll through your code after saving your map.
If that's not the problem, are you getting any compile errors?
Edited the post, the bug is not a general bug but related to the 'test map' button.
i had compile errors but if there is no compile errors it will still not work
I have the latest patch and the latest jass helper, still it wont work
I did not edit the code
//this is the return bug, it causes error
private function h2i takes handle h returns integer
return h
return 0
endfunction
GetStoredInteger, FlushStoredMission, HaveStoredInteger and StoreInteger
GetCache()
to get the game cache, but GetCache returns a hashtable not a game cache, so another error.GetRecycledUnit()
GetRecycleDummyUnit()
RecycleUnit(GetSoldUnit())
ReplaceDummy
AddConversion
does not exist in your map...how can i fix this? cause i'm not good a vjass.
where can i find the librarys? i cant search them
function Damage takes integer level returns real // Ravage Damage
//
local real Base_Damage = 150.0 // This function defines how much damage ravage will do.
local real Damage_Per_Level = 100.0 // The Base_Damage variable is a constant damage amount
// that stays the same regardless of the level.
return Base_Damage+Damage_Per_Level*level // The Damage_Per_Level is just how much more damage will
endfunction // be dealt each level.
// By default its set to do 250/350/450 damage per level.
//
//
//
function Speed takes nothing returns real // Ravage Speed
//
local real speed = 1000.0 // This is how fast the spikes spread out from the hero
// By Default its set to 1000 ms.
return speed*0.025 //
endfunction //
function AoE takes integer level returns real // Ravage Area of Effect
//
local real Base_Area = 375.0 // Like the damage, this part of the skill can change per
local real Area_Per_Level = 150.0 // level.
// By default its set to have an AoE radius of 525/675/825.
return Base_Area+Area_Per_Level*level //
endfunction //
//
function Ability_ID takes nothing returns integer// Base Ability Code
//
local integer ID = 'A000' // This is the ability code of the base ability that will
// start the trigger. In this map the base is 'A000' but in
return ID // your map it might be very different. To get the ability
endfunction // code of a skill open up the object editor, go to the
// abilities tab, and press Control+D at the same time. This
// will then show the ability codes of the all the abilities
// in your game. Simply replace the current code with the code
// of the base skill in your game.
//
//
//
function Dummy_ID takes nothing returns integer // Dummy Ability Code
//
local integer ID = 'h000' // To stun the units a dummy skill is need to provide this
// effect. Like the base skill, you need to enter the correct
return ID // ability code for the dummy ability as well. When making the
endfunction // dummy skill, just copy and paste the dummy skill in this map
// since it has all the correct values that you need. Then just
// change the ability code.
//
//
//
function Fake_ID takes nothing returns integer // Dummy Unit Code
//
local integer ID = 'A001' // This is the Unit Code of the dummy unit that will cast the
// dummy ability that will stun any targeted units. To get the
return ID // Unit Code of a unit, go to the unit tab in the object editor
endfunction // and press Control+D as the same time. Then go to your dummy
// and copy its Unit Code. Then just enter in the correct code
// here.
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Flying_Duration takes nothing returns nothing
local unit target = null
local boolean active = false
local integer loopA = 1
local integer info = GetHandleId(udg_time[2])
local integer count = LoadInteger(udg_table,0,info)
local integer z
loop
exitwhen loopA > count
if LoadInteger(udg_table,loopA,info)==0then
set active = true
set target = LoadUnitHandle(udg_table,info,loopA-1)
set z = LoadInteger(udg_table,info,loopA)
if 21>z then
call SetUnitFlyHeight(target,275-(z-10)*(z-10),0)
call SaveInteger(udg_table,info,loopA,z+1)
else
call SetUnitFlyHeight(target,GetUnitDefaultFlyHeight(target),0)
call SaveInteger(udg_table,loopA,info,1)
call PauseUnit(target,false)
endif
set target = null
endif
set loopA = loopA + 2
endloop
if active then
call ResumeTimer(udg_time[2])
else
call PauseTimer(udg_time[2])
set loopA = 1
loop
exitwhen loopA > count
call SaveInteger(udg_table,loopA,info,0)
set loopA = loopA + 2
endloop
call FlushChildHashtable(udg_table,info)
call SaveInteger(udg_table,0,info,0)
endif
endfunction
function Ravage_Targets takes nothing returns nothing
local unit dummy = null
local unit target = GetFilterUnit()
local unit caster = LoadUnitHandle(udg_table,99999,1)
local group targets = LoadGroupHandle(udg_table,99999,2)
local integer info
local integer count
if GetWidgetLife(target)>0.405and IsUnitEnemy(caster,GetOwningPlayer(target))and IsUnitInGroup(target,targets)==false then
set info = GetHandleId(udg_time[2])
set count = LoadInteger(udg_table,0,info)
set dummy = CreateUnit(GetOwningPlayer(target),Dummy_ID(),0,0,0)
call UnitRemoveAbility(dummy,'Amov')
call UnitApplyTimedLife(dummy,'BTLF',1)
call UnitAddAbility(dummy,Fake_ID())
call SetUnitAbilityLevel(dummy,Fake_ID(),GetUnitAbilityLevel(caster,Ability_ID()))
call IssueTargetOrder(dummy,"thunderbolt",target)
call PauseUnit(target,true)
call ResumeTimer(udg_time[2])
call UnitAddAbility(target,'Arav')
call UnitRemoveAbility(target,'Arav')
call SaveUnitHandle(udg_table,info,count,target)
call SaveInteger(udg_table,info,count+1,0)
call SaveInteger(udg_table,0,info,count+2)
call UnitDamageTarget(caster,target,Damage(GetUnitAbilityLevel(caster,Ability_ID())),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",GetWidgetX(target),GetWidgetY(target)))
call GroupAddUnit(targets,target)
set dummy = null
endif
set targets = null
set target = null
set caster = null
endfunction
function Ravage_Duration takes nothing returns nothing
local boolean active = false
local integer show
local integer loopA = 1
local integer info = GetHandleId(udg_time[1])
local integer count = LoadInteger(udg_table,0,info)
local real angle
local real x1
local real y1
local real x
local real y
loop
exitwhen loopA > count
if LoadInteger(udg_table,loopA,info)==0then
set active = true
set x = LoadReal(udg_table,info,loopA+2)
set y = LoadReal(udg_table,info,loopA+3)
set x1 = LoadReal(udg_table,info,loopA+4)
set y1 = LoadReal(udg_table,info,loopA+5)
if SquareRoot((x-x1)*(x-x1)+(y-y1)*(y-y1))<=LoadReal(udg_table,info,loopA+6)then
set angle = LoadReal(udg_table,info,loopA+1)
set x1 = x1+Speed()*Cos(angle*bj_DEGTORAD)
set y1 = y1+Speed()*Sin(angle*bj_DEGTORAD)
set show = LoadInteger(udg_table,info,loopA+7)
call SaveUnitHandle(udg_table,99999,1,LoadUnitHandle(udg_table,info,loopA-1))
call SaveGroupHandle(udg_table,99999,2,LoadGroupHandle(udg_table,info,loopA))
if show==R2I(80.0/Speed())then
call SaveInteger(udg_table,info,loopA+7,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleMissTarget.mdl",x1,y1))
else
call SaveInteger(udg_table,info,loopA+7,show+1)
endif
call GroupEnumUnitsInRange(udg_targets,x1,y1,125.0,Condition(function Ravage_Targets))
call SaveReal(udg_table,info,loopA+4,x1)
call SaveReal(udg_table,info,loopA+5,y1)
else
call SaveInteger(udg_table,loopA,info,1)
endif
endif
set loopA = loopA + 9
endloop
if active then
call ResumeTimer(udg_time[1])
call FlushChildHashtable(udg_table,99999)
else
call PauseTimer(udg_time[1])
set loopA = 1
loop
exitwhen loopA > count
call SaveInteger(udg_table,loopA,info,0)
call DestroyGroup(LoadGroupHandle(udg_table,info,loopA))
set loopA = loopA + 9
endloop
call FlushChildHashtable(udg_table,info)
call SaveInteger(udg_table,0,info,0)
endif
endfunction
function Ravage_Start takes nothing returns nothing
local group targets = CreateGroup()
local unit caster = GetTriggerUnit()
local integer loopA = 0
local integer info = GetHandleId(udg_time[1])
local integer count = LoadInteger(udg_table,0,info)
local real x = GetWidgetX(caster)
local real y = GetWidgetY(caster)
loop
exitwhen loopA > 11
call SaveUnitHandle(udg_table,info,count,caster)
call SaveGroupHandle(udg_table,info,count+1,targets)
call SaveReal(udg_table,info,count+2,loopA*30)
call SaveReal(udg_table,info,count+3,x)
call SaveReal(udg_table,info,count+4,y)
call SaveReal(udg_table,info,count+5,x)
call SaveReal(udg_table,info,count+6,y)
call SaveReal(udg_table,info,count+7,AoE(GetUnitAbilityLevel(caster,Ability_ID())))
call SaveInteger(udg_table,info,count+8,0)
set count = count + 9
set loopA = loopA + 1
endloop
call ResumeTimer(udg_time[1])
call SaveInteger(udg_table,0,info,count)
set targets = null
set caster = null
endfunction
function Spell_Start takes nothing returns nothing
if GetSpellAbilityId()==Ability_ID()then
call Ravage_Start()
endif
endfunction
function InitTrig_Ravage takes nothing returns nothing
set udg_table = InitHashtable()
set gg_trg_Ravage = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Ravage,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Ravage,Condition(function Spell_Start))
call TimerStart(udg_time[1],0.025,true,function Ravage_Duration)
call TimerStart(udg_time[2],0.025,true,function Flying_Duration)
call PauseTimer(udg_time[1])
call PauseTimer(udg_time[2])
set gg_trg_Ravage = null
endfunction
but my ravage code is a bit different because it doesn't need impale, it only needs a stun skill and a dummy unit
im moderate in world editor, low in jass and vjass triggers
your trigger still goes in the wrong direction.
well nvm i'll need to get used to vjass later on.
baassee's rupture spell cant be used on my warcraft 3, my jass newgen pack finds compile errors.
my jasshelper is updated i have the right librarys still it founds compile errors
warcraft 3 does not let me play vjass maps.