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

Just started using Construct 2? Post your questions here

Post » Mon Aug 10, 2015 11:00 pm

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!

Image


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

-Dell
B
6
Posts: 15
Reputation: 277

Post » Tue Aug 11, 2015 8:59 am

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.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
291
S
114
G
95
Posts: 7,293
Reputation: 70,144


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests