Discuss Scratch

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:
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.
toto_28
Scratcher
29 posts

Stop other scripts in sprite seems to have no effect

awesome-llama wrote:

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.
Yes you're right I had this problem !
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:
when green flag clicked
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
You don't need the custom block.
Hope this helps
o-y
Scratcher
24 posts

Stop other scripts in sprite seems to have no effect

donotforgetmycode wrote:

I think it would be better to do this:
[scratchblockssnip]
You don't need the custom block.
Hope this helps
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.


(I should report it as a bug)

Last edited by o-y (April 26, 2021 08:40:47)

Powered by DjangoBB