• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Is Timer Better than TriggerRegisterTimerEvent?

Status
Not open for further replies.
Level 19
Joined
Dec 12, 2010
Messages
2,074
??? it really depends.
If you have to have trigger to register some event BESIDE timer, you go with trigger and use TriggerRegisterTimerEvent()
if you only need timer event, you go with timer
if you need both timer and event, but you as well need control over timer countdown to be able to reset it or change duration, you have to go with TriggerRegisterTimerExpire(), because the timer created by TriggerRegisterTimerEvent() cannot be manipulated anyhow, basically unavailable.
And of course, innerly TriggerRegisterTimerEvent() does all the same as if you'd create timer manually and run it. As I said, the only difference is the access to that timer. Not to speak that obviously TriggerRegisterTimerEvent faster, because timer creation done in native code, not jass level.
 
Status
Not open for further replies.
Top