Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you broadcast a message?
- stickfiregames
-
Scratcher
1000+ posts
How do you broadcast a message?
broadcast [message v] // broadcasts a message
broadcast [message v] and wait // broadcasts a message, and waits for any scripts that receive it to finish
when I receive [message v] // runs the script when the broadcast is sent
- oriole92
-
Scratcher
10 posts
How do you broadcast a message?
The block
Until now, I hadn't known what the block
I hope I was able to help you understand the broadcast blocks better!
broadcast [message v]will send a message through the project and notify scripts that an event has happened. This can be used to send information between sprites in a game:
when I receive [message v] //This block will activate when the message is received!This script will make a sprite talk when it receives a message.
say [I have received the message!] for (3) secs
Until now, I hadn't known what the block
broadcast [message v] and waitdid. After looking on the Scratch Wiki, I found out that it simply performs the same function as the block
broadcast [message v]with one simple change– it freezes the script and does not let it continue until the receiver script is finished.
I hope I was able to help you understand the broadcast blocks better!
- WolfCat67
-
Scratcher
1000+ posts
How do you broadcast a message?
To create a message, you click on the dropdown menu on the broadcast block. Then, you click on the “new message…” option that you'll find. Name your new message, and then you can start broadcasting and receiving that message!
- TSGthecreator
-
Scratcher
3 posts
How do you broadcast a message?
example:
first sprite:
second sprite:
hope this helped!






































first sprite:
when green flag clicked
broadcast [ v]
second sprite:
when I receive [ v]
say [] for (2) secs
hope this helped!







































Last edited by TSGthecreator (Jan. 18, 2017 17:14:31)
- pn112home
-
Scratcher
13 posts
How do you broadcast a message?
You can find out the meaning of any block by picking up “BLOCK HELP” icon, & clicking on any block.
- titanscratch
-
Scratcher
100+ posts
How do you broadcast a message?
when green flag clickedNow this is the meaning of this block:
broadcast [a message v] // the script will keep going without any stopping
Other code... ::grey
when I receive [a message v] // receiving script
say [] for [5] secs
Other code... :: grey
when green flag clickedI hope I helped.
broadcast [a message v] and wait // this script will not go on until the receiving script finishes
Other code... :: grey
when I receive [a message v] // receiving script
say [] for [5] secs
Other code... :: grey

- TEAMWFS
-
Scratcher
100+ posts
How do you broadcast a message?
It is in the EVENTS it says: Broadcast (MessageName) and wait or Broadcast (MessageName)
Kinda like:
Kinda like:
broadcast [ v] and wait
- BluesClues2004
-
Scratcher
1 post
How do you broadcast a message?
Scratch. This is BluesClues2004. Can you help me please. I kept on getting errors on whenever I go to a project I recently made. Can you fix that?
- deck26
-
Scratcher
1000+ posts
How do you broadcast a message?
Scratch. This is BluesClues2004. Can you help me please. I kept on getting errors on whenever I go to a project I recently made. Can you fix that?This forum is for scripting problems. We're not Scratch Team members, just volunteers.
So is this a scripting problem or something else? Which project?
Last edited by deck26 (Jan. 30, 2019 10:04:53)
- sar6z
-
New Scratcher
1 post
How do you broadcast a message?
Why is it only letting me broadcast 9 messages
- Kraken_Games
-
Scratcher
100+ posts
How do you broadcast a message?
Why is it only letting me broadcast 9 messages
Please don't thread hijack. Create your own topic if you have a question.
- Orangey2011
-
Scratcher
100+ posts
How do you broadcast a message?
This block will broadcast it:
Then put this block somewhere:
when I receive [message]press the arrow, click new message, name i, press okay.
Then put this block somewhere:
when I receive [message]
- ResExsention
-
New Scratcher
1000+ posts
How do you broadcast a message?
This block will broadcast it:when I receive [message]press the arrow, click new message, name i, press okay.
Then put this block somewhere:when I receive [message]
You put two when I recieve blocks, and forgot the broadcast block.
Anyway, to answer the question, use:
. . .
broadcast [whatever v]
. . .
in your sprite code to broadcast a message across the entire project. Then, to receive that broadcast:
when I receive [whatever v]
. . .
Broadcasts go everywhere in the project, so this is useful more making one sprite do stuff with another sprite.
- Discussion Forums
- » Help with Scripts
-
» How do you broadcast a message?













