how to make a simple timer?
error123
Member Posts: 112
i need to add a timer to one of my apps. which times how long its taken you to get to the last level. so every scene needs to keep the time going from the previous scene.
There will need to be a time limit also so if you don't reach a certain time then you will loose the game.
Also if i cant make this work on my own then i would like to send the project files to someone who knows what they are doing. thanks
There will need to be a time limit also so if you don't reach a certain time then you will loose the game.
Also if i cant make this work on my own then i would like to send the project files to someone who knows what they are doing. thanks
Comments
Game attribute (integer) = Timer
Rule in Timer: Every 1 second [change attribute game.timer] to [game.timer+1]
To have a timer counting down:
Game attribute (integer) = CountdownTimer
Rule in CountdownTimer: Every 1 second [change attribute game.countdowntimer] to [game.countdowntimer-1]
If game.countdowntimer = 0 [change scene to gameoverscene]
ill try this out tomorrow and let you know if i can get it to work.
Meaning:
1. Make an actor to place your timer rules into.
2. Drag that actor into the game scene just off the edge of the game area.
3. Double click the actor inside the game area and place the rules inside this 'instance' instead of opening it and adding rules the normal way (from the actor selecting menu ((above the rules and image tabs)).
4. Make sure the instance's movement checkbox is unchecked.
forklift could you post an image of what it would all have to look like in the actor so all the rules and stuff so i can just copy it? thanks
also once the scene changes the time is gone. how do i continue the time counting on each scene and so that you can see it