Animations stuck when trying to queue attacks

So I’m trying to implement attack queuing similar to the attack queuing in Dark souls. The idea is that while an attack animation is in progress i can click the left mouse button again , and transition into the same animation again , without the player model going back into the idle animation. I cant figure out a way to do this in Blueprints. My model constantly gets stuck or it starts transitioning into idle so i have to wait for it to finish, or, it’s gonna start transitioning into idle and then get interrupted but not start attacking. Instead it will just wait for me to release the left mouse button and then continue to return to idle. Any ideas ?

Here , i check to see if the left mouse button is pressed. If it is , the animation starts and when the animation is almost finished i check if my bool (queued attack) is set to true. If it is , i want it to transition back into the light attack and if it is not , i want it to return to idle. This does not work. I tried different ways of doing this but ended up having a similar problem. If i just set the animation to loop , it works , however then the player wont be able to time his attacks , instead they will happen at the same time , all the time.

If my question is unclear , please tell me so I can explain further , what the problem is .

So you want to queue/buffer attacks in blueprints?

I just need to queue one attack. At the moment I use a simple bool that determines if an attack was queued and if it is, it should send me back to the light attack from the conduit in the picture above. So the order of operations are : Attacking ( conduit ) checks to see if left mouse button is pressed, Light attack does the animation. If the animation time left ratio is < 0.3, sends it to the conduit named ‘Return to idle or keep attacking’. Then if queued attack is true , transition into another light attack, else , transition into idle. Problem is , this doesnt work.

If you’re just queuing one extra attack, instead of trying to loop back in the keep attacking conduit, what about adding another Attacking - Light Attack set of conduits afterwards that are being triggered/checked by a 2nd bool?

Click Left Once - Set A true - Delay, Set A false.
Click Left 2nd time within X time - Set B true - Delay - Set B false.

A triggers animation 1, B triggers animation 2.

I’ve achieved a similar result working entirely in blueprints instead of the animation state machine, were consecutive attacks end in a combo on the 3rd attack ala Dark Souls/Monster Hunter. They aren’t being queued up and then triggering however.

This was done by setting an integer after each attack, resetting it after a delay, and using branch checks or Switch On Int blueprint nodes to swap between attack animation montages.

Would that work if i wanted the player to able to , theoretically , attack using the same animation an infinite amount of times ? Like if i wanted the player to keep spamming the same sword trust animation and not transition into a different animation ?

Yes, if you set up your Play Animation Montage in blueprints as a custom event, say “Light Attack” then at the end of light attack, input a Delay, using the duration pin from the montage (I tend to minus it a little bit to remove enough frames to blend) and then put in a Branch before triggering the custom event again. Say for example “Play attack continuously while holding LMB”

Custom Event -
Branch “Is animation playing?” Yes - Nothing.
No - Play Animation Montage - Delay Animation Length - Branch “Is LMB down?” (Or a Bool set by LMB press and release) Yes - Trigger Custom Event

Here’s how one of my attack systems is set up, it’s triggered by a button press but wouldn’t be too complex to change it to while button is down.

Thanks man, really saved me a lot of time :slight_smile: Just started tinkering with animations and didn’t even know you could do this with Anim montages :stuck_out_tongue: