I'm new and shared my first game here on SCRATCH: "Classic Pong". I'm trying to improve it, probably by putting in an option to play the game again. How do I do that?
Here's the link to the game:
www.scratch.mit.edu/projects/justdasqueegy1/2439381/
Offline
Unfortunately, there is no way to do that unless you do this:
whenclicked
broadcaststartgame ▼when I receivestartgame ▼Gamecode here...Whenreplaybuttonclickedput this in the button to replay spritebroadcaststartgame ▼
Offline
It's actually pretty simple: make a sprite by using the fill tool on the entire canvas, and add the text "Click to play again." Then add these scripts:
whenclicked
setghost ▼effect to100when sprite1 clickedbroadcastscratch-startclicked ▼
Last edited by Hardmath123 (2012-04-02 05:08:42)
Offline
Hardmath123 wrote:
It's actually pretty simple: make a sprite by using the fill tool on the entire canvas, and add the text "Click to play again." Then add these scripts:
whenclicked
setghost ▼effect to100whensprite1clickedbroadcastscratch-startclicked ▼
Yeah.
does the same thing as clicking the green flag.broadcastscratch-startclicked ▼
Offline
Whenclicked
broadcastbegin ▼put this on the stageWhen I receivebegin ▼put this on whatever sprites are going to be playing (like the ball)game codebroadcastgameover ▼When I receivegameover ▼this goes on the play again spriteshowwhenplay again buttonclickedThis also goes on the play again spritebroadcastbegin ▼
Last edited by Mokat (2012-04-02 08:51:47)
Offline
this is how.
whenclicked
broadcaststart ▼
when i receivestart ▼insert your game code hereiflives<1or whateverdo game over scenewhatever it isbroadcastreplay ▼
and, on a completely unrelated note,when i receivereplay ▼for the replay buttonshowwait untiltouchingandmouse-pointer ▼?mouse down?broadcaststart ▼
hope this helps.whenquit button ▼clickedstop all
whenclicked
forevergo tomy projects ▼clickone of my projects ▼sayI like these projects!clicklove it ▼check out more projects!click this next block:obsolete!
Last edited by ty44 (2012-04-02 14:10:32)
Offline
Thank you guys. I'm so clueless. Hope I can learn from this. Thanks again!
Offline