Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Tennis Trouble
- LacyGirls
-
3 posts
Tennis Trouble
Hi!
We're new to Scratch, and having a little trouble with our first project, which is a tennis game. It is still a work in progress, but we can't stop the game once the time limit has finished. Instead of the stage switching at zero, our timer variable continues on to minus numbers and the game keeps going. Any ideas? We've tried scripting next background and blocks to select the background we want, but to no avail.
Thanks,
LacyGirls
We're new to Scratch, and having a little trouble with our first project, which is a tennis game. It is still a work in progress, but we can't stop the game once the time limit has finished. Instead of the stage switching at zero, our timer variable continues on to minus numbers and the game keeps going. Any ideas? We've tried scripting next background and blocks to select the background we want, but to no avail.
Thanks,
LacyGirls

- andre_rifaut
-
100+ posts
Tennis Trouble
There is a “stop” block. You can stop everything, with stop all
You can stop some script by testing if the end_of_game is “on” and then use “stop this script”.
You can stop some script by testing if the end_of_game is “on” and then use “stop this script”.
- JEMA2311
-
65 posts
Tennis Trouble
Also, the timer variable, you should try to stop it by using something like this:
if <(timer < 0)> then
set timer to 0
broadcast (stop)
or something like that, so your players can stop with “stop this script”. And even start a new round/set/whatever
if <(timer < 0)> then
set timer to 0
broadcast (stop)
or something like that, so your players can stop with “stop this script”. And even start a new round/set/whatever

Last edited by JEMA2311 (May 13, 2013 19:15:21)
- LacyGirls
-
3 posts
Tennis Trouble
Thanks Guys!
We think we've just figured it out…
LacyGirls
We think we've just figured it out…
LacyGirls

- Duchisan
-
52 posts
Tennis Trouble
This is getting old…
Last edited by Duchisan (March 15, 2021 18:38:10)
- Discussion Forums
- » Help with Scripts
-
» Tennis Trouble