Skip to content
Transcript

(goose honks)

(Instructor) In this video you'll program the chaser sprites to play sounds if they catch the player sprite.

To start, click the chaser one sprite then the sounds tab.

Select choose sound from library.

Test a few sounds.

(short electronic sounds play)

Once you've found a sound you'd like your game to play when a chaser catches a player, select it.

In a previous video you programed an if statement to sense if the chaser was touching the player.

You can use the same if statement to play the sound you just picked.

Next, click the sound menu and add a play sound block.

Remember, in computer science it's important to test your code often to make sure it's working the way you want.

Test your code now.

(electronic screaming)

When the chaser catches the player the sound you chose should play.

Next, add sounds to the chaser two and chaser three sprites.

They can play the same sound or different sounds.

Be creative and have fun adding sounds to your scratch project.

If you get stuck along the way, ask your neighbor for help or get the attention of your CS First guru.

Now it's your turn.

Program the chaser sprites to play sounds if they catch the player sprite.

Choose an Add-On

Play a Sound if Caught

Add a sound to your game and program your project to play that sound.

Play Your Game with a Friend

Program one sprite to be controlled by another player.

Change Up the Player

Change up your player's costume whenever it touches another sprite.

Speed Up the Chase

Make the game harder by making the chasers faster.

High Score!

Create a new variable that stores the game's current high score.

Instructions

  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!
Attributions
  • The song “Magic Marker” is © YouTube-- CC-BY-SA 4.0 does not apply.