I added a timer onto meh game and i just wanna know if there's any possible way to make it stop (like when the game ends it shows you your time until you click flag again)
Offline
Do this at a certain time:
<set{ some variable }to( <timer>
<reset timer>
Offline
Ihaveamac's way will not work properly i'm afraid
Instead at the end of the game set a variable to a timer like he said but include this other script instead.
"When green flag pressed"
"Reset timer"
Otherwise what will happen is the timer will already be playing after the game has ended, thus resulting in the next game being on something like 48 seconds when it's started.
Last edited by 06dknibbs (2009-09-27 16:44:25)
Offline
Make you own timer variable.
Just put:
[blocks]
<forever>
<wait( 1 )secsc>
<change{ TIMER }by( 1 )
[/blocks]
Offline
Tell me what makes the game stop so I can give you a more specific answer please.
For now I willl show you what to do if you are using lives.
Make two variables called "timer" and "lives" then insert this script
<when green flag clicked>
<set{ lives }to( whatever you want
<set{ timer }to( 0
<forever
<wait( 1 )secsc
<change{ timer }by( 1
Then, whatever happens to make the game stop, e.i you run out of lives, then insert the script below.
<If<(lives <=> 0 )>
<say[ timer
<stop all>
I hope this works. My computer is messed up atm so I can't use scratch and test it myself.
-Steppenwulf
Last edited by steppenwulf (2009-09-27 21:59:25)
Offline