Demonfaze
8 yrs. Hell, it's been a long time.
- Reaction score
- 72
How exactly do you use Countdown Timers for Events? I can't seem to get it working properly.
Here is my code
tmr_ROUNDTIMER = global timer variable
tmr_ROUNDTIMERDIALOG = global timer dialog variable
Trigger 1: Setting up the timer
Trigger 2: Event from the timer
The timer displays, so I know the first block of code works. The second trigger, however, doesn't appear to fire off.
Thanks in advance.
Here is my code
tmr_ROUNDTIMER = global timer variable
tmr_ROUNDTIMERDIALOG = global timer dialog variable
Trigger 1: Setting up the timer
JASS:
set tmr_ROUNDTIMER = CreateTimer()
call StartTimerBJ(tmr_ROUNDTIMER, false, 5 )
call CreateTimerDialogBJ( tmr_ROUNDTIMER, "Prep Time" )
set tmr_ROUNDTIMERDIALOG = GetLastCreatedTimerDialogBJ()
Trigger 2: Event from the timer
JASS:
function Trig_Start_Round_Trigger_Actions takes nothing returns nothing
call showMessage(5, "Timer Expired")
endfunction
//===========================================================================
function InitTrig_Start_Round_Trigger takes nothing returns nothing
set gg_trg_Start_Round_Trigger = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Start_Round_Trigger, tmr_ROUNDTIMER )
call TriggerAddAction( gg_trg_Start_Round_Trigger, function Trig_Start_Round_Trigger_Actions )
endfunction
The timer displays, so I know the first block of code works. The second trigger, however, doesn't appear to fire off.
Thanks in advance.