hi guys,
I recently learned JASS but im not really good at it yet.
Tried to make a ShockNova spell but it doesn't work (btw i can make it in GUI)
Anyone knows what's wrong?
I recently learned JASS but im not really good at it yet.
Tried to make a ShockNova spell but it doesn't work (btw i can make it in GUI)
JASS:
function Trig_NewTrigger_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A000039;
endfunction
function Trig_NewTrigger_Actions takes nothing returns nothing
local real circle
loop
set circle = circle + 36
call CreateNUnitsAtLoc( 1, 039;h000039;, Player(0), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 256, circle) )
call TriggerSleepAction (0.10)
exitwhen circle == 360
endloop
endfunction
function InitTrig_NewTrigger takes nothing returns nothing
local trigger gg_trg_NewTrigger
set gg_trg_NewTrigger = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_NewTrigger, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(gg_trg_NewTrigger, Condition(function Trig_NewTrigger_Conditions))
call TriggerAddAction(gg_trg_NewTrigger, function Trig_NewTrigger_Actions)
endfunction
Anyone knows what's wrong?