I am trying to make a visible timer for each player up in the corner. The timer has a visible countdown from 30 minutes to 0. When the timer reaches 0 the game is over and all players loses. (unless the players reaches a certain destination.)
I have read tutorials and I have tried lots of stuff in the editor. I can´t find a way for this to work.
Timer - Start GameTimer as a One Shot timer that will expire in 1800.0 Real Time seconds
Variable - Set GameTimer = (Last started timer)
Timer - Create a timer window for GameTimer, with the title "Remaining time:", using Remaining time (initially Visible)
Variable - Set GameTimerWindow = (Last created timer window)
In game a timer window appears, but the countdown does not start. It is at 0. I want it to start at 30 minutes and count down to 0. I have read the tutorial but still it won´t work. I have 3 other timers as well and I am afraid they will be mixed up with the timers in this trigger.
Timer - Start Duel Timer as a One Shot timer that will expire in 270.0 Game Time seconds
Variable - Set Duel Timer = (Last started timer)
Timer - Create a timer window for (Last started timer), with the title "Duel In:", using Remaining time (initially Visible)
Variable - Set Duel Timer Window = (Last created timer window)
Looks the same as what I got. I use global variables though, not local variables. Try it with globals, and see if anything changes.
Timers have this thing that you can't initialize them in variable. In programming you would say they need constructor which in this case is Start timer (new timer). Unless i'm horribly wrong but that's what i observed
so try:
Start (new timer) as ....
Set GameTimer = (Last started timer)
I am trying to make a visible timer for each player up in the corner. The timer has a visible countdown from 30 minutes to 0. When the timer reaches 0 the game is over and all players loses. (unless the players reaches a certain destination.)
I have read tutorials and I have tried lots of stuff in the editor. I can´t find a way for this to work.
Any ideas?
make a trigger saying having an event Timer Ends and then use an action saying end game for player x in defeat
@SnyderGuy: Go
How about make the timer visible for all players?
The is Timer window, also show/hide action.
I havnt created timers yet, I will need to for my map, but, i thought it was pretty obvious to make the timer visable
You'll need these two triggers.
@ScorpSCII: Go
Note that this will be correct if you only use 1 timer in entire map, otherwise you will have to save it to variable.
@Nerfpl: Go
Yea I know, but I thought that it was pretty obvious and easy to do, so I didnt include it in the triggers.
@ScorpSCII: Go
Believe me. not for everyone. Next thread you will see will be "Timers are bugged?"
Oh, I actually have a couple of timers in my map. How will the trigger look like if I save it to a variable?
(I´m not sure how to use variables in triggers.)
He made tutorial about timers.
Let me link Here
@ScorpSCII: Go
Told ya :p
Now my trigger looks like this:
GameTimer
Events
Game - Map initialization
Local Variables
GameTimer = (New timer) <Timer>
GameTimerWindow = No Timer Window <Timer Window>
Conditions
Actions
Timer - Start GameTimer as a One Shot timer that will expire in 1800.0 Real Time seconds
Variable - Set GameTimer = (Last started timer)
Timer - Create a timer window for GameTimer, with the title "Remaining time:", using Remaining time (initially Visible)
Variable - Set GameTimerWindow = (Last created timer window)
In game a timer window appears, but the countdown does not start. It is at 0. I want it to start at 30 minutes and count down to 0. I have read the tutorial but still it won´t work. I have 3 other timers as well and I am afraid they will be mixed up with the timers in this trigger.
What am I doing wrong?
Timer - Start Duel Timer as a One Shot timer that will expire in 270.0 Game Time seconds Variable - Set Duel Timer = (Last started timer) Timer - Create a timer window for (Last started timer), with the title "Duel In:", using Remaining time (initially Visible) Variable - Set Duel Timer Window = (Last created timer window)
Looks the same as what I got. I use global variables though, not local variables. Try it with globals, and see if anything changes.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Timers have this thing that you can't initialize them in variable. In programming you would say they need constructor which in this case is Start timer (new timer). Unless i'm horribly wrong but that's what i observed
so try:
Start (new timer) as ....
Set GameTimer = (Last started timer)