• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Timers

Status
Not open for further replies.
Timers are just variables which can call another function after the set time. Create them like this:
JASS:
set t = CreateTimer()
You can start a timer with this function:
JASS:
call TimerStart(myTimer, duration, repeating, function MyFunction)
duration is a real (decimal) value which defines how long the timer lasts, repeating is a boolean: if true, the timer will repeat with the same duration once it expires, otherwise it will just fire once. MyFunction is just a function that takes nothing and returns nothing.

They're harder to use than TriggerSleepAction, but more precise.
 
Status
Not open for further replies.
Top