This is the third part of the RPG Character Movement tutorial, if you are not caught up, you can check out the other two here: Part 1, Part 2
Today I would like to show how to make our hero jump onto platforms. I know from our gaming experience we usually don’t have a top down RPG hero jumping around, but in this game, we are going to have our hero jump. I will also discuss how we could have our hero swim on a later date. I think having our Hero jump around the stage can be really nice if you want to place some gold, or a hard to reach item. Speaking of which, there was a request for an item inventory which will be in the next tutorial of this RPG development series.
Before we begin making our Hero jump, we are going to have to do several updates and changes to our code and movie clips. If you follow the steps in order you should be just fine. So lets begin.
In the last tutorial we talked about basic movement and key detection. This time we are going to cover Hero walking animation and collision detection.
First, lets begin opening our Hero movie clip set in the Library. Highlight both the left and right circled arms and convert it to a movie clip. Give the movie clip the name “arms” since this movie clip are the arms of our Hero. In the “arms” movie clip, create a tween for each of the circled arms, moving them back and forth of each other to represent the moving arms of our Hero when walking.
Today I am going to share a small sample of RPG type character movement using Flash Actionscript 3. I will say up front, this sample will look very boring, but this tutorial is for Actionscript 3 beginners. However, I will continue to build examples and more tutorials off this one. I also would like to point out that I will be writing this code in the main time line, which is something you should try not to do in Actionscript 3. So why am I writing the code on the main time line? In honesty, this is how I begin to program in Actionscript 3 to help understand the newer syntax and different structure and event handling and everything Actionscript 3 has to offer from Actionscript 2. I also would like to point out that I am not going to discuss all the syntax throughly (for the most part, but I will try my best), because if you want to program games, you will have to do some research and testing on “hows” and “whys” and “what the…?”.
So lets begin with the sample of what you will have by the end of this tutorial: