What You Will Build
Use broadcast and receive blocks to trigger magical effects across multiple sprites. Follow the guide below to build the project, then open the official Raspberry Pi page for starter files, worked examples and extra help.
🍓 This project is on the Raspberry Pi Foundation website. Click the orange button above to access the full guide, starter Scratch project and extension activities on projects.raspberrypi.org.
What You Will Learn
- Use broadcast to send a named message from one sprite
- Use when I receive to trigger reactions in other sprites
- Apply graphic effects like ghost, color and whirl
- Chain multiple broadcasts to create spell sequences
- Control timing between effects using wait blocks
Step-by-Step Guide
- 1Create a magical backdrop (castle, night sky, forest).
- 2Add a wizard sprite and three effect sprites (sparkles, stars, flames).
- 3On the wizard: when clicked → broadcast [spell1].
- 4On each effect sprite: when I receive [spell1] → animate (grow, change colour, move).
- 5Add a second spell triggered by Button A key press: broadcast [spell2].
- 6Add a third spell on Button B: broadcast [spell3].
- 7Use set [ghost] effect to 50 then fade to 0 on effect sprites.
- 8Add a sound effect on the wizard when each spell is cast.
- 9After effects play, reset with clear graphic effects after 2 seconds.
- 10Show a spell name using a variable displayed on screen.
Extension Challenges
Finished the main project? Push further:
- Chain spells: spell1 automatically broadcasts spell2 after 1 second.
- Add a spell counter — each spell can only be cast 3 times.
- Create a backfire effect: 1 in 5 chance a spell reverses direction.