I always thought that clicking the green flag would restart the scratch program but I've seen a few projects where it doesn't work or you need to click it several times to restart.
My project "scratch smash" will not restart when the green flag is clicked.
http://scratch.mit.edu/projects/archmage/71543
Just try jumping off the edge until you lose all your lives and then the green flag won't restart the program.
Last edited by archmage (2007-12-23 01:45:30)
Offline
I think what is happening here is that you have set up a condition from which the program can not recover. At the end of the game, one of the players will have
lives < 1
Then, you have set up a condition
[blocks]
<when green flag clicked>
<wait until> <( lives <<> 1 )>
<stop all>
[/blocks]
Which may be executing before lives is ever reset so that the program is immediately doing a stop every time the green flag is clicked.
Last edited by Paddle2See (2007-12-23 02:18:38)
Offline
"Green flag clicked" is just a condition, such as "when (blah) clicked" or "when key (blah) pressed".
Last edited by MyRedNeptune (2007-12-23 09:27:28)
Offline
Yes. The green flag only starts the scripts with the "When green flag clicked" hat. If you want it to restart your project, you have to reset the variables yourself in a "startup" script. You can do the same with X and Y positions of sprites, volume, tempo, ... everything what chages in your project. Prehaps it would be good to have a restart button in the online player to.
Offline