Discuss Scratch
- Discussion Forums
- » Suggestions
- » Run Green Flag block
- A-MARIO-PLAYER
-
1000+ posts
Run Green Flag block
Revival of this topic which was closed by the OP. I am recreating the topic and taking responsibility over the suggestion again, just as I did before my other Run Green Flag topic was merged with the closed topic I linked.
This is inspired by Scratch 0.x (because the green flag didn't exist, and you had two wave blocks instead) and a Scratch mod related to a species of flightless birds.
This block basically emulates clicking the green flag. E.g.
It could be used for restarting if the player makes a mistake.
Other versions:
Mockups in 3.0, made here by han614698: Note this still uses the color from Events

In my original topic about this (which was merged with the one that got closed,) the block used to be in Events. However, the stop all block is in Control, and the run green flag block in the penguin version of Scratch is also in Control, so it makes more sense to have this block in control.
This is inspired by Scratch 0.x (because the green flag didn't exist, and you had two wave blocks instead) and a Scratch mod related to a species of flightless birds.
click @greenFlag :: control
This block basically emulates clicking the green flag. E.g.
when [space v] key pressed
click @greenFlag :: control
when green flag clicked
turn cw (22.5) degrees
It could be used for restarting if the player makes a mistake.
Other versions:
click @greenFlag :: sensing // Sensing category
click @greenFlag :: control cap // Cap
run @greenFlag :: control // Alternative name
Mockups in 3.0, made here by han614698: Note this still uses the color from Events

In my original topic about this (which was merged with the one that got closed,) the block used to be in Events. However, the stop all block is in Control, and the run green flag block in the penguin version of Scratch is also in Control, so it makes more sense to have this block in control.
Last edited by A-MARIO-PLAYER (Sept. 10, 2024 22:54:37)
- TheEpikGamer211
-
1000+ posts
Run Green Flag block
when green flag clickedsgary
run @greenFlag :: events
- A-MARIO-PLAYER
-
1000+ posts
Run Green Flag block
can you explain please?when green flag clickedsgary
run @greenFlag :: events
- TheEpikGamer211
-
1000+ posts
Run Green Flag block
I thinke that would crash scartch can you explain please?
Last edited by TheEpikGamer211 (Sept. 10, 2024 17:42:13)
- A-MARIO-PLAYER
-
1000+ posts
Run Green Flag block
it wouldnt I thinke that would crash scartch
if you run that script in the penguin version of scratch, it just acts like putting a forever block with nothing inside under a when gf clicked block.
tldr:
when gf clicked=
run @greenFlag :: control
when gf clicked
forever
Last edited by A-MARIO-PLAYER (Sept. 10, 2024 17:45:00)
- DangerPuppy10
-
1000+ posts
Run Green Flag block
What would happen if somebody did this?
when green flag clicked
forever
click @greenFlag ::control
end
- -Rodri
-
1000+ posts
Run Green Flag block
for your example couldnt you just do:
(maybe this isnt a good solution in all cases, but I'm no coding pro lol :p)
when [space v] key pressed
turn ccw (22.5) degrees
when green flag clicked
turn ccw (22.5) degrees
(maybe this isnt a good solution in all cases, but I'm no coding pro lol :p)
Last edited by -Rodri (Sept. 10, 2024 21:40:36)
- A-MARIO-PLAYER
-
1000+ posts
Run Green Flag block
What if you had much more scripts there? Waste of valuable project.json storage. for your example couldnt you just do:when [space v] key pressed
turn ccw (22.5) degrees
when green flag clicked
turn ccw (22.5) degrees
Edit spy

Last edited by A-MARIO-PLAYER (Sept. 10, 2024 21:41:15)
- MagicCoder330
-
1000+ posts
Run Green Flag block
maybe make it so int only works every 10 seconds? that would fix some problems I thought it might have.
- TheCreatorOfUnTV
-
1000+ posts
Run Green Flag block
So, like this?
broadcast [Scratch-StartClicked v] and wait // This would restart the project from the green flag in Scratch 1.4.
- A-MARIO-PLAYER
-
1000+ posts
Run Green Flag block
yeah So, like this?broadcast [Scratch-StartClicked v] and wait // This would restart the project from the green flag in Scratch 1.4.
but you can't do that in scratch 3.0 anymore bruh
- TheCreatorOfUnTV
-
1000+ posts
Run Green Flag block
I know - I never suggested it as a workaround.yeah So, like this?broadcast [Scratch-StartClicked v] and wait // This would restart the project from the green flag in Scratch 1.4.
but you can't do that in scratch 3.0 anymore
Last edited by TheCreatorOfUnTV (Sept. 10, 2024 22:20:33)
- Za-Chary
-
1000+ posts
Run Green Flag block
Expanding on this: when you code a project and you use the “when green flag clicked” block, replace it with this block: why can't you use broadcasts
Banana
when I receive [green flag v]
Then, never use the “when green flag clicked” block, except for one single time where you include this script somewhere:
when green flag clicked
broadcast [green flag v]
Now, whenever you want to use your proposed block, just use "broadcast [green flag v]" instead. This workaround is pretty useful and easy to make.
- A-MARIO-PLAYER
-
1000+ posts
Run Green Flag block
bump
(i swear i need to create a cubeupload account and make myself a personal bump image)
(i swear i need to create a cubeupload account and make myself a personal bump image)
- yadayadayadagoodbye
-
1000+ posts
Run Green Flag block
That would effectively be the same as What would happen if somebody did this?when green flag clicked
forever
click @greenFlag ::control
end
when green flag clicked
click @greenFlag ::control
because when the green flag is clicked, any previous running code is stopped
- Discussion Forums
- » Suggestions
-
» Run Green Flag block