Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back Bug Fix: Land on Your Feet...or Not

Choose an Add-On
play_circle_filled
Time to Celebrate!
Create a wild winning celebration using some of these ideas.
arrow_forward
play_circle_filled
Moving Platforms
Make your game more challenging by creating moving platforms.
arrow_forward
play_circle_filled
Shrinking Platforms
Create a shrinking platform to increase your game's difficulty.
arrow_forward
play_circle_filled
Splash! You Lose
Create a way for the player to lose in your game.
arrow_forward
play_circle_filled
Add Some Tunes
Add some background music to your game.
arrow_forward
play_circle_filled
Bug Fix: Land on Your Feet...or Not
Fix the bug that allows things other than a sprite's feet to keep it on a platform.
arrow_forward
  • 1. Platform Games: Intro and Design
  • 2. Use Events to Make the Sprite Jump
  • 3. Move the Sprite Left and Right
  • 4. Create a Winning Condition
  • 5. Add-Ons
  • 6. Reflection
  • 7. Wrap-up: Platform Game
  • 8. Wrap-up: Share Your Project
  • 9. Wrap-up: Show Your Project
arrow_backward Back Next arrow_forward
Transcript

Currently, the sprite will stay on the platform no matter what body part is touching it.

This is because of how it’s programmed.

The if statement that moves the sprite down reads: “If touching sprite.”

It doesn’t make sense for the sprite to stay on the platform if another body part, like its head, is touching it. In this step, you’ll change the program so the sprite only stays on the platform when its feet are touching it.

The best way to check if part of a sprite is touching another sprite is to use a color.

To do this, you’ll need to give the sprite’s feet a unique color.

You can make the bottom of the sprite any color you want.

Depending on what your sprite looks like and how it’s shaped, you may need to get creative with the pen or line tool to give the bottom of the sprite a unique color.

Now, instead of saying “if not touching the color black move down,” instead, put a "color is touching" block from the Sensing menu.

Now, it should say "if the color green" (which is the color of this sprite’s shoes) is not touching the color black, then move down.”

Once you’ve programmed this, try it to see if it works!

If the sprite is touching the platform with anything but its shoes, it keeps falling.

If the green shoes are touching the platform, this sprite doesn’t fall.Perfect!

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!