okay, here’s the situation.
My character can attack, by swinging his weapon. And once he starts an attack, i set the animator bool isAttacking to true. Thusly preventing the attack from being interrupted
Near the end of the attack animation, is an animation event. It calls a function which sets isAttacking to false, allowing farthere attacks to be done. I deliberately have this NEAR the end, not AT the end. so that there’s a short period of relaxing back to normal stance where the animation is technically still playing, but as far as i’m concerned the attacking part of it is “done” and i want to allow more attacks to happen.
Now the problem is, if i spam click the attack button, it breaks. If i attack again during that winding-down period, isAttacking is set to true, but the attack animation is already playing, already past the ending point, and it does not restart. This causes me to get locked in a situation where i’m no longer attacking, but isAttacking is still set true and i can’t start a new swing.
What i would like to happen is, if isAttacking is set to false, the attack animation starts anew, whether or not it’s currently finished. How might i accomplish that?
picture: