• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Is Timer Better than TriggerRegisterTimerEvent?

Status
Not open for further replies.
Level 19
Joined
Dec 12, 2010
Messages
2,069
??? 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