Custom Event Fails to Trigger at Random in Blueprints

SOLUTION: I had an AnimNotify event towards the end of the attacking animation. Still unsure why, but when the Attacking animation state was getting stuck, it was looping through the first few frames of the underlying animation but never completing the animation and therefore, the AnimNotify event was never getting triggered. The solution was to remove the AnimNotify event from the attacking animation itself and instead setup a custom blueprint event under the LeftStateEvent for the Attacking animation state on the animation blueprint graph. That seems to have resolved the issue. If anyone knows why spamming an input trigger using the Enhanced Input System would cause an animation state to become stuck I would still like to know.


screen2

UPDATE: It turns out that Unreal is calling everything correctly. The issue is that when the user spams the left mouse button, the animation blueprint, for some reason, gets stuck in the attacking animation and never triggers the AnimNotify event. The transition out of the Attacking animation is set to automatic so I’m stumped as to why it’s getting stuck.

I have a character blueprint with a custom event called AttackComplete_Event. The event changes an Enum variable in the same blueprint to “Aiming”. The skeletal Mesh from this character blueprint uses an animation blueprint to trigger the aiming and attacking animations. When the user clicks the left mouse button, the character state changes to attacking, the attacking animation gets played by the animation blueprint, and then once that animation is almost finished playing an AnimNotify event built into the animation triggers and calls the AttackComplete_Event on the character. This process works nicely except when the users starts to spam the left mouse button. After spamming the mouse button from a random number of clicks (it changes every time the game is run), the animation blueprint AnimNotify event triggers during the blueprint debug and appears to call the characters AttackComplete_Event. However, when viewing the character blueprint in debug mode, the AttackComplete_Event is never executed by Unreal during this glitch. The character state never changes from Attacking to Aiming and the character animation and state gets stuck in Attacking. Has anyone encountered this issue before where Unreal is supposed to call an event, the debugger shows its calling the event, and it does call the event most of the time, but occasionally it just doesn’t run the logic inside the event for no apparent reason?

If I add a breakpoint to the AttackComplete_Event and spam the mouse clicks, it always executes that event. Without the breakpoint, it doesn’t execute the code at random. It’s like Unreal get’s overwhelmed by all the clicks and glitches?