hi again, Xenaris is making a charge spell (earlier mentioned search forums )
And im trying to do it in JASS (im a newb) and i get an error and i cant seem to fix it, help?<3
And im trying to do it in JASS (im a newb) and i get an error and i cant seem to fix it, help?<3
Code:
function Trig_Charge_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Charge_Actions takes nothing returns nothing
call UnitMoveToUnitAsProjectile(GetTriggerUnit(),0,GetEventTargetUnit(),0,0)
endfunction
function InitTrig_Charge takes nothing returns nothing
local trigger gg_trg_Charge = CreateTrigger()
//call TriggerRegister__(gg_trg_Charge, )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Charge,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Charge, function Trig_Charge_Actions)
endfunction