Stopping forever commands without a "Stop" script

id: 749921

category: Help with Scripts

posts: 10

-NewGame- -NewGame- loading
when green flag clicked
set [stop v] to [0]
wait (5) secs
broadcast [Walk v]
wait (10) secs
broadcast [Stop v]
when I receive [Walk v]
forever
switch costume to [Walk v]
repeat (5)
next costume
end
wait until <(stop) > [50]>
stop [all v]
end
when I receive [Stop v]
set [stop v] to [60]

This is what my code looks right now and I know something is wrong with it but I don't know what it is, so help please.
deck26 deck26 loading
Don't understand the question. Are you saying the stop all doesn't work? Share the project if so please.
-NewGame- -NewGame- loading
Sorry, I meant
stop [this script v]
I suspect that it's blocking the script but I'm not sure.
deck26 deck26 loading

-NewGame- wrote:

Sorry, I meant
stop [this script v]
I suspect that it's blocking the script but I'm not sure.
Still don't know what you're asking - that will stop the script.
TechNerd64 TechNerd64 loading

deck26 wrote:

-NewGame- wrote:

Sorry, I meant
stop [this script v]
I suspect that it's blocking the script but I'm not sure.
Still don't know what you're asking - that will stop the script.
I think he's talking about exiting the loop. Like a loop break
-NewGame- -NewGame- loading
The code where it says “When I receive: Stop, set stop to 60” does work when triggered but when “Stop this script” is activated it's being blocked by something and isn't going in order after the stop variable supposedly goes over 50. That's what I meant by I think its blocking the rest of the script
Daniakh16 Daniakh16 loading
نحن سكراتش المتفوق
Daniakh16 Daniakh16 loading
نحن سكراتش المتفوق
deck26 deck26 loading

-NewGame- wrote:

The code where it says “When I receive: Stop, set stop to 60” does work when triggered but when “Stop this script” is activated it's being blocked by something and isn't going in order after the stop variable supposedly goes over 50. That's what I meant by I think its blocking the rest of the script
What does the bit I've underlined mean? Is the script being stopped or not? The whole script will be stopped - it can't break out of a forever loop and continue with code after that. Code after a forever loop will never be run once the forever loop is triggered - you either let the forever loop continue or you stop the script completely.
-NewGame- -NewGame- loading
I thought about where you said “you either let the forever loop continue or you stop the script completely.” And had an idea. Does repeat commands work? If they can run for a certain amount of time could they open up a possibility?