Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Stop other scripts in sprite seems to have no effect
- o-y
-
Scratcher
24 posts
Stop other scripts in sprite seems to have no effect
I made a project where a sprite would ask something to the user. For any word except “run”, it will add the word to the list. If the user enters the word “run”, it will hide the list and stop the loop (in order to stop asking questions). Although hiding the list works, stopping the loop doesn't.
I used this block in the pink custom block:

The other sprites have no function.
I used this block in the pink custom block:
stop [other scripts in sprite v]

The other sprites have no function.
Last edited by o-y (Nov. 5, 2021 19:11:39)
- awesome-llama
-
Scratcher
1000+ posts
Stop other scripts in sprite seems to have no effect
I found the issue and it is a bit weird.
The stop “other scripts in sprite” does not work in custom blocks.
Using stop “all” works though.
I am not sure what you want to do about this. You'll need to find some sort of alternative.
The stop “other scripts in sprite” does not work in custom blocks.
Using stop “all” works though.
I am not sure what you want to do about this. You'll need to find some sort of alternative.
- toto_28
-
Scratcher
29 posts
Stop other scripts in sprite seems to have no effect
I found the issue and it is a bit weird.Yes you're right I had this problem !
The stop “other scripts in sprite” does not work in custom blocks.
Using stop “all” works though.
I am not sure what you want to do about this. You'll need to find some sort of alternative.
- o-y
-
Scratcher
24 posts
Stop other scripts in sprite seems to have no effect
I used a variable to fix it, but is there a way I can stick with this?:
stop [other scripts in sprite v]
- donotforgetmycode
-
Scratcher
1000+ posts
Stop other scripts in sprite seems to have no effect
I think it would be better to do this:
Hope this helps
when green flag clickedYou don't need the custom block.
hide
show list [Code v]
delete all of [Code v] :: list
forever
ask [Enter something] and wait
add (answer) to [Code v]
if <(answer) = [run]> then
hide list [Code v]
stop [this script v]
end
end
Hope this helps

- o-y
-
Scratcher
24 posts
Stop other scripts in sprite seems to have no effect
I think it would be better to do this:In the future, the code in the custom block might become quite complex and a custom block would help organise it better. Right now, I used a variable to check it. Thanks for helping.
[scratchblockssnip]
You don't need the custom block.
Hope this helps

(I should report it as a bug)
Last edited by o-y (April 26, 2021 08:40:47)
- Discussion Forums
- » Help with Scripts
-
» Stop other scripts in sprite seems to have no effect