Open Poobslag opened 3 years ago
even with this fix I don't like how the walking animation plays a full loop after you stop walking. typically I'll make a walk and an idle anim and switch between them like so:
animation.add("walk_lr", [4, 3, 5, 3], 6);
animation.add("walk_u", [7, 6, 8, 6], 6);
animation.add("walk_d", [1, 0, 2, 0], 6);
animation.add("idle_lr", [3])
animation.add("idle_u", [6]);
animation.add("idle_d", [0]);
also how did you show that diff text with github's markdown?
I used the git diff
command to generate that output.
During the 4 - Sprites and Animation section of the TurnBasedRPG tutorial, there is some conflicting advice given:
This advice implies that these animations will end with the player in their 'neutral' pose. However, visual examination of the
player.png
image referenced by the tutorial reveals that the neutral animation frames are frames 0, 3 and 6 -- not 5, 8 and 2. This can also be demonstrated by playing the HTML5 TurnBasedRPG in a browser (https://haxeflixel.com/demos/TurnBasedRPG/). After moving the player, they end their animation with one leg sticking out.This can be corrected by applying the following diff, which moves the first frame in the animation to the end: