NEW Helicopter with Gravity

Exercise: Helicopter Game, Part 1

We’re going to start working on a new project, building a game with a helicopter that flies. When you’re done with the project, the helicopter will be able to fly to the right and the left and land on a platform. It will also be affected by gravity.

Start by making a new project.

Open up a new sprite by clicking on the New Sprite Button button.

In the Sprite Library, under the “Transportation” category double click on the “Helicopter”.

Helicopter

Fly left and right:

  • When you press the left arrow make the helicopter move left
  • When you press the right arrow make the helicopter move right
  • Don’t worry if the character flips upside down when you move left. We’ll fix that in the next step!

Exercise: Helicopter Game, Part 2

The helicopter might look a little funny flying left while it faces right. Make a new costume for the helicopter where it faces the correct way by:

  • Click on the “costumes” tab.

    Costume Tab

  • Click the “Choose Costume from Library Button” highlighted below

New Costume

  • In the Sprite Library, under the “transportation” category, double click on the “Helicoper”

Helicopter

  • In the editing panel, click the “Flip Left-Right” button so that the new costume is now facing the other direction.

Flip Direction Button

  • Now you should have 2 costumes for your helicopter like the picture below.

Two Costumes

Use the new costume you just made when the helicopter flies left. This block might be helpful:

Switch Costume Block

Exercise: Helicopter Game, Part 3

Now for a challenge!

Whenever the up arrow is not pressed, the helicopter should float down like is being pulled down by gravity.

How can you simulate gravity?

Hint: the helicopter should always be floating downward, except when you press the u arrow.

Try using a forever block to always change the helicopter’s y value by some small negative number. For example,

Change Y Block

Save as a Copy Video

Save as a Copy Video

 

X
X