Sword attack bug!!

Hello!! I have this problem, where if I use my “Light attack” during one of my other animations (Combo attack, or heavy attack) it doesn’t let me do the said Light Attack afterwards at all.

I think it needs a “cooldown” for each attack, so they wouldn’t overlap and disable each other, but I’m still new to Unreal so not quite sure.

Any help would be appreciated!

First picture: Both of the attack animations of “Light Attack” (Swing from right to left, and vise versa)

Hi there,

First there is a flip flop already ?
image

You can just search flip flop node it should be there.

To clarify the question.


LightAttack (FlipFlop one ) Works normally, Heavy & Combo Attack works normally.

LightAttacks stops working after you make Heavy or Combo Attack.


I see two different bools
image

And
image

if you can make only ONE LightAttack, ComboAttack, HeavyAttack at a time, then there should be one bool. Simply bCanAttack. Even you can make a macro CanAttack make a branch inside and use everywhere.

If they can execute independently then can cause issues on your scripts.

Since these are not shared, you are possibly making an attack, and during that time you press light attack. Because the bools are not shared, LightAttack executes under the hood and sets DTSAttacking to true. However, you don’t see the animation since the heavy animation is still playing or not fully finished. After the heavy attack animation finishes, you try light attack again but now you cannot execute it, because it already triggered before and DTSAttacking is still true.

Also its good practice to close attack gates (bools false) on interrupt on cancelled

Let me know if it helps.