arrow_back Finish Line Cheer
Sound makes games more fun! In this add on, you’ll add a sound that will play when the player sprite touches the finish line. Watch the screencast to learn how to add sound to your game, then try it on your own.
First, click on Player 1.
To add a sound to your project, click the Sound tab then the “add sound from library” button.
Try a few sounds by clicking the play buttons.
(crickets chirping) (quick laser sound) (shaking sound) (water droplets or ripple sound) When you’ve found a good sound for your game, click “OK.”
Then, go to the Scripts tab and click the sound menu. Scratch has a “play sound” block and a “play sound until done” block. The “play sound” block will play a sound and move to the next instruction immediately, whereas the “play sound until done” block will play a sound, then wait until the sound is done playing to move to the next instruction.
In this case, either block will work. This example will use the “play sound” block.
Click the drop down menu, and select the sound that you chose from the library.
To play the sound when the player touches the finish line, add the “play sound” block to the “if touching finish line” block stack.
Try it out!
Great! If the player touches the finish line, then the sound should play.