Hey everyone, I’m having a problem with this code in the picture here:
I have a charge attack button that has a hold and release enhanced input action functionality. I’m trying to make it so that while the charge button is being held down, other buttons like dashing, swinging the sword, crouching, etc don’t work.
Whenever I plug this code in with my gamepad controller as the enhanced action input, everything works as expected. If the branch turn out true, the character will not crouch, for example, while I’m holding the sword charge button which is what I want to happen. The problem is when I try this same code with a keyboard button as the input, the branch for this condition seems to be ignored and the character will still crouch while I’m holding the sword charge button.
Why does this code work with a gamepad controller but not with a keyboard button? I’ve already tried changing the code so that the keyboard button is mapped as an option inside the enhanced input actions context, but the same exact problem happens. What am I doing wrong?