Cheesy
some fucker
- Reaction score
- 95
Ahh, thanks for the explanation AceHart.
You always know everything.
You always know everything.
Ahh, thanks for the explanation AceHart.
You always know everything.
function ExplodeUnitBJ takes unit whichUnit returns nothing
call SetUnitExploded(whichUnit, true)
call KillUnit(whichUnit)
endfunction
function Trig_Death_Conditions1 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 039;hfoo039; )
endfunction
function Trig_Death_Actions takes nothing returns nothing
local unit Unit
local group UnitGroup = GetUnitsOfPlayerMatching( Player(1), Condition( function Trig_Death_Conditions1 ))
local integer TempInteger = GetRandomInt( 4, 7 )
local integer LoopStart = 1
local integer UnitsKilled = 0
loop
exitwhen LoopStart > TempInteger
set Unit = GroupPickRandomUnit(UnitGroup)
call GroupRemoveUnitSimple( Unit, UnitGroup )
//call ExplodeUnitBJ( Unit )
call SetUnitExploded( Unit, true )
call KillUnit( Unit )
set UnitsKilled = ( UnitsKilled + 1 )
set LoopStart = ( LoopStart + 1 )
endloop
call DisplayTextToForce( GetPlayersAll(), ( I2S(UnitsKilled) + " Units exploded!" ) )
set LoopStart = 1
set UnitsKilled = 0
call DestroyGroup( UnitGroup )
call RemoveUnit( Unit )
endfunction
//===========================================================================
function InitTrig_Death takes nothing returns nothing
set gg_trg_Death = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Death, 8.00 )
call TriggerAddAction( gg_trg_Death, function Trig_Death_Actions )
endfunction