Discuss Scratch

blackswan2428
Scratcher
70 posts

how to stop all sprites

I've tried everything to stop all sprites but the one that I can control still moves when I put the stop all block
asivi
Scratcher
1000+ posts

how to stop all sprites

stopall
Scratch-Minion
Scratcher
1000+ posts

how to stop all sprites

Keyboard event scripts will run even though your project is not running.
This happens after “stop all”.

To prevent this, add a variable such as Project Running to your project.
Set Project Running to true after the Green Flag.
Set Project Running to false all when you stop your project.

In the Keyboard event scripts, first check if Project Running = true before running the script in them.

whenright arrowkeypressedifProjectRunning=truethen
blackswan2428
Scratcher
70 posts

how to stop all sprites

It still moves
Atusiff
Scratcher
100+ posts

how to stop all sprites

whenclickedforeverstopall
DaEpikDude
Scratcher
1000+ posts

how to stop all sprites

If you have any of these cap blocks:
when...keypressedwhenthisspriteclickedwhenbackdropswitchestowhen...>10
Those can still run even after the project is stopped. Hence why “when timer > 0” is an unstoppable script.
The biggest problem is probably “when key pressed”. You can replace all of those blocks with:
whenclickedforeverifkey...pressed?then. . .
asqwde
Scratcher
1000+ posts

how to stop all sprites

foreverstop
deck26
Scratcher
1000+ posts

how to stop all sprites

asqwde wrote:

foreverstop
And where would that go? Assuming you mean ‘stop all’ the script doing that would only actually run once. If it was triggered by a key press or whatever it doesn't need a forever loop and once it has stopped the other key press scripts etc would still work.

The only way it would work is if the project constantly reset the timer when it was running and you had something like

whentimer>0.05stopall
with a possible timer reset before the stop.
twirll
Scratcher
27 posts

how to stop all sprites

whenIreceivestop allforeverstopall

Hope I helped


check out my account twirll

Last edited by twirll (Nov. 9, 2017 16:33:08)

deck26
Scratcher
1000+ posts

how to stop all sprites

twirll wrote:

whenIreceivestop allforeverstopall

Hope I helped


check out my account twirll
Doesn't help to stop scripts with the header blocks described though. They will function whether or not the project is running.
Emerald2019
Scratcher
1 post

how to stop all sprites

Do This To stop
stop all
deck26
Scratcher
1000+ posts

how to stop all sprites

Emerald2019 wrote:

Do This To stop
stop all
Please don't necropost.
Za-Chary
Scratcher
1000+ posts

how to stop all sprites

This topic is rather old, so I'll be closing it to prevent further necroposts.

OP, if you need it re-opened, either make a new topic, or report this one and ask for it to be re-opened.

Powered by DjangoBB