Discuss Scratch
- Discussion Forums
- » Suggestions
- » Ability to stop certain scripts or sprites
- megaman100
-
Scratcher
100+ posts
Ability to stop certain scripts or sprites
I got a new idea! We should have the ability to stop specific scripts.
If you want to know more about adding names to scripts check out my proposal about adding names to scripts here.
stop script [script 1 v] in [myself v]:: control
If you want to know more about adding names to scripts check out my proposal about adding names to scripts here.
Last edited by megaman100 (Aug. 21, 2018 18:21:19)
- TheAdriCoolManDude
-
Scratcher
1000+ posts
Ability to stop certain scripts or sprites
Just use the
stop [this script v]under the script you wanna stop.
- megaman100
-
Scratcher
100+ posts
Ability to stop certain scripts or sprites
Just use theThat won't work! I'm suggesting a block that can stop other specific scripts.stop [this script v]under the script you wanna stop.
- TheAdriCoolManDude
-
Scratcher
1000+ posts
Ability to stop certain scripts or sprites
Just use the block I said and put it under the script you wanna stop.Just use theThat won't work! I'm suggesting a block that can stop other specific scripts.stop [this script v]under the script you wanna stop.
- megaman100
-
Scratcher
100+ posts
Ability to stop certain scripts or sprites
It only works if it's in the same script that needs to be stopped.Just use the block I said and put it under the script you wanna stop.Just use theThat won't work! I'm suggesting a block that can stop other specific scripts.stop [this script v]under the script you wanna stop.
- TheAdriCoolManDude
-
Scratcher
1000+ posts
Ability to stop certain scripts or sprites
Yeah, that is why we don't need it.It only works if it's in the same script that needs to be stopped.Just use the block I said and put it under the script you wanna stop.Just use theThat won't work! I'm suggesting a block that can stop other specific scripts.stop [this script v]under the script you wanna stop.
- -FrozenFlame-
-
Scratcher
100+ posts
Ability to stop certain scripts or sprites
This can somewhat simply worked-around.
Create a variable. When the variable is set to something, then the script stops.
Create a variable. When the variable is set to something, then the script stops.
(stop?)
when green flag clicked
set [stop? v] to [no]
...
set [stop? v] to [yes]
//meanwhile on the other script
...
wait until <(stop?) = [yes]> //the same can be achieved with a forever loop and an if, or a repeat until
stop [this script v]
- megaman100
-
Scratcher
100+ posts
Ability to stop certain scripts or sprites
That's not the block we need! I'm suggesting a block that can be put inside a script that stops another script. Also, my suggestion can stop scripts in other sprites as well.Just use the block I said and put it under the script you wanna stop.Just use theThat won't work! I'm suggesting a block that can stop other specific scripts.stop [this script v]under the script you wanna stop.
Last edited by megaman100 (Aug. 24, 2018 20:17:51)
- JETJcoder
-
Scratcher
5 posts
Ability to stop certain scripts or sprites
it isn't needed, imagine if it did exist
how would the scripts be labeled?
it would be cool if it exist and was able to stop custom blocks
how would the scripts be labeled?
it would be cool if it exist and was able to stop custom blocks
define custom
...
stop script [custom v]:: control stack
Last edited by JETJcoder (Aug. 24, 2018 21:26:19)
- red_king_cyclops
-
Scratcher
500+ posts
Ability to stop certain scripts or sprites
You could just use broadcasting:That's not the block we need! I'm suggesting a block that can be put inside a script that stops another script. Also, my suggestion can stop scripts in other sprites as well.Just use the block I said and put it under the script you wanna stop.Just use theThat won't work! I'm suggesting a block that can stop other specific scripts.stop [this script v]under the script you wanna stop.
when green flag clickedHowever, using broadcasting like this can only stop whole sprites.
...::grey
broadcast [stop v]
when I receive [stop v]
stop [other scripts in sprite v]
stop [this script v]
- acuccoder
-
Scratcher
85 posts
Ability to stop certain scripts or sprites
To stop the sprite use:
stop [other scripts in sprite v]
stop [this script v]
- PicoMetrics
-
Scratcher
1000+ posts
Ability to stop certain scripts or sprites
it isn't needed, imagine if it did existBut what if there was a forever loop with that custom in there? That wouldn't work!
how would the scripts be labeled?
it would be cool if it exist and was able to stop custom blocksdefine custom
...stop script [custom v]:: control stack
off topic
- the2000
-
Scratcher
1000+ posts
Ability to stop certain scripts or sprites
I support. Occasionally I find myself in situations where this would be a more convenient solution than what I had to do.
- Discussion Forums
- » Suggestions
-
» Ability to stop certain scripts or sprites







