How to Use Broadcast Message in Scratch: Complete Guide for Beginners

Reading Time: 12 mins

Want your Scratch sprites to talk to each other? Broadcast messages are the secret! This comprehensive guide shows you exactly how to use broadcast messages in Scratch to create coordinated actions, build complex games, and make your projects truly interactive.


What Is Broadcast Message in Scratch?

A broadcast message in Scratch is a communication tool that lets sprites and the stage send signals to each other. Think of it like a walkie-talkie system – when one sprite β€œbroadcasts” a message, any sprite listening for that message can respond and take action.

Real-world analogy: Imagine a teacher announcing β€œLunch time!” to the classroom. All students hear the announcement and respond by putting away their work and lining up. That’s exactly how broadcast messages work in Scratch!

Why broadcast messages matter:

  • Coordinate actions across multiple sprites
  • Trigger events at specific times
  • Organize complex game logic
  • Create cleaner, more manageable code
  • Build professional-quality projects

How Does Broadcast Message in Scratch Work?

Broadcast messages work through a sender-receiver system:

The Sender (Broadcasting):

broadcast [message name]

This sprite sends out a signal that any other sprite can hear.

The Receiver (Listening):

when I receive [message name]

This sprite waits for the signal and responds when it hears it.

Key principle: The message name must match exactly (case-sensitive) for the communication to work.


How to Broadcast a Message in Scratch: Step-by-Step

Step 1: Create Your First Broadcast Message

  1. Open your Scratch project
  2. Select the sprite that will send the message
  3. Click the Events category (yellow blocks)
  4. Drag the broadcast [message1] block into your code area
  5. Click the dropdown arrow on the block
  6. Select β€œNew message”
  7. Type a descriptive name (like β€œstart game” or β€œplayer wins”)
  8. Click OK

Pro tip: Use descriptive names like β€œstart_level_2” instead of generic names like β€œmessage1”. This makes your code easier to understand later.

Step 2: Make Another Sprite Listen

  1. Select a different sprite (or the same sprite)
  2. Go to the Events category
  3. Drag the when I receive [message name] block to the code area
  4. Select your message name from the dropdown
  5. Add action blocks below it (what should happen when the message is received)

Example code:

When green flag clicked
wait (2) seconds
broadcast [game start]

---

When I receive [game start]
say "Let's play!" for (2) seconds
go to x: (0) y: (0)
show

Broadcasting Messages in Scratch: Common Use Cases

1. Starting Your Game

Problem: You want all sprites to get ready when the game begins.

Solution:

// Stage code
When green flag clicked
set [score] to [0]
switch backdrop to [main menu]
broadcast [init game]

---

// Player sprite
When I receive [init game]
go to x: (0) y: (-100)
show
set [lives] to [3]

---

// Enemy sprite
When I receive [init game]
hide
wait (3) seconds
show

2. Level Transitions

Problem: When the player reaches the exit, everything needs to change.

Solution:

// Door sprite
When this sprite clicked
if <touching [player]?> then
  broadcast [next level]
end

---

// Stage
When I receive [next level]
switch backdrop to [level 2]
broadcast [reset positions]

---

// All sprites
When I receive [reset positions]
go to x: (starting x) y: (starting y)

3. Game Over Sequence

Problem: Multiple things need to happen when the player loses.

Solution:

// Player sprite
When I receive [hit by enemy]
change [lives] by (-1)
if <[lives] < [1]> then
  broadcast [game over]
end

---

// Stage
When I receive [game over]
stop all sounds
play sound [game over music]
switch backdrop to [game over screen]

---

// UI sprite
When I receive [game over]
show
say "Game Over! Click to restart" for (5) seconds

How to Use Broadcast Message in Scratch for Advanced Projects

Broadcast and Wait

What it does: Pauses the sender until all receivers finish their actions.

When to use it: When you need actions to happen in a specific order.

Example:

// Main controller
broadcast [spawn enemies] and wait
broadcast [start music]

---

