Discuss Scratch

TheCentipede
Scratcher
100+ posts

Restart Button project/Scripts help

Will somebody please help me with this, preferably a good programmer or scratcher. I have a game {Link below} In which you have to play through levels in order to advance, when you touch a certain sprite, the game ends, and you have to hit the green flag and restart the whole game. I want to know how to make an in game restart button which will let you restart in the level you died. Can someone please play the game a little, look at the scripts and tell me what to do or remix it fixed and post a link here. Link to game below. Thanks.
http://scratch.mit.edu/projects/13348411/

Last edited by TheCentipede (Nov. 26, 2014 23:19:03)

shoresbeep
Scratcher
1000+ posts

Restart Button project/Scripts help

Ok, so make a restart sprite, and say:

whenthisspriteclickedbroadcastRESTART

And when the other things receive restart:
Do what you want them to do when green flag is clicked
The_Scratch_Squad
Scratcher
1000+ posts

Restart Button project/Scripts help

shoresbeep wrote:

Ok, so make a restart sprite, and say:

whenthisspriteclickedbroadcastRESTART

And when the other things receive restart:
Do what you want them to do when green flag is clicked

Actually, he said:

TheCentipede wrote:

…when you touch a certain sprite,…

So it would be more like this:

whenclickedforeverwaituntiltouchingcolor sprite #x or sprite #x?broadcastRESTART

Or something like that… not sure about the touching color thingy…
x= the sprite number or the sprite name?

Last edited by The_Scratch_Squad (Nov. 26, 2014 22:34:28)

TheCentipede
Scratcher
100+ posts

Restart Button project/Scripts help

I'm so so sorry, I put the link tot he wrong game, which just happened to be named EPIC FAIL! Once again, so sorry. What a coincidence.
shoresbeep
Scratcher
1000+ posts

Restart Button project/Scripts help

It's fine
Locomule
Scratcher
1000+ posts

Restart Button project/Scripts help

Create a new “when green flag clicked” that broadcasts Start.
Replace all your other “when green flag clicked” blocks with “when I receive Start”
except for that block in your Restart sprite, replace it with “when I receive End” and add a “when this sprite clicked” with a “broadcast Start” beneath it. Also, add a “when I receive Start” block followed by a “Hide” block.

ps. Using more than 1 “when green flag clicked” block can create all kinds of weird errors so only use one per project

Last edited by Locomule (Nov. 27, 2014 06:35:32)

TheCentipede
Scratcher
100+ posts

Restart Button project/Scripts help

I tried the things you said but they didn't seem to work; Then I came up with a brilliant plan: I'll make a variable named backdrop name, and each time you beat a level, I'll add one, so when you die, the backdrop name variable will be sent to the restart button, so when you push it it will be able to tell what level you are on, will this work?
Locomule
Scratcher
1000+ posts

Restart Button project/Scripts help

My earlier advice wasn't really intended to fix the button but rather was something you needed to do first. Now we are ready to fix it, but there are still many other issues. I'm not saying that your method won't work. But look at it this way, it is kind of like building a house of cards… If your foundation is shaky, you can build the house but it won't go very high before it becomes too unstable. Your project is the same way. So I will do a remix that fixes everything and you can compare it to your current version to see the methods I use to stabilize your work so far.
Please note that I am going to change your methods as little as possible so other than everything working, the game should function pretty much like you wish it did right now. I'll have it done as soon as possible tonight, just having some family issues at the moment. I will post here with a link to my remix when it is done.
Locomule
Scratcher
1000+ posts

Restart Button project/Scripts help

Ok, all done. I removed a lot of stuff that wasn't really doing anything or was redundant. There were a few blocks that weren't doing anything but looked like you might want them to do something later. I separated their scripts from the top block so they wouldn't run but left them in your project.

Check it out, see what you think, and let me know if you have any questions. Hope all this helps but you were already off to a great start so keep up the good work! I'll leave my remixed version up until I get a message from you here, so remix my remix (lol) and name it something like Backup so that you have a copy of it on your own account.
AiraCruz
Scratcher
2 posts

Restart Button project/Scripts help

Hi, I need to know how to make my death count restart. Please help.
Stephano1221
Scratcher
1 post

Restart Button project/Scripts help

AiraCruz wrote:

Hi, I need to know how to make my death count restart. Please help.
When Green Flag Clicked
Set DeathCounter to 0
DiegoDelmont
Scratcher
8 posts

Restart Button project/Scripts help

it's not working!!!!!
deck26
Scratcher
1000+ posts

Restart Button project/Scripts help

DiegoDelmont wrote:

it's not working!!!!!
I suggest you start your own topic, this one is old.
DiegoDelmont
Scratcher
8 posts

Restart Button project/Scripts help

oh…
GoAway101
New Scratcher
1 post

Restart Button project/Scripts help

I got a Reset button to work on my first scratch. Please look through the code and be my critic.
https://scratch.mit.edu/projects/88790226/
BF10
Scratcher
500+ posts

Restart Button project/Scripts help

GoAway101 wrote:

I got a Reset button to work on my first scratch. Please look through the code and be my critic.
https://scratch.mit.edu/projects/88790226/
Please do not necrobump.
DenzilRobinson
Scratcher
2 posts

Restart Button project/Scripts help

Show me how to make a start button to start my game.
Bruhdude123
New Scratcher
1 post

Restart Button project/Scripts help

how do you restart the project you made that is ALREADY posted!?! i'm going crazy because i don't know!

Powered by DjangoBB