Jumping in midair

Get help using Construct 2

Post » Fri Oct 14, 2011 6:18 pm

Hi,

Currently working on making a platformer but I can't figure out how to allow my character to jump while in midair.

At the moment my character has a rolling attack; I'd like to allow the player to make a rolling jump off platforms in a similar way to the Donkey Kong Country games.

This would also be useful knowledge for later if I want to include a standard double-jump move.

Thanks. :)
B
2
G
1
Posts: 2
Reputation: 479

Post » Fri Oct 14, 2011 6:31 pm

Use the 'set vector Y' action. A negative Y value will make them jump up, even if not on the ground. So if your jump strength is 500, setting vector Y to -500 has the same effect. To stop them being able to jump infinitely, you probably want to set a flag when the player lands on the ground, and clear it when they do their double jump, and make sure the flag is set before allowing a double jump.Ashley2011-10-14 18:31:31
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Fri Oct 14, 2011 7:28 pm

Ah thank-you so much! Was looking around for it for a while then realised I hadn't upgraded since release 60, whoops.

Cheers again. :)
B
2
G
1
Posts: 2
Reputation: 479


Return to How do I....?

Who is online

Users browsing this forum: Callan S, getplay, Kagubro and 24 guests