How do i call a blueprint custom event when i enter or exit a state in the animation blueprint state machine?

Hello i need to run some logic when the character enters a state in the state machine of the animation blueprint, how do i do that? When i click the state i have the option to type a Custom Blueprint Event on the 3 different stages (Entered, Left and Fully Blended). I tried creating a custom event called Test in the Event Graph for the animation blueprint and i specified that event on the Custom Blueprint Event but it’s never fired, call you tell me how do i achieve this? Thank you

Nevermind i’ve found the answer, just right click on the Event Graph and there will be a Add State Machine Event and it will list all the events you’ve specified :slight_smile:

hey, i was interested in this but when I right click on empty space in the event graph, I don’t see that Add state machine event :frowning: do you know if I’m missing something here ? Thanks you !

Hello :slight_smile: I forgot to mention some steps:

On the state, need to name the event on the Custom Blueprint Event and hit compile.

After that go to the event graph and right click on an empty space and search for the name you’ve entered.

19628-2.png

Et Voilá ! :stuck_out_tongue:

1 Like

Cool ! Thanks for your reply ! I’ll try that today :slight_smile:

The fields to enter the name are gone now ? AnimBP BP custom events on State machine state changes and transitions are gone? - Character & Animation - Unreal Engine Forums

Add State Machine Event doesn’t show up in 4.7.1…

I used a Entered State Event yesterday on 4.7.1, so it’s fine for me.

you must have something else set up… I don’t see “Add State Machine Event” either. I found the answer over here… had to look for EventAnimNotify in the classes. https://answers.unrealengine.com/questions/10216/how-to-use-state-event.html