Discuss Scratch
- Discussion Forums
- » Suggestions
- » Send Broadcast To Only A Specific Sprite(s)
- Charles12310
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
You know how broadcasts send them to all sprites and receive them? Well, what about sending broadcasts to only specific ones?
Let's say you put a script on when a broadcast is received on one sprite, and you put a different script when a broadcast is received on another sprite. You want that only one sprite to receive the broadcast, but then the other sprites receive the broadcast too, scripting them making the project functions not what you want them to be.
Or just put the blocks without the define block in a script if you don't want them to run quickly.
SUPPORTERS
Let's say you put a script on when a broadcast is received on one sprite, and you put a different script when a broadcast is received on another sprite. You want that only one sprite to receive the broadcast, but then the other sprites receive the broadcast too, scripting them making the project functions not what you want them to be.
// It can look like this:But If you want to send a broadcast to more than one sprite, quickly, just do this:
send broadcast [ v] to [sprite v] :: events // "Myself" would also be included in the dropdown, just like creating a clone.
// Or this:
broadcast [ v] to [sprite v] :: events
// Run this block without Screen Refresh:
define send broadcast to 3 sprites
broadcast [event v] to [sprite 1 v] :: events
broadcast [event v] to [sprite 2 v] :: events
broadcast [event v] to [sprite 3 v] :: events
Or just put the blocks without the define block in a script if you don't want them to run quickly.
SUPPORTERS
@Charles12310NO SUPPORTERS
@LionHeart70
@FancyFoxy
Last edited by Charles12310 (Aug. 2, 2017 22:36:18)
- LionHeart70
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
Support. This would be useful.
- FancyFoxy
-
500+ posts
Send Broadcast To Only A Specific Sprite(s)
You can work around by just making a new broadcast that only gets picked up by one sprite.
And if you don't want to put the same script twice or more, just use custom blocks.
No support, as I don't feel like it's really necessary.
And if you don't want to put the same script twice or more, just use custom blocks.
No support, as I don't feel like it's really necessary.
- WaffleChurro
-
100+ posts
Send Broadcast To Only A Specific Sprite(s)
No support because you can just ignore the broadcast that don't mean anything to the sprite 

- yzyzyz
-
500+ posts
Send Broadcast To Only A Specific Sprite(s)
No support. This will make things a lot more complicated.
- bigpuppy
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
I think this is a good idea – sometimes broadcast lists get really long.
Also, by default, I think the dropdown should be at “all”:


Also, by default, I think the dropdown should be at “all”:
broadcast [ v] to [all v] :: eventsThis would help people that didn't want to broadcast things to different sprites do stuff quicker.

- Charles12310
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
nah, the regular broadcast block it the alternate of all. I think this is a good idea – sometimes broadcast lists get really long.![]()
Also, by default, I think the dropdown should be at “all”:broadcast [ v] to [all v] :: eventsThis would help people that didn't want to broadcast things to different sprites do stuff quicker.
Here is another reason: Maybe all sprite have the same script when received, but what if you want them to happen at different times?
- VideoGamerCanInvent
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
It doesn't really make a difference to the current broadcast system.
- Galleigo
-
500+ posts
Send Broadcast To Only A Specific Sprite(s)
Workaround
when I receive [a v] // make multiple broadcasts, dude.
when I receive [b v] // i'm not sure why you only need one broadcast
- walkcycle
-
500+ posts
Send Broadcast To Only A Specific Sprite(s)
Broadcast means it goes to everyone tuned to receive the broadcast. So, either don't have a receive hat on a specific sprite (for a specific broadcast) or use a stage variable to control how (or whether) a specific sprite that receives a broadcast acts on it.
- Botcho_Otkho
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
removed
Last edited by Botcho_Otkho (July 19, 2020 16:46:29)
- megaman100
-
100+ posts
Send Broadcast To Only A Specific Sprite(s)
Support!
Last edited by megaman100 (Nov. 24, 2018 04:52:59)
- TheAdriCoolManDude
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
Why do you support? Support!
Anyways, No Support, just leave the sprites that don't need the broadcast ignoring it, and send it to the sprite that needs it.
- LuckyLucky7
-
1000+ posts
Send Broadcast To Only A Specific Sprite(s)
Why do you support? Support!
Anyways, No Support, just leave the sprites that don't need the broadcast ignoring it, and send it to the sprite that needs it.
Workaroundwhen I receive [a v] // make multiple broadcasts, dude.
when I receive [b v] // i'm not sure why you only need one broadcast
It doesn't really make a difference to the current broadcast system.
No support for all of the above. No support because you can just ignore the broadcast that don't mean anything to the sprite
- CKCG
-
100+ posts
Send Broadcast To Only A Specific Sprite(s)
No support. Just create more broadcasts. It's such an easy workaround that it's unneccesary.
- AnAccount_StopAsking
-
500+ posts
Send Broadcast To Only A Specific Sprite(s)
Duplicate.It's closed.
- ScratchUser139
-
73 posts
Send Broadcast To Only A Specific Sprite(s)
If you really want one here ya go:
ask [Who's going to dance next?] and wait
set [who's receiving do a cool dance v] to (answer)
broadcast [do a cool dance v] and wait
play sound [Hooray! v] until done
when I receive [do a cool dance v] // in Gobo's code
if <(who's receiving do a cool dance) = [Gobo]> then
point in direction (45 v)
repeat (4)
repeat (10)
move (10) steps
end
turn cw (90) degrees
end
end
when I receive [do a cool dance v] // in Tera's code
if <(who's receiving do a cool dance) = [Tera]> then
set rotation style [left-right v]
repeat (5)
point in direction (90 v)
glide (1) secs to x: (50) y: (100)
point in direction (-90 v)
glide (1) secs to x: (50) y: (-50)
end
end
- nikky10000000
-
500+ posts
Send Broadcast To Only A Specific Sprite(s)
just leave the sprites you don't wanna give the broadcast to empty. if you wanna receive a brodcast for different sprites at different times, then make multiple. no support.
- Discussion Forums
- » Suggestions
-
» Send Broadcast To Only A Specific Sprite(s)