library LeakTest
globals
private integer k = 0
endglobals
function looping takes nothing returns nothing
local integer i = 500
local location l
loop
exitwhen i == 0
set l = Location(GetRandomReal(-1000, 1000), (GetRandomReal(-1000, 1000)))
//set u = CreateUnit(Player(15), 'hfoo', 0, 0, 0)
//call UnitApplyTimedLife(u, 1, 0.01)
//call UnitApplyTimedLife(CreateUnit(Player(15), 'hfoo', 0, 0, 0), 1, 0.01)
call RemoveLocation(l)
set k = k + 1
set i = i - 1
//set l = null
endloop
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
if udg_i == 0 then
set udg_i = 1
call BJDebugMsg("start")
call TimerStart(udg_tmr, 0.01, true, function looping)
else
set udg_i = 0
call BJDebugMsg("stop")
call BJDebugMsg(I2S(k))
call PauseTimer(udg_tmr)
endif
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy takes nothing returns nothing
local unit u
set gg_trg_Untitled_Trigger_001_Copy = CreateTrigger( )
set u = CreateUnit(Player(15), 'hfoo', 0, 0, 0)
call UnitApplyTimedLife(u, 1, 0.01)
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Untitled_Trigger_001_Copy, Player(0) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy, function Trig_Untitled_Trigger_001_Actions )
set u = null
endfunction
endlibrary