Platform game Start to Finish

3

Index

Attached Files

The following files have been attached to this tutorial:

.capx

demo-game.capx

Download now 5.33 MB

Stats

8,843 visits, 18,457 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 22 May, 2018. Last updated 19 Feb, 2019

Player layer, call it player. Insert player sprite, name it Player, behaviour as follows;

Please note there is no ScrollTO behaviour added.

Sprite, set size 32 x 32, and name it Camera, and set behaviour to ScrollTO, and place the camera above the player head.

2 An instance variable, and name it Health, this must be number, and Player_DIR (Directions) must be Text.

Health = 10

Player_DIR = RIGHT

Player animation as follows;

Someone new to Construct 2 must be wondering why, named ID_IDLE, ID_RIGHT, ID_LEFT, ID_JUMP, ID_FALL, ID_SHOOTING, and ID_DEAD. Reason for this is we don’t have to keep typing set Player animation to left, right etc. You will learn this why in Event sheet.

3 Event Sheets,

1. Global

2. Main Level

3. Function

Open Global Event Sheet and click right mouse button anywhere, this should open dialogue box below.

Click on INCLUDED EVENT SHEET, do this for others too. Looks like below

Please include this in your Main Game event sheet too or you will find your game is not functioning the way you want.

Add two variables Score and isAlive to zero, and isAlive will be our game main loop meaning long as the player is isAlive equal to 1 (one) continue playing, soon as the player is dead (do-do) we set isAlive to zero games ENDS.

  • 0 Comments

Want to leave a comment? Login or Register an account!