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!
#Basic Jump Attack Coding Issue!
1 messages · Page 1 of 1 (latest)
This is my first post too so feel free to lmk if I pasted the code wrong or something like that
!code
Posting code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Just turn on air attacks:
public bool allowAirAttack = true;
That should immediately let your right, up, and down jump attacks trigger as expected.
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
Your keyboard might not just be able to handle that many keys pressed at the same time
Try with https://keyboardchecker.com/ and see if it registers the combinations that don't work
Test all keys on your keyboard with this easy-to-use website. Works with any keyboard and any browser. Simply press any key to test it.