// Enemy spawner
When I receive [spawn enemies]
repeat (10)
  create clone of [myself]
  wait (0.5) seconds
end

The music won’t start until all 10 enemies have spawned.

Multiple Messages in Sequence

Creating a cutscene:

// Director sprite
When green flag clicked
broadcast [scene 1]
wait (3) seconds
broadcast [scene 2]
wait (3) seconds
broadcast [scene 3]
broadcast [game start]

---

// Character sprites respond to each scene
When I receive [scene 1]
say "Welcome to the adventure!" for (3) seconds

When I receive [scene 2]
glide (2) secs to x: (100) y: (0)
say "Let's explore!" for (3) seconds

Message Chains for Complex Logic

Creating a quiz game:

// Question sprite
When this sprite clicked
if <answer = [correct answer]> then
  broadcast [correct answer]
else
  broadcast [wrong answer]
end

---

// Score keeper
When I receive [correct answer]
change [score] by (10)
broadcast [next question]

When I receive [wrong answer]
change [lives] by (-1)
broadcast [next question]

---

// Question controller
When I receive [next question]
change [question number] by (1)
if <[question number] > [10]> then
  broadcast [quiz complete]
else
  broadcast [show next question]
end

What Is Broadcast Message in Scratch vs Other Communication Methods?

Broadcast Messages vs Variables

Broadcast Messages:

  • βœ… Trigger actions and events
  • βœ… Coordinate multiple sprites
  • βœ… Create sequences
  • ❌ Don’t store data

Variables:

  • βœ… Store and share data
  • βœ… Track game state
  • ❌ Don’t trigger actions directly

Best practice: Use both together!

// Use variables to track state
set [game state] to [playing]

// Use broadcasts to trigger responses
broadcast [game started]

Broadcast vs Clone Events

Broadcast messages: Global – all sprites hear them Clone events: Local – only affects individual clones

Example:

// Broadcast affects ALL enemies
broadcast [enemies attack]
When I receive [enemies attack]
  // Every enemy sprite responds

// Clone event affects ONE clone
When I start as a clone
  // Only this specific clone runs this code

How to Delete Broadcast Messages in Scratch

Sometimes you need to clean up unused messages.

Steps to delete a broadcast message:

  1. Go to any broadcast or when I receive block
  2. Click the dropdown arrow
  3. Find the message you want to delete
  4. Right-click on the message name
  5. Select β€œDelete message”

⚠️ Warning: Deleting a message will break any code using it. Make sure no sprites are listening for that message before deleting.

How to check if a message is in use:

  1. Use Edit > Find (Ctrl+F)
  2. Search for the message name
  3. Review all instances before deleting

How to Do a Broadcast Message in Scratch: Best Practices

1. Use Descriptive Names

Bad:

broadcast [msg1]
broadcast [m]
broadcast [2]

Good:

broadcast [player_died]
broadcast [level_complete]
broadcast [enemy_spawned]

2. Organize Messages by Category

Game state messages:

  • init_game
  • start_game
  • pause_game
  • game_over

Level messages:

  • load_level_1
  • load_level_2
  • level_complete

Character messages:

  • player_jump
  • player_hit
  • player_score

3. Document Your Messages

Add comments to explain what each message does:

// Broadcast [game_start]
// Initializes all sprites and begins gameplay
// Receivers: player, enemies, UI, background music
broadcast [game_start]

4. Avoid Broadcast Loops

Problem:

// Sprite A
When I receive [message A]
broadcast [message B]

// Sprite B
When I receive [message B]
broadcast [message A]

This creates an infinite loop and will freeze your project!

Solution: Use variables to track state:

When I receive [message A]
if <not [already processing]> then
  set [already processing] to [true]
  broadcast [message B]
end

5. Minimize Broadcasts in Loops

Inefficient:

repeat (100)
  broadcast [update position]
end

Better:

repeat (100)
  // Do calculations
end
broadcast [positions updated]

Broadcast Message in Scratch Explained: Common Mistakes and Fixes

