#Basic Jump Attack Coding Issue!

1 messages · Page 1 of 1 (latest)

rancid crypt
#

Hey guys, I'm pretty new to Unity and coding my jump attacks, I have up down and then the left/right attack.
Currently my attacks work in the left direction even when holding the jump button, but for some reason if I hold jump and attack right, down, or up, none of the animations will play!
Would greatly appreciate some help on the problem, thanks!

#

This is my first post too so feel free to lmk if I pasted the code wrong or something like that

real bison
#

!code

jade windBOT
midnight scaffold
#

Just turn on air attacks:

public bool allowAirAttack = true;

That should immediately let your right, up, and down jump attacks trigger as expected.

rancid crypt
#

Thanks for the response, I set it to true and the same thing happened where I can jump attack left in all directions, but I can only jump attack right if spacebar is not pressed. Ex: if I wanted to attack up while moving right I would have to let go of spacebar and D before it would let me attack up

#

In the video I can attack after jumping and moving left, but when I try the same moving right it does not let me

#

IN THE RIGHT DIRECTION: Spacebarheld + D held + return button pressed = no attack animation player
Spacebarheld + D held + W held + return button pressed = no attack animation player
Spacebarheld + D held + S held + return button pressed = no attack animation player
IN THE LEFT DIRECTION: Spacebarheld + D held + return button pressed = jumpattack animation player
Spacebarheld + D held + W held + return button pressed = jumpattackup animation player
Spacebarheld + D held + S held + return button pressed = jumpattackdown animation player

real bison
#

Your keyboard might not just be able to handle that many keys pressed at the same time

rancid crypt
#

That was the issue!

#

or to an extent, I changed the attack button to K and now all of a sudden it works

#

so strange