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
40
S
12
G
7
Posts: 603
Reputation: 7,646

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
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

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: Khamsou, Yahoo [Bot] and 19 guests