Mistake 1: Message Name Mismatch

Problem:

broadcast [Start Game]
When I receive [start game]  // Won't work - different capitalization!

Fix: Message names are case-sensitive. Use exact spelling:

broadcast [Start Game]
When I receive [Start Game]  // Now it works!

Mistake 2: Forgetting β€œand Wait”

Problem:

broadcast [load level]
broadcast [start timer]  // Timer starts before level loads!

Fix:

broadcast [load level] and wait
broadcast [start timer]  // Now timer starts after level loads

Mistake 3: No Receivers

Problem: Broadcasting a message but no sprites are listening for it.

Fix: Always create the receiver code:

// Sender
broadcast [show hint]

// Receiver (don't forget this!)
When I receive [show hint]
show
say "Press SPACE to jump" for (3) seconds

Mistake 4: Broadcasting Too Often

Problem:

forever
  broadcast [update score]  // Broadcasts hundreds of times per second!
end

Fix:

forever
  if <[score] > [previous score]> then
    broadcast [update score]
    set [previous score] to [score]
  end
end

How to Use a Broadcast Message in Scratch: Real Project Example

Let’s build a simple multi-level platformer using broadcast messages:

Project Structure

Stage Code:

When green flag clicked
β”œβ”€ set [level] to [1]
β”œβ”€ set [score] to [0]
└─ broadcast [init game]

When I receive [init game]
β”œβ”€ switch backdrop to [level 1]
└─ broadcast [start level]

When I receive [level complete]
β”œβ”€ change [level] by (1)
β”œβ”€ wait (2) seconds
β”œβ”€ switch backdrop to (join [level ] [level])
└─ broadcast [start level]

When I receive [game over]
β”œβ”€ stop all sounds
β”œβ”€ switch backdrop to [game over screen]
└─ stop [all]

Player Sprite:

When I receive [start level]
β”œβ”€ go to x: (-200) y: (-100)
β”œβ”€ show
└─ broadcast [enable controls]

When I receive [enable controls]
└─ forever
    └─ // Movement code here

When I receive [player hit]
β”œβ”€ play sound [ouch]
β”œβ”€ change [lives] by (-1)
└─ if <[lives] < [1]> then
    └─ broadcast [game over]

Goal Sprite:

When I receive [start level]
β”œβ”€ go to x: (200) y: (100)
└─ show

forever
└─ if <touching [player]?> then
    β”œβ”€ play sound [success]
    └─ broadcast [level complete]

Enemy Sprite:

When I receive [start level]
β”œβ”€ go to x: (0) y: (-80)
└─ show

forever
└─ if <touching [player]?> then
    └─ broadcast [player hit]

This structure uses broadcast messages to coordinate all game elements cleanly and efficiently.


Broadcast Message in Scratch Tutorial: Interactive Exercises

Exercise 1: Simple Quiz Game

Goal: Create a 3-question quiz using broadcasts.

Messages needed:

  • show_question_1
  • show_question_2
  • show_question_3
  • correct_answer
  • wrong_answer
  • quiz_complete

Challenge: Make the quiz only advance when the correct answer is given.

Exercise 2: Animated Cutscene

Goal: Create a 5-scene story using timed broadcasts.

Messages needed:

  • scene_1 through scene_5
  • cutscene_complete

Challenge: Add character dialogue that changes in each scene.

Exercise 3: Boss Battle

Goal: Create a boss that goes through 3 phases.

Messages needed:

  • boss_phase_1
  • boss_phase_2
  • boss_phase_3
  • boss_defeated

Challenge: Broadcast phase changes based on boss health percentage.


How to Use Broadcast Message in Scratch for Different Project Types

Game Projects

Essential broadcasts:

  • game_start
  • game_pause
  • game_over
  • level_complete
  • player_died
  • checkpoint_reached

Story/Animation Projects

Essential broadcasts:

  • scene_change
  • character_enter
  • character_exit
  • dialogue_start
  • dialogue_end

Music/Art Projects

