This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-07-24 01:06:16

apwhitelaw
Scratcher
Registered: 2007-07-24
Posts: 4

Retry/Restart Button?

Ok, well I am making agame, and if someone failes I want them to be able to just click retry without having to reload the page(even thought thats not a big problem). How would I go about make this button? Just so you know, I am using the Gravity Marble that is in the "Things" folder.

What happens is if they touch a wall, it will come up with the retry, they can click on that, and I need to make that restart the game.(Or, if it is easier, it could have them press a key, if possible please tell me how to do both ways) I also need to know how to make the retry thing appear when the ball hits a wall. I just set it to hide as the first thing for the Retry to do.

Thanks in advance!

Last edited by apwhitelaw (2007-07-24 01:25:49)

Offline

 

#2 2007-07-24 08:37:17

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Retry/Restart Button?

Just make "when green flag" scripts to set the desired initial state of the game.

If you want to have automatic restart, or restart from something other than the green flag, use
     when green flag
         broadcast initialize and wait
on the stage, and put
     when I receive initialize
           ....
scripts in each sprite that needs to be initialized.

You can then broadcast initialize in other situations to get restarts.

Offline

 

#3 2007-07-24 23:48:37

apwhitelaw
Scratcher
Registered: 2007-07-24
Posts: 4

Re: Retry/Restart Button?

Ok I forgot about that, that makes sense.

Thanks for the help.

Offline

 

Board footer