Cheesy
some fucker
- Reaction score
- 95
Alright, back with another problem.
I have a trigger called Death that runs every 5.00 seconds. It picks a random number of 3 - 6 footmen and explodes them instantly. However it's not working. ( Obviously ) Anyways, could anyone tell me why? Here is my code:
I have a trigger called Death that runs every 5.00 seconds. It picks a random number of 3 - 6 footmen and explodes them instantly. However it's not working. ( Obviously ) Anyways, could anyone tell me why? Here is my code:
JASS:
function PickAllConditions1 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 039;hfoo039; )
endfunction
function PickAllActions1 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Death_Actions takes nothing returns nothing
call ForGroupBJ( GetRandomSubGroup(GetRandomInt(3, 6), GetUnitsOfPlayerMatching(Player(1), Condition(function PickAllConditions1))), function PickAllActions1 )
endfunction
//===========================================================================
function InitTrig_Death takes nothing returns nothing
set gg_trg_Death = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Death, 5.00 )
call TriggerAddAction( gg_trg_Death, function Trig_Death_Actions )
endfunction