• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Timer Elapsed event

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,763
Does the event

call TriggerRegisterTimerEventSingle( )

create a timer or does every event use one single internal timer? If they all use the same timer, i feel DestroyTimer(GetExpiredTimer()) would cause issues
 
It uses an internal timer similar in accuracy/behavior as CreateTimer(), but you do not have access to it. Simple test:
JASS:
function X takes nothing returns nothing
    if GetExpiredTimer() == null then
        call BJDebugMsg("null")
    else
        call BJDebugMsg("not null")
    endif
endfunction

function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterTimerEvent(t, 3, false)
    call TriggerAddAction(t, function X)
endfunction
It will show "null", therefore calling DestroyTimer(GetExpiredTimer()) will have no effect (confirmed by a test I just ran).
 
Status
Not open for further replies.
Back
Top