Call custom event inside AnimBP?

So I’ve created a custom event inside my character’s Anim Blueprint that tells it to play a specific animation. I’m wondering how do I call this event from within my character blueprint?

For example, when the Capsule Component registers a hit even (OnComponentHit) I want to call the custom event in the anim blueprint.

We’ve always set it up semaphores in the character, to the Anim Blueprint. I.e. set a variable on the character, and then in the anim blueprint tick, check the variable and play the animation if it is set. (and then set that variable on the character to 0).

You may be able to get the blueprint through GetAnimInstance and casting to your animation blueprint, then calling the event, but the timing will be imprecise, and it may come before or after the animation blueprint is ticked.

Interesting. Then why do they let you create Custom Events in the anim BP if it’s not easy to call them from outside?
I’m going to try your suggestion of GetAnimInstance and see if that works.

Here’s an example on how to cast to it directly: https://answers.unrealengine.com/questions/24355/how-to-reference-animation-blue-print.html

you do it off the skeletalmesh->GetAnimInstance

We trigger the custom events from the animations (you can call events at certain points in the anims). Looking at the link below, I think we were unnecessarily constraining ourselves.

Thank you. Yes, that works exactly how I wanted.