How do I make player attack while in air

Get help using Construct 2

Post » Fri May 05, 2017 10:16 pm

So I want my player to be able to do a separate attack with a separate animation if they are in the air.

Example...
If player is in the air perform ground slam attack.

Can someone please help I will pay for a video showing how to do this.
B
18
S
7
G
2
Posts: 39
Reputation: 2,374

Post » Sat May 06, 2017 2:48 am

it would look something like this. this will make you descend at 2x the normal rate.

on spacebar pressed
subevent: player is on floor >>> normal attack animation
else >>> set vector y to player.platform.maxfallspeed*2, set animation to "falling swing"

on landed
is playing "falling swing" >>> set animation "smash"

note: gravity should be set to half of maxfallspeed for this example, and jump strength should be adjusted for the gravity.
B
25
S
16
G
26
Posts: 125
Reputation: 16,103


Return to How do I....?

Who is online

Users browsing this forum: Coren8r, Yahoo [Bot] and 28 guests