Discuss Scratch

Charles12310
Scratcher
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.

// It can look like 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
But If you want to send a broadcast to more than one sprite, quickly, just do this:

// 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
@Charles12310
@LionHeart70
NO SUPPORTERS
@FancyFoxy

Last edited by Charles12310 (Aug. 2, 2017 22:36:18)



Click This Link For Some Secrets About Me!
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
LionHeart70
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

Support. This would be useful.

lh70 / nora/tobi / she-they pronouns / pansexual-demisexual / 14 / sagittarius / furry / artist / intp / stop-motion films / lbp / fall out boy / panic! at the disco / twenty one pilots / stranger things / a series of unfortunate events
“When you have a bad day, a really bad day, try and treat the world better than it treated you.” -Patrick Stump
“Music seems to hold everything together. It seems to make things not so chaotic sometimes. It seems to make things make more sense sometimes.” -Tyler Joseph
“You'll fear your fears forever if you never do things you're afraid of.” -Josh Dun
“I'm still figuring out who I am, but I know I'm not who I was.” -Brendon Urie
FancyFoxy
Scratcher
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.

THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
WaffleChurro
Scratcher
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

Lets ban Minimods together.
yzyzyz
Scratcher
500+ posts

Send Broadcast To Only A Specific Sprite(s)

No support. This will make things a lot more complicated.

hi! I'm yzyzyz, the owner of the #bring_it_back studio, a sticky, 400+ projects and 500+ posts.
I am an active scratcher.

advertise in my signature!
ad:Urgently need a popular animation? If you do, check out Every Time I Share A Project, by Randomness-TV!
bigpuppy
Scratcher
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”:

broadcast [ v] to [all v] :: events
This would help people that didn't want to broadcast things to different sprites do stuff quicker.

“The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart.”
- Helen Keller
“Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that.”
- Martin Luther King, Jr.
“Try to be a rainbow in someone's cloud.”
- Maya Angelou
- thanks to brainyquote.com for the quotes -


Charles12310
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

bigpuppy wrote:

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] :: events
This would help people that didn't want to broadcast things to different sprites do stuff quicker.
nah, the regular broadcast block it the alternate of all.

Here is another reason: Maybe all sprite have the same script when received, but what if you want them to happen at different times?


Click This Link For Some Secrets About Me!
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
VideoGamerCanInvent
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

It doesn't really make a difference to the current broadcast system.


Galleigo
Scratcher
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

((╯°□°)–︻╦╤─ – – – :: sensing) :: pen cap
Blocky, a young guard block, guards my signature from kumquats. Still trying to teach him how to shoot the kumquat instead of my signature. By the way, all these coloured URLs still work. Cool, huh? (Sorry for the insane bolding, italicising and underlining. :P)
CYBERSPHERE. They keep coming. It never ends. Can't stop. Won't stop.
My shop is here. Go check it out!
BEAT. How fast are your reflexes?
Space Debris.Tiny floating colourful particles. Nothing much.
Do YOU want to rule? Let's discuss the Rules for Rulers.
Interested in space? Check out The Solar System - Our Home in Space. I was too lazy to colour that one.
ORBIT. Dodge everything to survive!
walkcycle
Scratcher
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
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

No support at all. I'll make an example why no support:
There are three sprites named “one”,“two” and “three”.
I need to send a broadcast from “one” to “three”.
The broadcast is called “sender”.
I just put “sender” in “three” and ignore “two”,without adding any
when I receive [sender v]
block.

This is a signature, meaning this automatically appears under my posts. (This is for people who may be confused about this)
Freddie Mercury lover <3 <3 <3 - Wiki editor - Catholic - Forum Helper - Italian - 14 years old - Sagittarius - I use Windows 7 Ultimate and Google Chrome - Guitar, Stranger Things <3 <3 - I often forget things :P
megaman100
Scratcher
100+ posts

Send Broadcast To Only A Specific Sprite(s)

Support!

Last edited by megaman100 (Nov. 24, 2018 04:52:59)

TheAdriCoolManDude
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

megaman100 wrote:

Support!
Why do you 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.

I would be perfectly fine listing all the featured creators going to Vidcon 2019
LuckyLucky7
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

TheAdriCoolManDude wrote:

megaman100 wrote:

Support!
Why do you 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.

Galleigo wrote:

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

VideoGamerCanInvent wrote:

It doesn't really make a difference to the current broadcast system.

WaffleChurro wrote:

No support because you can just ignore the broadcast that don't mean anything to the sprite
No support for all of the above.

I have about 2750 posts, 65 shared projects, 150 total created/followed topics, and 120 followers.
CKCG
Scratcher
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.

(in Harry Potter and the Deathly Hallows) JK Rowling wrote:

¨Sir, is this real or in my head?¨
¨Well of course it´s in your head, Harry, but that doesn't mean it's not real."

Aristotle wrote:

“It is during our darkest moments that we must focus to see the light.”


[scratchblocks]

when green flag clicked
if <(are the parakeets here? :: #084f01) = true :: operators> :: control
hooray! :: looks
while the parakeet are here {
GIVE THEM SCRITCHES :: motion
} :: control
if <(are the platypods here? :: #084f01) = true :: operators> :: control
DOUBLE HOORAY! :: looks
end
else
sadness :: looks
end


[/scratchblocks]
WHY DOES BBCODE NOT WORK IN [CODE?] this is saddening go ahead and try to visualize the BBCode in your head
for those wonder i needed to use [code] so i could fit all this "random" stuff in
[/code]
duckboycool
Scratcher
1000+ posts

Send Broadcast To Only A Specific Sprite(s)

Duplicate.

I used to be active on the forums, but I have mostly moved past Scratch. I still do check my Scratch messages, so if you'd like to talk to me, just pop a comment on my profile. My main project on Scratch was Cookie Clicker, but I've also recently made a project called Snake Snake, a game based off of Snake, but there are two snakes, and you can play either singleplayer or multiplayer.

Powered by DjangoBB

Standard | Mobile