Chapter 1: Part 2 - Ninja Girl Run

In the previous chapter, Step 1,2,3 we know how to Mirror the sprite images. We also create 4 sprites for ninja girl character. In this gamemaker tutorial, we will create two more sprites which will be used for terrent platform.

Step 4: Create two sprites spr_platform1 and spr_underground1.

gamemaker tutorials

We also need a background for game, right click on Background folder and create new background, load new background to the game.

gamemaker tutorials

Now we need to create Objects for the games. In this easy gamemaker tutorial, we only need 3 objects: obj_ninja_girl,  obj_platform1, obj_underground1

Create obj_ninja_girl

Step 5: Right click on Objects folder to create a new object and name it as obj_ninja_girl (or just click on create new object icon on the tool bar).

Step 6: Click on obj_ninja_girl object and edit it. Select spr_ninja_girl_idle for this object. This object has four Events Press , Press , Release , Release

event gamemaker tutorials

Step 7: Inside press Event Left, we have two Actions: Change Sprite (found on tab Main1) and Moving (Found on tab Move)

Click on Change Sprite Action to set property for it. Select spr_ninja_girl_run_left sprite because this object will move to the left so images should has the eyes look to the left side.

change sprite gamemaker tutorials

Click on Start moving in a direction Action and set speed to 7 ( running speed - up to you! greater faster the ninja girl can run) and select the arrow left icon to set the direction moving to the left

moving gamemaker tutorials  

Step 8: Doing the same Step 7 for press Event Right. but instead of set direction to left we have to set the direction to the right for this Event and we need to set change sprite spr_ninja_girl_run to make the eye and face of the ninja girl look to the right side.

Step 9: release Event Left has two Actions:  Sprite change and Moving to direction as well. But We will change sprite back to spr_ninja_girl_left sprite and set the direction center and speed equal 0, it means stop.

stop direction gamemaker tutorial

Step 10: Do the same step 9 for Release Right Event but change spr_ninja_girl_idle instead. Then, we finish set up the object ninja_girl so she can run left, right and stop now.

Step 11: Create two more objects obj_platform1 and obj_underground1, these object has no Events but we change the Depth to 2 for obj_platform1 and obj_underground1. And change the depth of obj_ninja_girl to 1 to let the ninja girl image always see over the platform.

Depth gamemaker  

Step 12: Create a new Room and Place ninja girl object, platform1 and underground to the room. Click Play and test the ninja girl now. She can run left, right and stop! We made it!

Moving Gamemaker tutorials