how to make it so that after i recieve a broadcast a script stops? (and others)

id: 750525

category: Help with Scripts

posts: 4

1. Title
2. I'm making an art game and i want to have a color detector and I'm using brightness, saturation, and color sliders. I want all the said sliders to change when you press a key to the color that the mouse is currently touching.
medians medians loading
You could use stop other scripts in sprite/Stage (but this stops all other scripts as well), or you could use “stop this script” after the broadcast block. For that second one, if the broadcast block isn't in the script, you could use a variable:
For the first one:
when I receive [message v]
stop [other scripts in sprite v]
For the second:
when I receive [script v]
...
broadcast [message v]
stop [this script v]
And the last (sth like this)
when gf clicked
set [variable v] to [0]
when I receive [script v]
...
wait until <(variable) = [1]>
stop [this script v]
when I receive [message v]
set [variable v] to [1]
cs2975871 cs2975871 loading

Epic_Blue_Cat6412 wrote:

1. Title
2. I'm making an art game and i want to have a color detector and I'm using brightness, saturation, and color sliders. I want all the said sliders to change when you press a key to the color that the mouse is currently touching.
Not sure what code you're talking about… can you share the project so we can poke through it and figure out what you want from it?

cs2975871 wrote:

Epic_Blue_Cat6412 wrote:

1. Title
2. I'm making an art game and i want to have a color detector and I'm using brightness, saturation, and color sliders. I want all the said sliders to change when you press a key to the color that the mouse is currently touching.
Not sure what code you're talking about… can you share the project so we can poke through it and figure out what you want from it?
here's the project; https://scratch.mit.edu/projects/956938481/editor/