Scratch
Advanced
60 mins
Teacher/Student led
125 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Sound effects

This lesson guides students through the process of adding sound effects to a baseball game in Scratch. They will learn to create a new project, add and code sprites, detect hits, and incorporate sound effects for different game scenarios. The lesson concludes with a game over scenario, encouraging further exploration and creativity.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction to Sound Effects

    Welcome to our exciting lesson on Sound Effects! In this lesson, we will learn how to add sound effects to a baseball game in Scratch. We'll add sounds for when the ball hits the bat and when the crowd cheers. Are you ready to make your game more lively and fun? Let's get started!

    2 - Create a new Scratch project

    Create a new Scratch project and delete the cat sprite.


    3 - Add the Baseball 2 backdrop

    Ass the Baseball 2 backdrop from the backdrop library.


    4 - Add and code the Batter sprite

    Add the Batter sprite from the sprite library and then add the following code to make her swing bat when you press the space bar.

    when green flag clicked go to x (169) y (37) // position her on the right hand side switch costume to [batter-a v] // start with this costume when [space v] key pressed switch costume to [batter-b v] wait (.1) seconds switch costume to [batter-c v] wait (.1) seconds switch costume to [batter-d v] wait (.1) seconds

    Click on the green flag and then press the space key on your keyboard, the batter should 'animate' and appear to swing her bat.


    5 - Add and code the Baseball sprite

    Add the Baseball sprite from the sprite library and give it the following code to set it up for the start and make it move towards the batter.

    when green flag clicked show set size to (25) % go to x (-210) y (45) // the middle of the left hand side forever change x by (10) // make it move to the right end

    Once you've added the code, click the green flag and the baseball should start at the left hand side of the stage area and move towards the batter.

    If you press your space key the batter will swing her bat but the ball will go straight through it as we haven't coded it to detect when it hits the bat.


    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more