Skip to content
Transcript

In this add-on, you'll program the player sprite's costume to change if it touches the chaser sprite.

To add a costume for the player sprite, click the player sprite then on the "Costumes" tab.

Depending on the sprite you chose as the player sprite, you may have one or many costumes to choose from.

You can delete costumes by clicking the "X" on the costume, and you can choose new costumes by clicking, "Choose New Costume" from library.

Once you've selected some costumes for your sprite, program the costume to change.

From "Looks", drag out a "Next Costume" block.

Click it a few times.

Cool, the sprite changes costumes.

To program the sprite to change if the player's touching chaser one, chaser two or chaser three, click Control and select an "If Statement".

You could make a separate "if statement" for each chaser, but it's easier to use "Or Operators".

This code reads, If touching chaser one or chaser two or chaser three, then change costumes.

With the "Or Operator" any of these conditions could be true and the computer will run this code.

Test your code.

Nice!

The sprite's costume changes when the player touches a chaser.

The costume changes very quickly.

Any time the sprite touches a chaser, the costume changes instantly and doesn't stop changing until the two sprites stop touching.

To fix this, add a "Wait" block after the "Next Costume" block.

Tinker with the value in the "Wait" block to get it to work the way you want.

Test your code.

Perfect.

Now it's your turn.

Add more costumes to the player sprite, and program the player sprite to change costumes if it's touching a chaser 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.