Spent all day today trying to figure this one out on my own.
I’ve created an animation state machine that contains the standard moment and jump states (like the 3rd person example). I’ve added in a combat state, and inside that I’ve created a light attack state. I want to alternate between left and right sword swings, but I can’t seem to get the logic right to make it happen.
Specifics: Alternate between left and right swings. After first attack there should be a short time window that if I hit the attack button again, it will allow me to move into the second attack, and continue on back and forth. And no matter how many times I mash the button, I only want the new animation to play once the old one is finished, but to start playing with the first attack button hit after the animation is finished.
I am using anim notifies for the time window between each swing (placed towards the end of the animation). I’ve created several “creative” ways to make it halfway work (using a bool to check if the attack button is pressed, then delaying a certain amount of time before setting the bool to false), but the delay begins to bog down after a while if I’m button mashing. I know there has to be a better way to do this.
Any help would be appreciated. I’ve attached pics below, if you need anything more specific let me know.
State Machine Blueprint: