Simultaneous button press for attack

Get help using Construct 2

Post » Fri Nov 09, 2012 3:06 am

I'm trying to add a "charging attack" animation for when I press two buttons at the same time (D and J). But I also have various other animations setup for ground, running, and air attacks. My goal is to do a charge attack animation (D + J [while on ground] and [not running]), then when J is released, they do their kick animation.

https://www.dropbox.com/s/w1zloxmzdtyzsns/AttackActions.png

I can't get the charge to work, I've tried a few other variations to no avail :(bscarl882012-11-09 03:07:15
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Fri Nov 09, 2012 4:32 am

cant you just add an extra condition?

like
Condition 1->on key D down
Condition 2->on Key J down
Condition 3->is player on floor
Condition 4-> is animation(running)playing

Action-> player set animation "Charge Attack"


etc

if not that then something like

on the above Key releases set a Variable if all conditions are met...
and a new event that checks this Variable...and if true then play kick animation...

it should work
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
29
S
11
G
8
Posts: 313
Reputation: 7,335

Post » Fri Nov 09, 2012 5:17 am

I ended up getting it to work by putting an IsCharging Variable onto the character.

|On J Press| > [Is Left OR Right Pressed AND Player is running] set side charge animation, set IsCharging to 1

|On J Release AND IsCharging = 1| > Set IsCharging to 0,
set animation SideAttack,
set IsAttacking to 1

Boomshakalakabscarl882012-11-09 05:18:26
B
32
S
4
Posts: 405
Reputation: 3,219


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, dieblume86, Kagubro, Yahoo [Bot] and 2 guests