• 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!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Dynamically updated turn timer count per minute elapsed

Status
Not open for further replies.
Level 2
Joined
Nov 15, 2010
Messages
16
Hi,

How can I create a dynamically updated timer that will change the title every minute?
e.g. when I just create the timer the first time it would say:

time passed 1 minute 0:60

then it will tick every second going:
time passed 1 minute 0:59
time passed 1 minute 0:58
time passed 1 minute 0:57
...
time passed 1 minute 0:01
  • Income Timer
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start TestTimer as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title (Time Passed + 1 minute)
Then once it reaches 60 second countdown, it would go:
time passed 2 minutes 0:60
time passed 2 minutes 0:59
time passed 2 minutes 0:58
time passed 2 minutes 0:57
...
time passed 2 minutes 0:01
  • Income
    • Events
      • Time - TestTimer expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • Countdown Timer - Start TestTimer as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title (Time Passed + 2 minute)
but after that I am not sure how to make it update dynamically that variable before minute... Do I create 60-120 triggers like this or is there an easy way to arithmetically increment that? something like set minute = minute + 1?
...
Bonus if this can be done via the GUI-only
 
Last edited:
Level 2
Joined
Nov 15, 2010
Messages
16
Thank you Warseeker, based on the OP's first post from the thread you've mentioned and your suggestion I was able to produce what I was after

  • Income Timer
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set GameTimePlayed = 0
      • Countdown Timer - Start TimeElapsed as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title ((String(GameTimePlayed)) + minutes elapsed)
      • Set GameTimerWindow = (Last created timer window)
  • Income
    • Events
      • Time - TimeElapsed expires
    • Conditions
    • Actions
      • Set GameTimePlayed = (GameTimePlayed + 1)
      • Countdown Timer - Change the title of GameTimerWindow to ((String(GameTimePlayed)) + minutes elapsed)
 
Last edited:
Status
Not open for further replies.
Top