How to make a Countdown Timer Count up!
Description Very simple. A countdown timer that counts up. Mainly used to count the game time in a game.
Needed:
World Editor (obviously)
General Trigger Skills
First open the world editor hit F4 then delete Melee Initialization trigger. The hit Ctrl+B or just click the Variable editor and create the following variables;
gameTime~~~Type: Real~~~Initial Vaule: 0 (Default OR 0.00 by editing)
gameTimer~~~Type: Timer~~~Initial Vaule: New Timer (Default)
Then create a new trigger, call it... Time and it should look something like this;
Trigger:
- Time
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- Set gameTime = (gameTime + 1.00)
- Countdown Timer - Start gameTimer as a One-shot timer that will expire in gameTime seconds
- Countdown Timer - Pause (Last started timer)
- Events
After that create a new trigger and call it.. Window and it should look like this
Trigger:
- Window
- Events
- Time - Elapsed game time is 0.00 seconds
- Conditions
- Actions
- Countdown Timer - Create a timer window for gameTimer with title |cffff0000Game Time...
- Countdown Timer - Show (Last created timer window)
- Events
And thats it! Very simple trigger that allows you too keep track of the game time whist being extremly simple and basic. (Added a demo map incase)