Is it possible to stop a function (custom block) while it is running in Scratch?

Viewed 568

Can I stop code in a certain script from running when it is in another script? I know there is a stop block, but you can only stop the current script, all other scripts, or all scripts.

2 Answers

Here's a workaround: Create another hidden sprite with only the script you want to stop and the script you want to stop the first script. Then use a stop other scripts block on the empty sprite. You can use broadcast messages to signal the blank sprite when to stop the script.

you do a "stop this script" inside the custom block. this will not stop the code you are using the custom block in.

Related