• 🏆 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!

[Trigger] Countdown Timer

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2019
Messages
108
Can someone tell me why this Trigger doesn't work ?
  • Timer
    • Events
      • Unit - A unit leaves Region <gen>
    • Conditions
    • Actions
      • Set TimeEvent = (Last started timer)
      • Countdown Timer - Start TimeEvent as a One-shot timer that will expire in 5.00 seconds
      • Set Timer1 = (Last created timer window)
      • Countdown Timer - Create a timer window for TimeEvent with title First Battel Starts:
      • Set TimeEvent = (Expiring timer)
      • Countdown Timer - Show Timer1
  • Timed Instant TP
    • Events
      • Time - TimeEvent expires
    • Conditions
    • Actions
      • Unit - Kill Wisp 0001 <gen>
 
Last Created Timer does probably not exist. But the timer should already exist (by default) if you don't explicitly destroy it somewhere else.

Last Created Window should also come after the window is created. The assignment with "expiring timer" is not doing anything, too, try like this:

  • Actions
    • Countdown Timer - Start TimeEvent as a One-shot timer that will expire in 5.00 seconds
    • Countdown Timer - Create a timer window for TimeEvent with title First Battel Starts:
    • Set Timer1 = (Last created timer window)
    • Countdown Timer - Show Timer1
 
Level 5
Joined
Jan 5, 2019
Messages
108
Last Created Timer does probably not exist. But the timer should already exist (by default) if you don't explicitly destroy it somewhere else.

Last Created Window should also come after the window is created. The assignment with "expiring timer" is not doing anything, too, try like this:

  • Actions
    • Countdown Timer - Start TimeEvent as a One-shot timer that will expire in 5.00 seconds
    • Countdown Timer - Create a timer window for TimeEvent with title First Battel Starts:
    • Set Timer1 = (Last created timer window)
    • Countdown Timer - Show Timer1

Yay it worked :)
 
Level 5
Joined
Jan 5, 2019
Messages
108
Whats the difference if the Start TimeEvent is set to repeat ? or how do i make the game understands it expires when it reach 0 ?
 
Level 5
Joined
Jan 5, 2019
Messages
108
Cool! : )

Basically, when you register an event "Timer expired" for a trigger, it will always run whenver the timer expired.

Now, "one shot" will run the timer only once, while "repeat" will automatically start the timer again when expired.

Yeah i get that part : ) but for some reason it wont trigger if its set to repeat hmmm
 
Status
Not open for further replies.
Top