I’ve set up a state machine in the animation blueprint for my character as shown here:
The state transitions from Idle to Jump when the bJumpTrigger boolean is true. At the start of the transition, I have a custom blueprint event “Event Jumped” being called.
When the player presses space bar, a boolean called bJumped is set to true in my c++ script for the character. The animation blueprint uses that boolean to set bJumpTriggered. When Event Jumped is called from the Event Graph of the animation blueprint, it first sets bJumped to false on the character and then sets bJumpTrigger to false. Here are the relevant parts of the event graph:
Everything seems to be working as expected EXCEPT that my custom event is only being called on every second transition from Idle to Jump. When I press space bar, the character jumps and all the animations play properly, but the event is not called until the state transitions all the way from Idle to Jump to Falling to Land to Idle and finally back to Jump (because bJumpTrigger was never cleared). I then end up stuck in the Jump animation because the character is already on the ground and therefore cannot transition to Falling. If I jump again, it again cycles all the way back around to the Jump state before calling the event after the character has landed. The event never gets called when the state first transitions from Idle to Jump after pressing the space bar and I have no idea why.

