Discuss Scratch

muellly
Scratcher
1000+ posts

A "Restart" -block

This has a workaround. Just make a broad cast named restart and in all the sprites you want to restart put stop all other scripts in sprite then what you would put when you want to restart/press the green flag. If your putting all the scripts from when you press the green flag into the restart broadcast then have one when green flag clicked block broadcast restart. You can also easily press the green flag.

I would greatly appreciate if you were to check of this game I spent months that includes plot and bosses here https://scratch.mit.edu/projects/97452006/ ………………………………………Want a detailed review or idea?

I'm a major fan of Pokemon, Undertale and the Pija and Toast series.
I am doing a shiny scramble of pokemon Pearl. I'm 7 chapters in and on my way to the 2nd gym.
Charles12310
Scratcher
1000+ posts

A "Restart" -block

muellly wrote:

This has a workaround. Just make a broad cast named restart and in all the sprites you want to restart put stop all other scripts in sprite then what you would put when you want to restart/press the green flag. If your putting all the scripts from when you press the green flag into the restart broadcast then have one when green flag clicked block broadcast restart. You can also easily press the green flag.
I could assume there is a workaround:

when green flag clicked // the only time we use this block
broadcast [start v]

when I receive [start v] // acts as an alternative to when the project starts. If you want everything to restart, do not put anything in the "When
... // Green Flag Clicked" blocks then do your stuff after that.

...
broadcast [start v] // do this in a script to restart the project.

Last edited by Charles12310 (Sept. 20, 2017 02:45:33)



A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
mystery4000
Scratcher
100+ posts

A "Restart" -block

why not put a “when I receive start, stop all other scripts in sprite” for every sprite. If you drag a piece of code onto the sprite in the editor, it copies the code. I still think this is a good idea though for making restarting programs easier

Last edited by mystery4000 (Sept. 20, 2017 00:36:34)

Nexus_HQ
Scratcher
39 posts

A "Restart" -block

It's coming in Scratch 3.0

Hi!
I'm a Scratcher who likes creating projects from games to animations to simulators. I also enjoy hanging out on the forums regularly.
I would like it if you came to my profile… and leave a love-it.
DaEpikDude
Scratcher
1000+ posts

A "Restart" -block

Nexus_HQ wrote:

It's coming in Scratch 3.0
Source?

And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
Botcho_Otkho
Scratcher
1000+ posts

A "Restart" -block

removed

Last edited by Botcho_Otkho (April 3, 2020 20:22:15)


I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
limpingminnow
Scratcher
20 posts

A "Restart" -block

Now that we have Scratch 3.6.0, we can do this:
stop [other scripts in sprite v]
broadcast [restart v]
do something
stop [this script v]
and then in other sprites:
when I receive [restart v]
stop [other scripts in sprite v]
set [score v] to [0]
do something
stop [this script v]

Last edited by limpingminnow (April 3, 2020 20:29:07)

ThatOneWeirdDude
Scratcher
1000+ posts

A "Restart" -block

I mean, you could just press the green flag again
limpingminnow
Scratcher
20 posts

A "Restart" -block

ThatOneWeirdDude wrote:

I mean, you could just press the green flag again
But what if you wanted to make a 60 second game that repeats 3 times. Then you could have it compare your 3 scores, tell you the biggest, and tell you if you made it to the top.
Another thing you could do is define a block.
define reset
set [score v] to [0]
go to x: (0) y: (0)
when green flag clicked
repeat (3)
game
reset
end

Last edited by limpingminnow (April 4, 2020 15:34:00)

scratchykit5743
Scratcher
1000+ posts

A "Restart" -block

the block could be used to make shortcuts. however, no need to get so off topic…..

how it could be made is such as there could be an emergency restart key in a project maybe, as well as maybe a silly meme type project repeating itself over and over with a block and not a loop, so i see semi support…..

psst! Hit ctrl + shift + down to see the rest!

For whatever reason mister Jon Arbuckle got removed ;-; I'll find a replacement GIF later

Anyways hi, I'm SK

I've been on this site since I was 10 years old. I am currently 15

I have a major addiction to sweet tea and draw a crap ton of stuff in my free time (not all of which is scratch appropriate). I post whatever I want to on the main site and mostly manage the collaborations directory and answer questions in QaS on the forums

I have over 2000 posts lol, a huge chunk of them being from when I was 11-12 during the height of COVID

If by any chance the post you''re reading is from early 2021 or before, please forget that post exists since it is cringey

This is Kimikat.
     (OwO)
She protecc my siggy, and has been since 2020
brooc210
Scratcher
100+ posts

A "Restart" -block

PH-zero wrote:

You can't just use
stop [all v]
because (logically) you can't put another block under this block.
No you can:
if<not<>>then
stop [all v]
end
=)







































what u doing here? go make a new project!

















DON'T click here
Hearst10
Scratcher
100+ posts

A "Restart" -block

Nexus_HQ wrote:

It's coming in Scratch 3.0
didn't

Moving from Scratch? Don't learn C or Java, try Snap!
mybearworld
Scratcher
1000+ posts

A "Restart" -block

mitchboy wrote:

Uh, I can see a problem with this:

when gf clicked
forever
restart [this script v]
when gf clicked
forever
restart :: events
end

[would be] :: control

when gf clicked
forever
end

It'd be like
forever
stop current script and execute it again -> eg . stop the forever loop
forever
stop current script and execute it again -> eg . stop the forever loop
. . .
you get it?

Last edited by mybearworld (Nov. 5, 2020 13:39:32)


Signatures are the only place where assets links still work.
brooc210
Scratcher
100+ posts

A "Restart" -block

annoying workaround :
when green flag clicked
broadcast [go v]
when I receive [go v]
...







































what u doing here? go make a new project!

















DON'T click here
brooc210
Scratcher
100+ posts

A "Restart" -block

Nexus_HQ wrote:

It's coming in Scratch 3.0
No it did not.







































what u doing here? go make a new project!

















DON'T click here
Fraziisa
New to Scratch
1 post

A "Restart" -block

hi
MDCCCLXVII
Scratcher
1000+ posts

A "Restart" -block

Fraziisa wrote:

hi
introduce yourself in the new scratchers forum
Zoomer_X
Scratcher
500+ posts

A "Restart" -block

Stopping the project is supposed to make it so no more code runs. How could this happen?

The Question Mark Glitch
Sometimes in the editor, your costumes become gray question marks. If this happens, reload. If this happens, X-out the tab and DO NOT SAVE, EDIT, OR SEE INSIDE or the question mark will be permanent.
TheGlassPenguin
Scratcher
1000+ posts

A "Restart" -block

This would be very helpful. +1!
MDCCCLXVII
Scratcher
1000+ posts

A "Restart" -block

bump

Powered by DjangoBB