RPG Tutorial (Part 1)

3

Index

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

19,342 visits, 47,187 views

Tools

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.

With this 4, 4 strip all you have to do is import it as strip and set number for Horizontal = 4 and vertical 4. From this strip create five Animations and name them as below:

ANIM_idle

ANIM_left

ANIM_right

ANIM_up

ANIM_down

Now let’s give behaviour to our player.

8 Directions

ScrollTo

BoundToLayout

For ScrollTo we could create our own Camera to follow player but, for this tutorial this will work fine.

Set Max speed of player to 1

Default control to NO

Player behaviour below:

Ok so far so good now adding movements of player. Before we do that name the Layout to Main_Game and rename the Events to Maingame_Event. Add one more Event Sheet and name it Player_Event. Make sure you save your projects. Looks like below:

Now let’s add some actions for our Player.

In our Maingame_Event right click and click on Include event. Add this Playerevent in Maingame_Event. Looks like below:

Now open Playerevent sheet and add codes below:

Create global Variable Player_Direction = “” (text Variable)

If W is down then Move player up in Player_Direction 270 degree

System set Value Player_Direction to “up”

Spr_Player set Animation to "ANIM_" & Player_Direction

Looks like below:

  • 0 Comments

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