What You Will Build
Animate characters running to catch a moving bus before it leaves the stop. 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
- Animate a bus sliding across the stage using Glide blocks
- Make a character run using Move and Repeat loops
- Use Sensing blocks to detect when sprites touch
- Use variables to create a countdown timer
- Trigger different outcomes based on success or failure
Step-by-Step Guide
- 1Add a city street backdrop from the library.
- 2Add a Bus sprite and a Person sprite.
- 3Under when 🏳️ clicked on the Bus, add go to x:200 y:-80.
- 4Add glide 3 secs to x:-280 y:-80 to make the bus drive off.
- 5On the Person, add a repeat 20 loop containing move 10 steps and next costume.
- 6Add a wait until <touching [Bus]> block after the repeat loop.
- 7If touching: play a cheer sound and say [Made it!].
- 8Create a timer variable. Use a second script to count down from 5.
- 9If timer hits 0 before touching: say [Missed it!].
- 10Test and adjust the glide and repeat speeds to make it challenging.
Extension Challenges
Finished the main project? Push further:
- Add a second person sprite that races the first.
- Add multiple buses at different speeds using clones.
- Display a score that increases for each bus caught.