Think of broadcasts like a message that the sprite sends to everyone. When the sprite uses this:
[blocks]http://scratch.mit.edu/forums/viewtopic.php?id=87485#req_message[/blocks]
It just sent a message, and if a sprite contain this:
[blocks]http://scratch.mit.edu/forums/viewtopic.php?id=87485#req_message[/blocks]
It does the actions attached to it.
Offline
Broadcasts are basically signals that one sprite sends to another, alerting it to do something. For instance, your game has a start button. When you click the start button, you want the game to start, right? so this is the script you give to the start button:
[blocks]<when[ button ]clicked> <broadcast[ [/blocks]
And to the recieving sprite:
[blocks]<when I receive[ <hide>or <show>
respond if you don't understand anything else
mewkid
Offline
I explain it sort of like radio.
A sprite that has the [blocks]<broadcast[ something or <broadcast[ something ]and wait c>[/blocks] blocks is like a radio station. It is sending out its message on the frequency put into the block.
A sprite that has the [blocks]<when I receive[ something[/blocks] block is like a home radio. It picks up the message that it's tuned to, and then starts running the script below.
So, for example, one sprite broadcasts "all sprites get ready". Another sprite is looking for the "all sprites get ready" message, and when it 'hears' it, it gets into position. A different sprite, perhaps the one that shows "you win/lose" at the end of the game, has its receiver tuned to the "end game" message. This doesn't respond to the "all sprites get ready" message.
However, don't start thinking a sprite can only have 1 broadcast block! Let's say the "end game" sprite also has a receiver tuned to "all sprites get ready", telling it to hide then, until the end. That script runs, but the other doesn't.
Hope that helped!
If you want to know more about broadcasts, please visit the Scratch Wiki article on broadcasts.
Offline
It's sort of sending a message to all the other sprites. You would normally use them when an event happens, and then other sprites can react to that event.
Offline
broadcats are message to sprites. Here is an example
when space clicked
broadcast LOL
this means if you click space it broadcast's the message to other sprites and the background
however to make them work you will also need a when i recieve block
when i recieve LOL
(forever
say LOL
)
and when i recieve blocks when using them you may also need to add forever block if your broadcasting a level or something in a game
(another note when using broadcasting blocks you need to put them up with the main blocks like gf clicked or something like that.
So there! i hope this helps!
Offline