Hello, I am having a bit of an issue with when my player can and can’t attack. I attached a screen capture of the player blueprint.
The problem is that if I spam click the attack input multiple times for a long time, even though the delay passes and the conditions are reset, my player does not play the animation for a second time as long as I keep clicking fast enough. If I wait for a moment and click slightly after the delay, it works fine.
Problem is, if a player is spam clicking, it would be natural for the attack to fire when clicking after the delay is over, but instead the animation just does not play unless waiting for a long enough time between each click. It feels very non-intuitive, because sometimes an attack simply won’t fire because you clicked too soon, and if you spam click to compensate, it actually takes longer because you have to stop spam clicking and then wait long enough before clicking to make the animation play again.
If I add a 0.2 second delay node before the “IsAttacking” variable is set to true (this variable transitions the player to the attack state in the animation blueprint), I can spam click and the attack will always fire right after the “IsAttacking” variable is reset back to false after the 0.75 delay. Problem is of course, that adds a delay to the attack input, which messes up the gameplay. I tried making the 0.2 delay shorter, but then I get the same problem mentioned above.
I’m stuck on what to do. Any help would be greatly appreciated, thank you.