How do I stop jump direction change in mid air?

Just started using Construct 2? Post your questions here

Post » Sat Jan 30, 2016 5:26 am

Hello,

I have a character that has the platform behavior and I also provide the player with alternate controls using WASD (default controls still enabled to have both controls and reduce number of actions).

My problem is as follows, I'd like to stop the player from changing their direction of jump after jumping. I think a perfect case of this is in Castlevania. I tried the actions:

On Jump -- Disable Controls
On Floor -- Enable Controls.

However that ends up with the player jumping in place and not anything else. I tried it with a boolean such as below:

On Jump -- Set Bool to true
Bool true -- Disable Controls.
ON jump (inverted) -- Set Bool to False.

But that doesn't work. It works for like a second and then it stops all controls. Is there any quick way to fix this, please?

Thank you very much in advance.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Sat Jan 30, 2016 5:52 am

On air try to set acceleration and decceleration to 0, then restore it back to normal when on ground
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sat Jan 30, 2016 7:36 am

Ahh, I knew it was simpler than the disable controls. Thank you very much!
B
19
S
7
Posts: 161
Reputation: 1,751


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests