Home > Articles > Scratch resources > 10 block demos > Simple broadcasts example

How Scratch broadcasts work, and how to teach them

Sean McManus, author of Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps, shows you how to demonstrate broadcasts in Scratch

I am a Code Club volunteer, and before starting the third Code Club project (fireworks), I created a simple demonstration to show my club how broadcasts work in Scratch. I talked through it at the start of the session, and kept it as simple as possible, and the club members all had a go at making it before beginning the main project.

Teachers, Code Club volunteers, and Scratch students might also find it useful.

What are broadcasts in Scratch?

  • You can't make one sprite move another sprite
  • But you can make one sprite tell another one it's time to do something, and then that sprite can move itself
  • To do that, you send a message using a broadcast
  • Broadcasts are messages that one sprite sends to another

A simple demonstration of broadcasts

  1. Start a new project
  2. In Scratch 2.0, import the sprite Bat1
  3. If you're using Scratch 1.4, add sprite bat1-a, and add the costume bat1-b
  4. Add this script to the cat sprite:

    When this sprite clicked / broadcast Fly

  5. Add this script to the bat sprite:

    When I receive fly / move 10 steps / next costume

  6. Run the program. When you click the cat, it sends an invisible message to the bat, the bat receives the message and flaps its wings and flies.

Try the example program

Click the cat to make the bat fly.

What else should I know about broadcasts?

  • Broadcasts are sent to all sprites at the same time, but they don't all have to respond
  • You can react to a broadcast from the same sprite that sent it
  • So you need to take care that you put your 'reaction' scripts on the right sprite and don't do this by mistake

Demo card for sharing

Here's a card that encapsulates all this. Feel free to share the image below on Twitter, Facebook or your other social networks

Card demonstrating broadcasts using the code explained above

Find out more...

Find more 10 block Scratch demos here. For more information on my Scratch books and more bonus content, visit the Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps.

Credits

© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Set up your Raspberry Pi, then learn how to use the Linux command line, Scratch, Python, Sonic Pi, Minecraft and electronics projects with it.

Earworm

Earworm

In this entertaining techno-thriller, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.

Scratch Homeschooling resources

Scratch cat with balloons invites you to visit my Scratch resources

Sean's Scratch Resources

Tips, tutorials and free book chapters for Scratch, a coding language widely used in schools.

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About