I am trying to make boss cast this spell when players enter in 50 range from the boss, but nothing happens.
JASS:
function Trig_LKspell1_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A002', gg_unit_H00N_0336 )
call SetUnitAnimation( gg_unit_H00N_0336, "spell channel" )
call TriggerSleepAction( 2.00 )
call IssuePointOrderLocBJ( gg_unit_H00N_0336, "a002", GetUnitLoc(gg_unit_H00N_0336) )
endfunction
//===========================================================================
function InitTrig_LKspell1 takes nothing returns nothing
set gg_trg_LKspell1 = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_LKspell1, 50.00, gg_unit_H00N_0336 )
call TriggerAddAction( gg_trg_LKspell1, function Trig_LKspell1_Actions )
endfunction