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:
when gf clicked broadcast [startgame v] when I receive [startgame v] Gamecode here... When [replaybutton] clicked//put this in the button to replay sprite broadcast [startgame v]
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:
when gf clicked set [ghost v] effect to (100) when sprite1 clicked broadcast [scratch-startclicked v]
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:
when gf clicked set [ghost v] effect to (100) when [sprite1] clicked broadcast [scratch-startclicked v]
Yeah.
broadcast [scratch-startclicked v]does the same thing as clicking the green flag.
Offline
When gf clicked broadcast [begin v] //put this on the stage When I receive [begin v] //put this on whatever sprites are going to be playing (like the ball) game code broadcast [gameover v] When I receive [gameover v] //this goes on the play again sprite show when [play again button] clicked //This also goes on the play again sprite broadcast [begin v]
Last edited by Mokat (2012-04-02 08:51:47)
Offline
this is how.
when gf clicked broadcast [start v]
when i receive [start v] insert your game code here if <(lives) < [1]> //or whatever do game over scene //whatever it is broadcast [replay v] end
when i receive [replay v] //for the replay button show wait until <<touching [mouse-pointer v]?> and <mouse down?>> broadcast [start v]and, on a completely unrelated note,
when [quit button v] clicked stop allhope this helps.
when gf clicked forever go to [my projects v] click [one of my projects v] say [I like these projects!] click [love it v] check out more projects! click this next block: obsolete! end
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