Physic platformer, how to disable mid-air jump?

Get help using Construct 2

Post » Wed Nov 21, 2012 9:38 pm

Hello guys,

I'm using physics object as my platformer player, so I use the impluse to make player jump. the problem is, player can jump when ever impulse is there. I want make player only able to jump when landed. any ideas?
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Thu Nov 22, 2012 1:13 am

Why not just use the platform behavior? Is there a reason you are using physics instead?
B
44
S
13
G
7
Posts: 603
Reputation: 7,936

Post » Thu Nov 22, 2012 1:56 am

Make a variable and add 1 whenever you jump . and make a condition that blocks you whenever the variable is egal to 1 and make it 0 when you get on the ground

B
38
S
16
G
17
Posts: 2,230
Reputation: 17,220

Post » Thu Nov 22, 2012 10:43 am

Yes I have tried the variable way. I have a variable IsLanded set to 0 default, when landed(collided with ground object) set to 1, but then how do I set to 0 when in the mid air? I can't use Else event, and I can't invert the collision event:/
B
14
S
2
G
1
Posts: 94
Reputation: 2,089


Return to How do I....?

Who is online

Users browsing this forum: bikachu, blaze ritter, Fenix18, iEatwe, MAVERICK, nad10221 and 8 guests