Action Step Animations (aka Gradius-Style)(4.15)

crazygrouptrio

Active member
Want to make your player's ship bank when moving up and down like Gradius? Or just have specific animations that reset to idle when the player stops pressing that direction? This can method can do that! This is pretty simple, but since I shared it in the fb group I figured I should share it here as well for anyone who might find it useful.
HTh6QjV.gif

For this we'll just setup Up and Down like in the animation above as that is really the only thing I can see this useful. If you need the other directions, it would be pretty simple to setup on your own.
So you need 3 animation types for your player: Idle, Move Up, and Move Down. Leave all Idle animation directions set to your Idle animation. Then make all directions for Move Up your going up animation and same for down.
Ivg6v53.png

Now in your actions make action step 1 Idle, step 2 as Move Up, and step 3 as Move Down.
Now go to your input scripts, and change your StartMovingPlayerUp script to this:
Code:
GetCurrentActionType player1_object
CMP #$01
BEQ skipUpAction
StartMoving player1_object, MOVE_UP
ChangeObjectState #$01, #$02
skipUpAction:
RTS
Now change StartMovingPlayerDown to this:
Code:
GetCurrentActionType player1_object
CMP #$02
BEQ skipDownAction
StartMoving player1_object, MOVE_DOWN
ChangeObjectState #$02, #$02
skipDownAction:
RTS
Now go to your StopMovingPlayerUp and Down scripts and add this line: ChangeObjectState #$00, #$02 just after StopMoving Player1Object line in both. It'll look like this:
Code:
    StopMoving player1_object, STOP_DOWN
    ChangeObjectState #$00, #$02   
    RTS
That should be it! Now your player will trigger a specific animation when they are moving up or down and reset to idle when up or down isn't being pressed! This will also work fine for Up/Left, Down/Left, etc.
 
Top Bottom