Temporarily disable movement?

For questions about using Classic.

Post » Tue Dec 28, 2010 9:19 pm

The game I'm working on is a platformer, in which you hold the Jump button to crouch and release it to jump. I've got the jump itself working fine, the problem is that while Jump is being held the player continues to "run" as long as the player holds the left or right movement button, effectively letting players slide in a crouch position all over the level. The only solution I could find was to set Horizontal Movement Speed to 0, but that's no good either, then they just stop instantly when they hold Jump. I need them to slide while crouching, I just want the game to make them slow to a stop, rather than still be able to move as much as they want. Anybody able to help?
B
4
G
2
Posts: 11
Reputation: 774

Post » Tue Dec 28, 2010 9:58 pm

you could set a variable "isJumping" to 1 when he's jumping. Then only allow movement when isjumping is off.

i think theres also an option to ignore player input?
B
2
S
2
G
5
Posts: 448
Reputation: 2,546


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests