[Instructor] Racing around the same old track all day
could get pretty boring.
Use this add-on to change up the venue
for your racing sprites.
In this video, you will learn how to add a button
that you can program to change between the three racetrack
backdrops available in the starter project.
Watch how it's done first, then try it on your own.
To start, choose a sprite to be the button for this project.
For example, Button1 like you see here.
You can choose any sprite you want for your project.
This button is pretty large, so make it smaller,
and drag it into the corner of the project.
Next, program the button to change backdrops.
Click on looks, select the switch backdrop to block,
and change the value to next backdrop.
The backdrops now change when the block is clicked.
Finally, add an event that
tells the computer to run this code.
The backdrop should change when the sprite is clicked.
To make that happen, add a when this sprite clicked event.
Try it out!
Remember, it's important to test
your code at every step along the way.
That's what computer scientists do
to make sure everything is working the way they want it.
The user can click this button to choose a backdrop.
When you're finished, add instructions to the project page
to tell your users how to use the new feature.
Now it's your turn.
Add a sprite, and change the backdrop
using a switch backdrop block
and a when sprite clicked event.
Add a button that changes the racetrack backdrop.
Change what the racers look like when a key is pressed.
Play a crashing sound each time the racers hit each other.
Program a sprite to count down to the start of the race and cheer.
Add a colorful trail effect to the racers.
Sign in to save your project and track your progress.