Skip to content
Transcript

To make this game even more fun and interesting you can change how the sprites look with a costume change.

In this add-on you'll learn how to change costumes for player one and player two when the one and two keys are pressed on the keyboard.

If you click on player one in the costumes tab you'll see there are three costumes for this sprite available in the starter project.

If you want to choose more costumes, simply click choose costumes from library and select the costumes you want to add.

Select looks add a next costume block which changes the sprites costumes.

When you click on this block it changes the costumes of the player one sprite.

Finally, add an event to tell the computer when to change the player one sprite's costume.

The user should be able to change the costume by pressing a key on the keyboard such as the space key.

To make that possible slect a when space key press block.

Choose any value that makes sense for player one.

This example uses one, but play around with the values until you find one you like.

Time to test your code.

Press the 1 key and look at that!

The costume changes.

To program player two, code this in the same way but with a different key press event that uses a different key than the one you programed for player one.

Finally, add instructions to the project page that tell your users how the project works.

Now it's your turn.

Add more costumes to your player sprites.

Program costume changes using next costume and when key pressed blocks.

Choose an Add-On

Change Up your Racetrack

Add a button that changes the racetrack backdrop.

Costume Change

Change what the racers look like when a key is pressed.

Crashing Sounds

Play a crashing sound each time the racers hit each other.

Race Fans

Program a sprite to count down to the start of the race and cheer.

Color Trail

Add a colorful trail effect to the racers.

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.