How do I stop the player from sliding on an animation?

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I have an issue to where whenever a Player is crouching, and then they are moved left or right, they begin to slide.

    Since it's a Platformer, I have the Player on a Platform behavior.

    Right now I'm using the D-Pad to move the player.

    I added a crouching animation, and it is simulated when the d-pad down button is pressed down.

    However, if the d-pad buttons left or right are pressed while the d pad down button is down, then the Player begins to slide back left or right on the Crouch Animation.

    I tried having it to when the D-pad down button and left and right buttons are pressed, it will ignore the platformer behavior but it doesnt work.

    This is what it looks like!

    Help would be very much appreciated, I've been struggling with this problem for a bit.

    -Dell

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wrong image link, it's not displaying.

    By default, I'd say your D-Pad right/D-Pad left event have an action that makes the platformer object move to the right or left accordingly.

    Add a condition "Is NOT playing animation "Crouch"" to those events. (Add the "Is animation playing" condition, right click it and click "Invert" to obtain the NOT part)

    Whenever the "Crouch" animation will be playing, the sprite won't be moved horizontally.

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