Hey! I'm having some problems with my newest game:
http://scratch.mit.edu/projects/100justin1/527143
I've just joined this a while ago, and am pretty new still. But I'm getting pretty good.
Okay, here's my short problem.
When you play my game and you lose, it has a try again button right?
How can I make it so when I click that it restarts everything from the start?
Thank you.
*I'm thinking of removing quite a bit of those red lines.. it's pretty hard.
Last edited by 100justin1 (2009-05-15 03:45:33)
Offline
Well, there isn't a quick solution to that problem...you have to design it in from the start. Make a broadcast message called "Start Game" or something and then, on each sprite, set up scripts under the "When I Receive Start Game" to set the sprites where you want them to start, point them in the right direction, put the right costume on them and so on. You also need to set any variables that need to be initialized. Then, you just broadcast a message to Start Game when the green flag is clicked or your restart game button is clicked.
Offline
Oh Okay, thank you. I made a new game with a menu, which was my first menu ever. I'm still working on it though.
Offline
It's always a learnign curve. The great thing about scratch is the forums and how helpful the people are. If they don't know the answer they can often point you at a project that solves the same problem and you can download it.
Offline
[blocks]<when green flag clicked>
<say[ poop ]for( 5 )secs>[blocks] you can click the green flag on the top right corner
Last edited by MariowiiX (2009-05-24 21:14:15)
Offline
MariowiiX wrote:
[blocks]<when green flag clicked>
<say[ poop ]for( 5 )secs>[blocks] you can click the green flag on the top right corner
Please don't spam and go way out of topic. This is not a good way to introduce yourself to the scratch community.
Last edited by DawnLight (2009-05-24 23:58:37)
Offline
Paddle2See wrote:
Well, there isn't a quick solution to that problem...you have to design it in from the start. Make a broadcast message called "Start Game" or something and then, on each sprite, set up scripts under the "When I Receive Start Game" to set the sprites where you want them to start, point them in the right direction, put the right costume on them and so on. You also need to set any variables that need to be initialized. Then, you just broadcast a message to Start Game when the green flag is clicked or your restart game button is clicked.
That's what I was going to say!
Last edited by Chrischb (2009-06-23 01:41:57)
Offline
Hey! There is one more way to do it. When you hit try again, have it broadcast "scratch-startclicked".
Offline
Make the entire game start with a single message that can be broadcasted, so that when you want to restart automatically or without using the green flag, make the spries broadcast the script to restart the project
Offline
Actually, if you use the scratch-startclicked trick, you will need to download to reset properly. Maybe a play button and a lose button.
When I Receive lose
Show
When Lose Clicked
Broadcast Restart
Offline
use the flag thing
Offline
Randomstuff wrote:
use the flag thing
or replace every green flag hats with broadcast receiver hats, and have it broadcast a message when it needs to restart. Not that it matters anymore, this thread is so old.
Offline
The green flag can set everything back up. Perhaps when you lose you can <stop all> then have them press green flag again.
Last edited by midnightleopard (2010-10-05 20:53:58)
Offline
You should make the 'Try Again' button have this script:
<when[ Try Again Button ]clicked>
<broadcast[ Scratch-startclicked]
This should work.
Offline
make a sprite called replay
in there do
<when[this sprite ]clicked>
<broadcast[ reset
<when I receive[ reset
copy the script you want to reset and that is it
Offline
100justin1 wrote:
Hey! I'm having some problems with my newest game:
http://scratch.mit.edu/projects/100justin1/527143
I've just joined this a while ago, and am pretty new still. But I'm getting pretty good.
Okay, here's my short problem.
When you play my game and you lose, it has a try again button right?
How can I make it so when I click that it restarts everything from the start?
Thank you.
*I'm thinking of removing quite a bit of those red lines.. it's pretty hard.
Or you can just broadcast "scratch-startclicked" it will press the green flag.
<broadcast[ scratch-startclicked
Last edited by Pecola1 (2011-02-07 19:45:13)
Offline