Discuss Scratch

MappyMouse64
Scratcher
11 posts

Broadcast blocks

What do broadcast blocks do? Just asking
DracoCrab
Scratcher
20 posts

Broadcast blocks

MappyMouse64 wrote:

What do broadcast blocks do? Just asking
broadcasat blocks are where you broadcast something for example

whenclickedbroadcastEatCookies
whenIreceiveEatCookiessayEat Cookies
so basically it is a way of talking to other sprites to say your turn now rather than having a wait block.
(Did that make sense)

Last edited by DracoCrab (April 27, 2017 19:53:28)

drmcw
Scratcher
1000+ posts

Broadcast blocks

Sent a message to all sprites/clones which will start to run the corresponding when I receive script.
MappyMouse64
Scratcher
11 posts

Broadcast blocks

Thanks for the help!
dov3lyn
Scratcher
100+ posts

Broadcast blocks

MappyMouse64 wrote:

What do broadcast blocks do? Just asking
If you use a broadcast block, you can make other sprites/backdrops/scripts do something when they receive the broadcast.

Let's say this was our sprite's script:
whenclickedbroadcastbackdrop/sprite

And this script is for the backdrop or second sprite we want to receive the broadcast:
whenIreceivebackdrop/spriteplaysoundsounduntildone

You can also make it so multiple sprites and the backdrop can receive the broadcast simultaneously.

Sprite 1:
whenclickedswitchcostumetocostume1broadcastmultiple sprites

Backdrop:
whenIreceivemultiple spritesplaysoundsounduntildone

Sprite 2:
whenIreceivemultiple soundsswitchcostumetocostume5broadcastsecond broadcast

Hopefully that made sense.
EndermenK9
Scratcher
12 posts

Broadcast blocks

Broadcast blocks are super helpful once you understand what they do

Try this:

whenclicked
broadcastyou're awesome!

whenIreceiveyou're awesome!
sayYou're so awesome!for2secs
Pezd
Scratcher
100+ posts

Broadcast blocks

Here is something the other guys did not mention. If you use this block
broadcast...andwait
It will wait until the scripts under
whenIreceive...
are completed.

Example
move5stepsbroadcastjumpandwait when it gets to this block, it will wait until the second script is complete before it continues on with this script.move-5stepswhenIreceivejumpchangeyby10wait1secschangeyby-10

Powered by DjangoBB