Broadcast — Sending Messages
The broadcast (message1) block sends a message to every sprite at the same time. Any sprite with a “When I receive (message1)” hat block will react to it.
Why Use Broadcasts?
Broadcasts let sprites coordinate without directly controlling each other. It’s how you trigger multiple events at once — like starting a new level.
Example: Game Over Screen
- Player sprite: if → broadcast (game over).
- Score Display sprite: when I receive (game over) → say “GAME OVER” for 3 seconds.
- All other sprites: when I receive (game over) → stop other scripts in sprite.