Creating animated characters
So far, the player objects we have created have been very basic. In Chapter 1, Getting to Know the Studio with Your First Game, the player had no animation. In Chapter 3, Shoot 'em Up: Creating a Side-scrolling Shooter, the ship had animation, but always faced to the right. In this chapter, we are going to have a character that can move in four directions and have an animated sprite for each direction. We will also implement a melee attack that can be used in the direction the character is facing.
Simplifying the character movement
There are four separate sprites necessary for the player character's walk cycle. We will walk through the first one and then you can create the other three.
Let's start by creating a new project called
Chapter_04
.Create a Sprite and name it
spr_Player_WalkRight
.Load
Chapter 4/Sprites/ Player_WalkRight.gif
with Remove Background checked.Set Origin to Center.
Click on Modify Mask to open the Mask Properties editor, and select the radio button...