Discuss Scratch
- Discussion Forums
- » Suggestions
- » Break out of Loop block
- Zydrolic
-
Scratcher
1000+ posts
Break out of Loop block
(#17)I have a proper argument.
TAKE THAT! If the condition is something that will be different when it reaches the final part of the code then it needs to break the loop there so the condition is the same.
this is not a good argument but I am trying to get this suggestion accepted now, whatever it may take
Just create checksums for it.
- WindowsMeRules2000
-
Scratcher
500+ posts
Break out of Loop block
I am extremely confident this is a dupe but i’m too lazy to searchStop(this loop v) ::controlthis would be a scratch block that when used, does what it says, breaks out of a loop!
(example)
|
|
|
Vwhen green flag clicked
set [my variable v] to [0]
set [ random variable v] to (pick random (1) to (900))
repeat (900)
change [my variable v] by (1)
if < (my variable) = (random variable) > then
Stop(this loop v) ::control
end
end
do whatever now
(for context, if a loop is inside a loop it wont stop both loops, only the one its in.)
(this wont do anything outside a loop)
- ajskateboarder
-
Scratcher
1000+ posts
Break out of Loop block
I am extremely confident this is a dupe but i’m too lazy to searchThis is indeed a duplicate of this topic by the god-tier forumer, theonlygusti
- AdityasWorldOffic
-
Scratcher
62 posts
Break out of Loop block
For 2, the repeat until block basically repeats the things inside until the certain requirement is met. The the loop will stop. Very simple1. I am being nice, I was just wondering a question which I put in small tags which didn't have to be noticed by anyone which wasn't meant to cause any offensefirst of all, __Falcon-Games__, be nice, second of all, look:oh i understand now this would be pretty useful for stuffwhy aren't kids more smarter?stop [this script v]This block exists already
They mean break out of the current loop, not break out of the current script/stop the script.repeat until <>amazing, right?
end
2. What does that have to do with this suggestion?
- Skyraiderr
-
Scratcher
36 posts
Break out of Loop block
sorry i did not all the way read it
Last edited by Skyraiderr (Sept. 9, 2023 15:33:39)
- cosmosaura
-
Scratch Team
1000+ posts
Break out of Loop block
Thanks for the link! It does look like this is a duplicate topic so I'll close it to keep the conversation all in one place. Please use the existing topic in the link above.I am extremely confident this is a dupe but i’m too lazy to searchThis is indeed a duplicate of this topic by the god-tier forumer, theonlygusti
- Discussion Forums
- » Suggestions
-
» Break out of Loop block







