Blitz
5 Plane Movement

Section Menu

Blitz Home | 1 | 2 | 3 | 4 | 5 | 6 | 7

Create Event

Start by adding a Create event. There are four actions to add,

  • Set a variable yHeight to 16 - this will keep track of how high the plane is in the game
  • Start to play the background engine noise
  • Start moving to the right
  • Set a variable canfire to 0 - this will make sure that there is a delay between bombs.

The pop-up windows need to be filled in as shown below,

Game Maker Screenshot Game Maker Screenshot
Game Maker Screenshot Game Maker Screenshot

Outside Room Event

When the plane disappears off the right hand edge of the screen, we need to make it reappear on the left at a slightly lower height. Add an Outside Room event to the plane object. You will be dragging in the following actions,

  • Set the yHeight variable to increase by 32.
  • Jump to the coordinates (0, yHeight).

Fill in the pop-up windows as shown,

Game Maker Screenshot Game Maker Screenshot

Test what you have so far. Correct any mistakes before you go on.

Collision Event (With The Buildings)

There are 5 actions we need to take place when the plane collides with one of the buildings,

  • Set the horizontal speed to 0 to stop the plane moving
  • Play the explosion noise
  • Stop the sound of the plane engine from playing
  • Show the high score table
  • Go to the end game screen

The pop-ups for the appropriate actions are shown below,

Game Maker Screenshot Game Maker Screenshot
Game Maker Screenshot Game Maker Screenshot
Game Maker Screenshot

Test that this happens as it should.

Collision Event (With The Stop Graphic)

If the plane reaches the stop sign without having collided with a building, the player has completed a level. We need to do the following things,

  • Set the horizontal speed to 0 to stop the plane moving
  • Stop the engine noise sound
  • Play the applause sound
  • Restart the room

Drag in the action icons and fill in the pop-up windows as shown,

Game Maker Screenshot Game Maker Screenshot
Game Maker Screenshot Game Maker Screenshot

For now there is only one level, so we will simply restart the room. When you have more levels, you will need a set of actions something like those below, either load the next room or restart the current room.

Game Maker Screenshot

⇐ Previous | Next ⇒