I use "launch say 'goal' for 2 sec". But when the user stops the game the message should disappear immediately. I tried to use "stop other scripts in sprite" but it does not work. How can I stop the background task?
"stop all but this script" works.
stop [all but this script] stops all background scripts - is that is what you were actually looking for?
Is a background task a first-class value, which can be stored in a variable in order to stop just the stored task?
Scripts are first-class, so they can be stored in a variable or something else.
For background tasks I don't know.
AFAIK You can't get a ref to the launched task but techniques such as this may do what you want
AFAIK processes are not first-class (yet). That would be a useful feature, I think - though I couldn't say whether it's very complicated and/or has any undesirable consequences.
I have a solution now, but the forum does not allow me to include it in this post.
You could still try to explain it.
I am miffed that I am not allowed to include code examples although other people can do so.
People who are new to the forums don't immediately gain the ability to include code examples, it's just a precaution.
Its just to prevent spam from malicious actors - once you've read/posted a few more times - your trust level will go up
I can't help thinking that THIS SCRIPT or THIS CALLER or THIS CONTINUATION could be useful, but nothing that I tried worked. :~/