I need help stopping movement on my sprite when the score reaches 15

I want my sprite to stop moving whenever the score reaches 15 and I want it to say "you won!" but when I put a "when" block down it continues to forever say "you won" as well as doesn't stop my movement scripts. please help.
link to project: Snap! Build Your Own Blocks

What I'd recommend is put a forever loop outside all the blocks like the [STOP ALL BUT THIS SCRIPT] Block and the [SAY "You Won!"] Block to ensure that all the scripts will stop. It's the simplest solution I could give.

I could also provide a screenshot for you.

EDIT: The simplest solution is often the one that doesn't work the best and, is in fact, the worst solution possible. You probably need to do more than just...put everything in a FOREVER Loop. You have to make a Script Variable, set it to some boolean value...and then when the game ends the boolean value becomes false, stops some scripts, etc. Here here, I'll just provide some screenshots.

okay thank you i genuinely tried everything I could think of so I'm kinda stumped.

I know that I shouldn't be providing all the code for projects that people need help on...but there's definitely no way I can explain what I just did to your code to make it work without, you know, showing ALL the code.

I'm a bad explainer and sometimes I go off on tangents for like 2 hours before returning back to the main focus.

nah u good its fine if u go off explaining to me bc im new to coding and id like to learn lmao. so I found a problem with the code u put in, everytime I press the green flag after the score amount is reached the game value stays at true instead of resetting to false when the flag is pressed.

it works now. instead of using the when block I just put it in a forever if
I cant embed the script pic for some reason but oh well


this script works too

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.