Discuss Scratch

Daniel975
Scratcher
24 posts

How do you broadcast a message?

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
Daniel975
Scratcher
24 posts

How do you broadcast a message?

It doesn't work
Daniel975
Scratcher
24 posts

How do you broadcast a message?

How do you make a message?
oriole92
Scratcher
10 posts

How do you broadcast a message?

The block
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!
say [I have received the message!] for (3) secs
This script will make a sprite talk when it receives a message.

Until now, I hadn't known what the block
broadcast [message v] and wait
did. 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:
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 clicked
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
Now this is the meaning of this block:
when green flag clicked
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
I hope I helped.
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:
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?

BluesClues2004 wrote:

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)

mominaepic
Scratcher
4 posts

How do you broadcast a message?

ghf
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?

sar6z wrote:

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:
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?

Orangey2011 wrote:

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.

Powered by DjangoBB