please help with timer
v76yo@hotmail.com
Member Posts: 9
Hi guys!
I'm so new with GS but I followed many of the expert videos and I got something great going on..however I'm having a problem with a customize timer I made.
I just made my timer and works well (from 9sec to 0) however it won't stop on 0, it keeps counting again from 9 to 0
I checked some videos explaining about it (from tshirtbooth) but that video is for another kind of timer not like I did with the png numbers.
So...that's the first problem....the second one is that I want when the time is over (00:00) it automatically changes the scene to the Game Over scene I have......how?
check link of my actor attribute setup https://www.dropbox.com/s/2dtlmjrfdhuhndo/mysetup.jpg
Many many thanks guys!
Vic
I'm so new with GS but I followed many of the expert videos and I got something great going on..however I'm having a problem with a customize timer I made.
I just made my timer and works well (from 9sec to 0) however it won't stop on 0, it keeps counting again from 9 to 0
I checked some videos explaining about it (from tshirtbooth) but that video is for another kind of timer not like I did with the png numbers.
So...that's the first problem....the second one is that I want when the time is over (00:00) it automatically changes the scene to the Game Over scene I have......how?
check link of my actor attribute setup https://www.dropbox.com/s/2dtlmjrfdhuhndo/mysetup.jpg
Many many thanks guys!
Vic
Answers
Well i wouldn't change the image on each number, instead I would change game.Time. Then by assign the image value to the Attribute "game.Time" it will auto update using the setup you used from TShirtBooth.
With regards having the number decrease from 9 to 0, use the following IF condition:
IF (Attribute (game.Time) > 0) AND IF (Attribute (game.Time) <= 9)
Change Attribute: (game.Time) TO (game.Time-1)
Now for the GameOver with Time = 0:
IF (Attribute (game.Time) <= 0)
Change Scene (YourGameOverScene)
@maltadrik: really thanks for your reply. The first part of stopping to 0 works great! however, the gameover part doesn't.
This is what I did:
I open one of the digits and I add the rule--IF (Attribute (game.Time) <= 0)
Change Scene (YourGameOverScene)
When time stop on all 0:00 nothing happened.
Could you please let me know what actor I should add this rule? like the main actor I have on the left actors panel or the game screen with the others?
Thanks!