Essential broadcasts:

  • play_music
  • stop_music
  • change_tempo
  • switch_instrument
  • visual_effect_trigger

Quiz/Educational Projects

Essential broadcasts:

  • show_question
  • check_answer
  • show_feedback
  • next_question
  • show_results

Troubleshooting: Broadcast Message Not Working in Scratch

Issue 1: Nothing Happens When Broadcasting

Possible causes:

  1. βœ… Check spelling and capitalization match exactly
  2. βœ… Ensure receiver code exists (when I receive)
  3. βœ… Verify receiver sprite is visible/active
  4. βœ… Check that code isn’t blocked by conditional statements

Debugging steps:

// Add temporary feedback
When I receive [your message]
say "I received the message!" for (2) seconds
// Your other code

Issue 2: Broadcasts Happen in Wrong Order

Solution: Use broadcast and wait:

broadcast [first action] and wait
broadcast [second action] and wait
broadcast [third action]

Issue 3: Too Many Broadcasts Slow Down Project

Solution: Consolidate related broadcasts:

Before:

broadcast [update score]
broadcast [update lives]
broadcast [update timer]

After:

broadcast [update UI]

When I receive [update UI]
// Update score, lives, and timer all at once

Advanced Techniques: Taking Broadcasts Further

Dynamic Message Names

Use variables in broadcast names:

set [current level] to [3]
broadcast (join [load_level_] [current level])
// Broadcasts "load_level_3"

State Machine Using Broadcasts

Managing complex game states:

// State controller
When I receive [enter menu state]
β”œβ”€ set [game state] to [menu]
└─ broadcast [show menu]

When I receive [enter play state]
β”œβ”€ set [game state] to [playing]
└─ broadcast [start gameplay]

When I receive [enter pause state]
β”œβ”€ set [game state] to [paused]
└─ broadcast [show pause screen]

Broadcast Event Queue

For complex sequencing:

// Add to queue
add [cutscene_1] to [event queue]
add [cutscene_2] to [event queue]
add [start_game] to [event queue]

// Process queue
When green flag clicked
forever
  if <(length of [event queue]) > [0]> then
    set [current event] to (item (1) of [event queue])
    broadcast [current event] and wait
    delete (1) of [event queue]
  end
end

Broadcast Messages vs Custom Blocks: When to Use Each

Use Broadcast Messages When:

  • βœ… Coordinating multiple sprites
  • βœ… Triggering events across the project
  • βœ… Creating cutscenes or sequences
  • βœ… Managing game states

Use Custom Blocks When:

  • βœ… Repeating code within one sprite
  • βœ… Organizing complex calculations
  • βœ… Creating reusable functions
  • βœ… Simplifying sprite-specific logic

Use Both Together:

// Broadcast triggers the sequence
When I receive [enemy attack pattern]
└─ execute attack pattern :: custom

// Custom block handles the details
define execute attack pattern
move (10) steps
turn (15) degrees
wait (0.1) seconds
// etc.

Best Resources for Learning More

Related ItsMyBot Tutorials

Practice Projects to Try

  1. Multi-level Adventure Game – Practice level transitions
  2. Quiz Show – Master question sequences
  3. Animated Story – Perfect timed broadcasts
  4. Boss Battle – Implement phase systems
  5. Multiplayer Game – Coordinate multiple players

Key Takeaways: Mastering Broadcast Messages in Scratch

Essential points to remember:

  1. Broadcast messages enable sprite communication – They’re the foundation of complex projects
  2. Message names must match exactly – Case-sensitive and spelling matter
  3. Use descriptive names – β€œplayer_jumped” beats β€œmsg1”
  4. Broadcast and wait for sequencing – Control the order of events
  5. Combine with variables – Track state AND trigger actions
  6. Avoid infinite loops – Never have broadcasts trigger each other endlessly
  7. Organize by category – Group related messages logically
  8. Test incrementally – Add one broadcast at a time and verify it works

