
Untitled
By: a guest on
May 5th, 2012 | syntax:
JavaScript | size: 0.93 KB | hits: 17 | expires: Never
scope test initializer i
globals
private constant real DURATION=5.
private constant string TITLE="HELLO WOLD"
private timer time=CreateTimer()
private timerdialog tDia
endglobals
private function p takes nothing returns nothing
call BJDebugMsg("timer finished")
endfunction
private function c takes nothing returns boolean
call TimerStart(time,DURATION,false,function p)
set tDia=CreateTimerDialog(time)
call TimerDialogSetTitle(tDia,TITLE)
call TimerDialogDisplay(tDia,true)
return false
endfunction
private function i takes nothing returns nothing
local trigger t=CreateTrigger()
local boolexpr cond=Condition(function c)
call TriggerRegisterTimerEvent(t,1.,false)
call TriggerAddCondition(t,cond)
set t=null
set cond=null
endfunction
endscope