Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to stop all sprites
- blackswan2428
-
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
- Scratch-Minion
-
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.
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.
- DaEpikDude
-
1000+ posts
how to stop all sprites
If you have any of these cap blocks:
The biggest problem is probably “when key pressed”. You can replace all of those blocks with:
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:
- deck26
-
1000+ posts
how to stop all sprites
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
with a possible timer reset before the stop.
- Za-Chary
-
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.
OP, if you need it re-opened, either make a new topic, or report this one and ask for it to be re-opened.
- Discussion Forums
- » Help with Scripts
-
» how to stop all sprites