hi guys basically i have set up a basic attack so that when the player presses the left mouse button it fires an attack anim montage. this all works great except if the player spams the button too fast the animation goes all funny.
How can i stop the player spamming the button? i tried using bools, and even an anim notify to tell me what the animation has finished and then only let the player attack again but nothing seems to stop the spamming animation. thanks
here is a video of what i mean. if i click the button slowly everything looks fine but as i start to click faster and faster the animation spazzes out.
so basically when i press the left mouse button it checks if the variable isAttacking is true or not.
If it is true this means we are already attacking so we do nothing.
If it is false then we need to set the boolean to true as we are now attacking and play the animation montage.
Now we have a problem, we can no longer spam the button which is good but we also are never setting the boolean value back to false therefore when we press the left mouse button again to start another attack the branch will always equate to true and do nothing.
So i added in a delay before ressetting the variable back to false. I played with the delay duration untill i got it to how i want.