Catch The Clown
3 Adding Interaction

Section Menu

Catch The Clown Home | 1 | 2 | 3 | 4 | 5 | 6 | 7

We need to add events to deal with the user clicking on the clown. There are 3 actions to add,

  • Add 10 points to the score
  • Make the clown jump to a random position
  • Make the clown start moving in a new random direction and slightly faster.

Increasing The Score

  • Open up the clown object window and add a new event. Click on Mouse and choose Left Pressed.
  • Drag in the Game Maker Screenshot Set Score icon (look under Score) and fill in the window as shown below.
  • By clicking the Relative box we add 10 to the score. Otherwise the score will always be 10.

Game Maker Screenshot

Moving To A Random Position

  • Drag in the Game Maker Screenshot Jump To Random icon and press OK in the pop-up window.

Changing Direction & Increasing Speed

  • Drag in the Game Maker Screenshot Move Fixed icon and fill in the pop-up window as shown.

Game Maker Screenshot

Notice how we are adding a small amount to the speed each time the user hits the clown. This makes the game more difficult the more successful the player.

Save your work and test the game at this stage.

⇐ Previous | Next ⇒