Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scratch Green Flag Issue
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
Hi Scratch Team! There Is A Major Major Issue That Sometimes Happens And It Is REAL BAD, The Green Flag Sometimes Rarely Stopped Working! Even If I Load And Unload The Game, It Still Doesnt Work, The Green Flag Command Doesnt Work And It Completly Broke My Game! And It Happens Sometimes To Many Other Projects, Pls Guys, Can You PLS Find An Answer Or Solution To This?
- EpicGhoul993
-
Scratcher
1000+ posts
Scratch Green Flag Issue
Is this another “aaaaaaa pls click green flag twice to run the game!!!!” problem? Can you describe it in more detail?
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
@EpicGhoul993 It Started In Turbowarp, Where I Made The Project, It Suddenly Happened That All Green Flag Commands Stopped Working, What I Mean Is That Any Code Attached To The I“ If Flag Pressed ” Command Stopped Working, And Beacuse Of This, It Completly Broked The Game ( heck, i cant even get out of main menu ) I Coudnt Do Anything. I Loaded The Data To Google Scratch, But Doesnt Work, Loading And Reloading And Restarting Doesnt Work Either, No Matter How Many Times I Click The Green Flag, It Doesnt Work Beacuse No Green Flag And Other Code Attached To It Worked Or Triggered At ALL, I Seriously Dont Know What Happened, It Happened With My Old Game, Maze Maker, But This Time, I Didnt Update The Game At All, And It Still Happened, I Have No Idea What It Causes
Last edited by FabianBubozaur3 (Sept. 9, 2024 15:01:05)
- GameCatastrophe0927
-
Scratcher
1000+ posts
Scratch Green Flag Issue
Can you upload the project and send a link? It would help us understand the issue if we can see it for ourselves. Also if you capitalize every word it's kinda hard to read.
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
https://scratch.mit.edu/projects/968331517/
Go Into The Editor, Check The I“ f Flag Pressed ” Commands And You Will Get The Point
Go Into The Editor, Check The I“ f Flag Pressed ” Commands And You Will Get The Point
Last edited by FabianBubozaur3 (Sept. 9, 2024 15:06:53)
- EpicGhoul993
-
Scratcher
1000+ posts
Scratch Green Flag Issue
I don't see anything wrong with Turbowarp or Scratch editor related to green flag yet. Kinda tempted to test on your most recently shared project, but I don't want to make my laptop explode so maybe someone else can come over and try for themselves.
Was there anything special in the project code? Too many sprites? Too many scripts? 20 green flag hats in a single sprite? Any variable jumble? Any heat spike in your CPU? Anything?
Also please stop Capitalizing Every Single First Letter please it takes me way too long to see which word I should read first
Was there anything special in the project code? Too many sprites? Too many scripts? 20 green flag hats in a single sprite? Any variable jumble? Any heat spike in your CPU? Anything?
Also please stop Capitalizing Every Single First Letter please it takes me way too long to see which word I should read first
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
No? its a regular game, Other that it maybe has a ton of Asstes? Over 1400 In Total
Last edited by FabianBubozaur3 (Sept. 9, 2024 15:08:33)
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
I will reply tommorow and answer beacuse i dont have much time so tommorow i will reply
- EpicGhoul993
-
Scratcher
1000+ posts
Scratch Green Flag Issue
I will reply tommorow and answer beacuse i dont have much time so tommorow i will replyIt's alright. Stay calm, don't worry too much.
Project seems to work fine in both project page and Turbowarp's editor page (I didn't try Scratch's editor page because of loading times but I can assume it would run normally too). Clicking on green flag scripts gives the expected outcome.
My only recommendation that I can think of right now is to use less green flag blocks. Turbowarp told me that there are 102 green flag scripts just in the first 10 sprites, and who knows how many are in the rest. Ensure that there are no scripts directly in conflict with each other, so you don't run into double flag* situations.
*Oversimplified example of “double flag”:
(GAME OVER) //currently set to "true"The order that the blocks are run in is practically random, so the second script can be run before the first, making you need to press green flag twice to properly reset the GAME OVER variable.
when green flag clicked
set [GAME OVER v] to [false]
when green flag clicked
forever
if <(GAME OVER) = [true]> then
stop [all v]
end
end
“Practically” because you pretty much need to go outside of Scratch to see the order and yeahhhh who even has time to do that anyway
Last edited by EpicGhoul993 (Sept. 9, 2024 15:33:19)
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
i will try to unite some scripts that use green blocks to a script only using 1 green block, that way, i can optimize the green blocks a bit and reduce the amount, Thanks For The Tip! ( Also there Are Many other Sprites that Use Lot Less green flags, But there are some sprites that have a lot of green Blocks So your message has a good point, Definetly attempting to optimize it
Last edited by FabianBubozaur3 (Sept. 10, 2024 13:19:40)
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
When looking at my code, I Think that it is easy to fix, beacuse there even is a Few Code Scripts that Basically repeat themselfs while Having Green Blocks, if the Green Block Overusage is the main problem, this can work well unless the script amount in every green block also can be the reason why it doesnt function
- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
THANKS, The Issue Was Fixed, I started by optimizing the green blocks by deleting few hundreds of them and uniting some code that had green blocks attached to it, then, i started changing the green blocks to backdrop switches commands, and after doing this for a LONG time, the green blocks suddenly worked! thanks overall for the tip! the only thing i hate about the process is that when you mess something up, for example, green blocks dont work, it takes a lot more effort to recover, and sometime a few backdrop switches also didnt work, but i like that the game is fixed, now i have to hope that this wont happen again
- J41n
-
Scratcher
100+ posts
Scratch Green Flag Issue
The order that the blocks are run in is practically random, so the second script can be run before the first, making you need to press green flag twice to properly reset the GAME OVER variable.I actually didn’t know this and I’ve been on scratch for a long time
“Practically” because you pretty much need to go outside of Scratch to see the order and yeahhhh who even has time to do that anyway

:facepalm:
- EpicGhoul993
-
Scratcher
1000+ posts
Scratch Green Flag Issue
I actually didn’t know this and I’ve been on scratch for a long timeThe more you know, I guess? It's good to learn something new every day

- FabianBubozaur3
-
Scratcher
15 posts
Scratch Green Flag Issue
ok, i think that i know what caused this issue, there was a cloud variable that was meant to ban players that cheat. and when a specific button is pressed, the cloud variable had the same letter as the username, so the game stopped instantly, so the player could only refresh the browser to stop this. and the cloud variable that constantly stopped the game actually prevented the green flag variables from activating. so they didnt work, thats why, but there was a different game i made that the game glitched out and the green flag variables didnt work anymore, but it wasnt beacuse of cloud variables or anything that stops the game depending on the specific letters the variable had, so it still is a mystery.
- Discussion Forums
- » Help with Scripts
-
» Scratch Green Flag Issue
