Hi again,
I created this trigger just for efficiency and wanna ask if it is fine
also, should i use bj_forLoopAIndex in my loop or create my own local counter variable for that?
thanks
I created this trigger just for efficiency and wanna ask if it is fine
JASS:
function PlayerUnitEvent takes trigger t, playerunitevent e returns nothing
set bj_forLoopAIndex = 0
loop
exitwhen bj_forLoopAIndex == 11
if GetPlayerController(Player(bj_forLoopAIndex)) == MAP_CONTROL_USER then
call TriggerRegisterPlayerUnitEvent(t, Player(bj_forLoopAIndex), e, null)
endif
set bj_forLoopAIndex = bj_forLoopAIndex+1
endloop
endfunction
JASS:
function InitTrig_Sand_Pulse takes nothing returns nothing
local trigger t = CreateTrigger( )
call PlayerUnitEvent( t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition( t, Condition( function Trig_Sand_Pulse_Conditions ) )
call TriggerAddAction( t, function Trig_Sand_Pulse_Actions )
set t = null
endfunction
also, should i use bj_forLoopAIndex in my loop or create my own local counter variable for that?
thanks