• 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.

[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