Discuss Scratch
- Discussion Forums
- » Suggestions
- » Green Flag related blocks
- DifferentDance8
-
Scratcher
1000+ posts
Green Flag related blocks
I propose a suggestion where a couple of blocks are placed in a new extension (or can be put in existing categories).
Even if this doesn't make it into the actual scratch, it will probably turn into a extension, and have a thread in the respective thread.
Issues with the blocks, and my solutions:
Someone could potentially do this to the restart project block:
And it could crash someone's tab. To prevent this from happening, only run the restart block script once, then exit the script and move on (like a stop all block, but restarts the project first)
If you found more, then post them here and I will add yours to the list.
Even if this doesn't make it into the actual scratch, it will probably turn into a extension, and have a thread in the respective thread.
when green flag clicked [2] times :: extension hat // this will detect if the green flag is clicked two times, and only run the following script when that happens
<green flag clicked [2] times? :: extension> // can be used in if statements to only execute something when green flag is clicked X times
restart project :: extension cap // presses the green flag again, thus restarting the project
(green flag press counter :: extension) // calculates how many times the green flag was clicked
Issues with the blocks, and my solutions:
Someone could potentially do this to the restart project block:
when green flag clicked
forever
restart project :: extension cap
end
And it could crash someone's tab. To prevent this from happening, only run the restart block script once, then exit the script and move on (like a stop all block, but restarts the project first)
If you found more, then post them here and I will add yours to the list.
Last edited by DifferentDance8 (Sept. 5, 2022 09:17:40)
- josiah2001
-
Scratcher
87 posts
Green Flag related blocks
This sounds cool, it would be cool if they added these blocks.
- -Valtren-
-
Scratcher
1000+ posts
Green Flag related blocks
while the restart project might be good, you could just, you know, instruct people to click the flag
also, you can use variables. just make sure that it can only be reset manually
also, you can use variables. just make sure that it can only be reset manually
when green flag clicked
change [green flag clicked v] by (1)
- ScolderCreations
-
Scratcher
1000+ posts
Green Flag related blocks
A restart block is something I've always wanted. There are several cases, such as creating a speedrun mode, where I want to user to be able to reset the project with the press of a button. Obviously, that's a bit tricky to accomplish and requires every script to be rewritten.
- DifferentDance8
-
Scratcher
1000+ posts
Green Flag related blocks
while the restart project might be good, you could just, you know, instruct people to click the flagIt wouldn't be shown in the selection menu for variables.
also, you can use variables. just make sure that it can only be reset manuallywhen green flag clicked
change [green flag clicked v] by (1)
- -Valtren-
-
Scratcher
1000+ posts
Green Flag related blocks
can you clarify? I'm pretty sure it wouldwhile the restart project might be good, you could just, you know, instruct people to click the flagIt wouldn't be shown in the selection menu for variables.
also, you can use variables. just make sure that it can only be reset manuallywhen green flag clicked
change [green flag clicked v] by (1)
- DifferentDance8
-
Scratcher
1000+ posts
Green Flag related blocks
can you clarify? I'm pretty sure it wouldI thought you were talking about the custom block.
- -Valtren-
-
Scratcher
1000+ posts
Green Flag related blocks
I'm talking about the workaround and how it's simple enoughcan you clarify? I'm pretty sure it wouldI thought you were talking about the custom block.
- randomguy3513
-
Scratcher
1000+ posts
Green Flag related blocks
green flag is just to start and restart the project there shouldnt be a block for clicking it multiple times
- BendyOl183
-
Scratcher
500+ posts
Green Flag related blocks
this is a pretty good sounding suggestion. However, as @-Valtren- pointed out you can just use a variable for the counter. Another solution for the restart project block is to make the block stop working in a forever loop. Also, have these cool 3.0 visuals if you want.


Last edited by BendyOl183 (Sept. 6, 2022 17:54:59)
- lion334
-
Scratcher
100+ posts
Green Flag related blocks
I propose a suggestion where a couple of blocks are placed in a new extension (or can be put in existing categories).
Even if this doesn't make it into the actual scratch, it will probably turn into a extension, and have a thread in the respective thread.when green flag clicked [2] times :: extension hat // this will detect if the green flag is clicked two times, and only run the following script when that happens
<green flag clicked [2] times? :: extension> // can be used in if statements to only execute something when green flag is clicked X times
restart project :: extension cap // presses the green flag again, thus restarting the project
(green flag press counter :: extension) // calculates how many times the green flag was clicked
Issues with the blocks, and my solutions:
Someone could potentially do this to the restart project block:when green flag clicked
forever
restart project :: extension cap
end
And it could crash someone's tab. To prevent this from happening, only run the restart block script once, then exit the script and move on (like a stop all block, but restarts the project first)
If you found more, then post them here and I will add yours to the list.
Makes kinda sense, but there's always a workaround. Example, use a variable to count how many times the Flag has been pressed.
- Mr_Spooky12
-
Scratcher
14 posts
Green Flag related blocks
when stop clicked
Last edited by Mr_Spooky12 (Sept. 6, 2022 19:54:49)
- bentshaggyoil
-
Scratcher
100+ posts
Green Flag related blocks
when stop sign clicked :: events hat
that’s been rejected
Last edited by bentshaggyoil (Sept. 6, 2022 23:03:11)
- DifferentDance8
-
Scratcher
1000+ posts
Green Flag related blocks
TOLORS would say “hold my block”when stop clicked
- Discussion Forums
- » Suggestions
-
» Green Flag related blocks