Sorry if maybe I reply a post, however, is the first time I use this program I would like to insert a countdown that ends the scene. I created a text and I called it Tempo and I gave it a value of 120 that should be the second.
I created a scene variable with the same name and gave it a value (structure)
In the GUIMANAGEMENT i set timer like in the picture.
But timer don’t work where is that wrong?
The reset timer event is asking for the name of the timer as a “string” to reset but you pass a number value 1 to it then you are trying to subtract a string from 1 which can not be done. Not sure what you are trying to accomplish there…
Anyway, if you want the game end after 120 seconds and you would like to display a countdown from 120 to 0 you can do it without using a timer actually, only a text object, a scene variable and two events required.
EVENT1 //initialize a variable with the value 120
[code]Condition:
At the beginning of the scene:
Action
Do = 120 to variable CountDown[/code]
EVENT2 //reduce the value of the variable by TimeDelta() and update a text object with this value
[code]Condition:
no condition
Action:
Do - TimeDelta() to Variable CountDown
Do = ToString(floor(Variable(CountDown))) to text of CountDownText[/code]
It is going to constantly update a text object and display a timer that count down from 120 and then all you need to do is check if the value of CountDown <= 0 then End the game, go to score board or whatever you like.