Need help with timer

Merry Christmas CM
You seem to know your GS well. I need help w/timer
• I have a maze game with several levels. It's simple...ball goes into a hole.
• I need a timer for each level to show how long it took a person to finish each level
• The timer will be displayed AFTER each level is completed showing how long it took a player to finish.
• Once the ball goes into the hole the timer will stop, then display how long it took (I don't want the timer to appear as each level is being played)
• No highscores. No "your" time. No "best" time.
• The timer will reset itself when a player leaves the scene
Hope that makes sense.
I'm really close to launching the game and I'm excited.
Merry Christmas again.
You seem to know your GS well. I need help w/timer
• I have a maze game with several levels. It's simple...ball goes into a hole.
• I need a timer for each level to show how long it took a person to finish each level
• The timer will be displayed AFTER each level is completed showing how long it took a player to finish.
• Once the ball goes into the hole the timer will stop, then display how long it took (I don't want the timer to appear as each level is being played)
• No highscores. No "your" time. No "best" time.
• The timer will reset itself when a player leaves the scene
Hope that makes sense.
I'm really close to launching the game and I'm excited.
Merry Christmas again.
Comments
Make a rule whenever you press the play button in the scene or whenever you start the scene( if the scene starts automatically when you get to it just have this behavior by itself)
change attribute scene1TimerOn to true
then make another rule when attribute scene1TimerOn=true
Put a timer every 1 second inside that rule,
and put a change attribute behavior inside that timer change attribute scene1Time to scene1Time+1
now whenever you want the timer to stop counting( in your case when the balls in the hole so ill use that as an example) change attibute Scene1TimerOn to false
so in your case you would have a rule when actor ball collides with hole, change attribute Scene1TimerOn to false.
Then whenever you want to display the time simply have a display text behavior and display attribute Scene1Time
then whenever you want to reset the time have a change attribute behavior and change attribute Scene1Time to 0
cheers
Posting in @codemonkeys corner won't make him reply... i haven't seen him in the forum for ages!!
Where are you @Codemonkey ??
I will try this and get back to u
Let me clarify...
• Each scene has a different ball going into the same hole.
• Am I creating an actor (timer) then applying these rules and adding it to each scene?
• OR, am i applying your tips to each scene?
I made the two attributes (boolean & integer)
Then you wrote:
Make a rule whenever you press the play button in the scene or whenever you start the scene( if the scene starts automatically when you get to it just have this behavior by itself)
• Yes, scenes start automatically, so where do I make a rule?
• When you say leave behavior by itself, what does that mean?
change attribute scene1TimerOn to true
• Is this a stand alone rule?
----------
then make another rule when attribute scene1TimerOn=true
Put a timer every 1 second inside that rule,
and put a change attribute behavior inside that timer change attribute scene1Time to scene1Time+1
• Again, it makes sense but I'm not sure if I apply this to a timer actor or scene
----------
now whenever you want the timer to stop counting( in your case when the balls in the hole so ill use that as an example) change attibute Scene1TimerOn to false
so in your case you would have a rule when actor ball collides with hole, change attribute Scene1TimerOn to false.
• is this a separate rule?
Then whenever you want to display the time simply have a display text behavior and display attribute Scene1Time
• does this go into the rule above?
then whenever you want to reset the time have a change attribute behavior and change attribute Scene1Time to 0
• does this go into the rule above?
I appreciate your help. Don't feel offended if you have to describe this as if your writing to a small child.
Thanks again