How do I fix this animation issue?

0 favourites
  • 7 posts
From the Asset Store
4 Block Soldiers with different animations, 400x400
  • I am utilizing the following logic for an 8direction sprite however I am only using 4 animations. The issue is when the sprite stops moving the animation always resets to the right facing animation. When I disable that single rule it resets to the front facing animation. The sprite is not adhering to the angle its facing when its stopped. How do I fix this?

    gyazo.com/acd3cc2bad737a611ebefe25bf0f424d

    gyazo.com/cc4dead3ffb9f92d353a557844275dff

  • One screenshot is using the object's angle and the other is using the 8 direction movement angle, they are two different things. Probably you want to change the object angle conditions to 8 direction angle. You can make use of 8 direction without ever adjusting the object's angle which may be what's happening here. Check in debug if the object's angle is changing or the value of 8 direction movement angle.

  • I actually did look at the debug and the sprites angle always remains at 0 so it makes sense that the default animation is always the "Right" side. How would I use the 8 direction angle?

  • You are using the 8 direction movement angle in the other screenshot so it would be the same. It's strange that you changed it at all if it is already working for walking.

  • The movement angle does not work when implemented. I think this is because you cannot having a moving angle set while the sprite 8direction is also not moving.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are a few other options, if changing the object's angle doesn't cause any issue you can enable Set Angle on the 8direction behaviour and the object's angle will also change with the movement and the original events you have should work as it will keep the last angle.

    Another is to grab the 8 direction movement angle on button release and save it in a global variable, then use this to compare.

    Another is to use the walking animation that is playing as the object stops. If walk right animation is playing, then set to idle right.

    Also if you are only using 4 directions I don't think you need to use 'is between' condition it should be the same 4 possible values.

  • Thank you I will try these

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)