Dryvnt
New Member
- Reaction score
- 10
So well i got NewGen and now im trying to do some spells using globals, but whenever i try to make globals it says "Expected end of line" when i save or test map... But normally it would fix itself if i copied what Flare wrote in another thread, but now it wont... Ill give you code :thup:. And yes, it's yet ANOTHER war stomp with pushback ...
PS: I haven't leak fixed it yet, i wanna do it myself... And also, i got custom ability ID's
JASS:
globals
location tp = GetUnitLoc(GetTriggerUnit())
group slideg = GetUnitsInRangeOfLocAll(250, tp)
endglobals
function Conditions takes nothing returns boolean
return (GetSpellAbilityId() == 039;Wars039;)
endfunction
function slide takes nothing returns nothing
local unit fogu
local location fogp
local location movepoint
local real angle
loop
set fogu = FirstOfGroup(slideg)
exitwhen fogu == null
set fogp = GetUnitLoc(fogu)
set angle = AngleBetweenPoints(tp, fogp)
set movepoint = PolarProjectionBJ(fogp, 15, angle)
call SetUnitPositionLoc(fogu, movepoint)
endloop
endfunction
function Actions takes nothing returns nothing
local timer t = CreateTimer()
call TimerStart(t, 0.04, true, function slide)
endfunction
//===========================================================================
function InitTrig_Imp_War_Stomp takes nothing returns nothing
local trigger Imp_War_Stomp = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( Imp_War_Stomp, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( Imp_War_Stomp, Condition( function Conditions ) )
call TriggerAddAction( Imp_War_Stomp, function Actions )
set Imp_War_Stomp = null
endfunction
PS: I haven't leak fixed it yet, i wanna do it myself... And also, i got custom ability ID's