The power of broadcasts: When used correctly, broadcast messages transform your Scratch projects from simple animations into sophisticated, interactive experiences. They’re the difference between sprites acting independently and sprites working together as a coordinated system.


Next Steps in Your Scratch Journey

Now that you understand how to use broadcast messages in Scratch, you’re ready to build truly impressive projects!

Apply what you’ve learned:

  • Build a multi-level game with proper state management
  • Create an interactive story with branching paths
  • Design a quiz game with score tracking
  • Develop a boss battle with multiple phases

Continue learning with ItsMyBot:

At ItsMyBot, we turn screen time into skill time through personalized, industry-level courses that adapt to your child’s pace. Our tutorials like this one are just the beginningβ€”imagine what your child could create with dedicated mentorship and structured learning.

πŸš€ Ready to take coding seriously? Explore our courses designed for young creators aged 5-15.

πŸ’‘ Want more free tutorials? Visit our blog for step-by-step guides on robotics, coding, and game development.

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Parents: Track your child’s progress and stay involved every step of the way with our transparent reporting system.


Frequently Asked Questions

How do I broadcast a message in Scratch?

Drag the broadcast [message] block from the Events category, click the dropdown, select β€œNew message,” type a descriptive name, and place it where you want the message sent. Any sprite with a matching when I receive [message] block will respond.

What is broadcast message in Scratch used for?

Broadcast messages coordinate actions across multiple sprites and the stage. They’re used for starting games, changing levels, triggering animations, managing game states, and creating any situation where multiple elements need to respond to one event.

How to delete broadcast messages in Scratch?

Click the dropdown on any broadcast block, find the message you want to remove, right-click it, and select β€œDelete message.” Warning: this will break any code using that message, so verify it’s not in use first.

What’s the difference between broadcast and broadcast and wait?

broadcast sends a message and immediately continues to the next block. broadcast and wait sends the message, pauses until ALL receivers finish their code, then continues. Use β€œand wait” when you need specific timing or sequencing.

How many broadcast messages can I have in one project?

There’s no official limit, but for organization, try to keep it under 20-30 messages per project. Use descriptive names and group related messages by category (game_start, game_pause, etc.) for better code management.

Can I broadcast a message to only one sprite?

No, broadcast messages are globalβ€”all sprites hear them. However, you can add conditional logic in the receiver to make specific sprites respond differently:

When I receive [player attack]
if <[my name] = [Enemy1]> then
  // Only this enemy responds
end

How do I know if my broadcast message is working?

Add temporary feedback in the receiver code:

When I receive [your message]
say "Message received!" for (2) seconds

If the sprite says the message, the broadcast is working. If not, check spelling, capitalization, and that the receiver code exists.


Share Your Broadcast Message Projects!

Have you built something cool using broadcast messages? We’d love to see it!

Connect with the ItsMyBot community:

  • Share your projects in our student showcase
  • Get feedback from expert instructors
  • Inspire other young creators
  • Collaborate on global projects

Remember: Every expert coder started with one broadcast message, one sprite, one project. Keep building, keep learning, and keep creating!


About ItsMyBot

ItsMyBot turns screen time into skill time with personalized, industry-level courses that adapt to your child’s pace and potential. We provide international collaboration opportunities, keep parents informed every step of the way, and equip kids with technical know-how that opens doors to high-paying, future-ready careers.

From Scratch basics to advanced robotics, we help your child master skills that matter.

Start Your Free Trial Today β†’

Tags

Share

Poornima Sasidharan​

An accomplished Academic Director, seasoned Content Specialist, and passionate STEM enthusiast, I specialize in creating engaging and impactful educational content. With a focus on fostering dynamic learning environments, I cater to both students and educators. My teaching philosophy is grounded in a deep understanding of child psychology, allowing me to craft instructional strategies that align with the latest pedagogical trends.

As a proponent of fun-based learning, I aim to inspire creativity and curiosity in students. My background in Project Management and technical leadership further enhances my ability to lead and execute seamless educational initiatives.

Related posts