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

Backward Timer

Status
Not open for further replies.
Level 19
Joined
Feb 25, 2009
Messages
2,004
I was playing Vampirism for quite a bit and I saw that they had a countdown timer which was running backward, thus getting the expired time while playing the map. So I decided to test this and try to make it for a map of mine and this is with what I came up:

  • TimerInit
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start timer as a One-shot timer that will expire in time seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Expired Time:
      • Countdown Timer - Show (Last created timer window)
  • TimerCount
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set time = (time + 0.01)
      • Countdown Timer - Start timer as a One-shot timer that will expire in time seconds
It's quite simple yes, but I couldn't find a better way.

I'm trying to find out if this is risky, meaning, will it lag the map after the real reaches a really high value?
 
Status
Not open for further replies.
Top