Simultaneous button press for attack

0 favourites
  • 3 posts
From the Asset Store
Zombie attack is a survival game, where you have 2 types of games: Killer and survival.
  • 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.

    I can't get the charge to work, I've tried a few other variations to no avail :(

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • cant you just add an extra condition?


    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"


    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

  • 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


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)