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,
2. Main Level
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.