Animnotify blueprint is const 4-27

I created an animnotify blueprint and I have created an event dispatcher within it. I can’t call this dispatcher because I get a compiler error “function call can modify state and cannot be called on none.” The target is set to self. The tab has Received Notify (const). How do I make this non const, or if it must be const how do I call an event dispatcher, or if I can’t call an event dispatcher then why are they there?

Thank you.

Animnotify are a very specifc type of event. They are designed to be triggered from within an animation and then handled in the EventGraph of an AnimationBlueprint. From there you can dispatch a regular event to the owning pawn (or wherever else you want) if you need to do anything complex.

If you want to trigger something to happen in the animation blueprint(ABP) from outside of the ABP, its best to just have the eventgraph of the ABP ask the pawn for data in its update animation tick. THis is because animation blueprints can run in a separate thread and at different timings from other objects, so its best to stick to this type of behaviour.

You can also use AnimationMontages to force a character to do specific animations from outside an ABP if that is your desire.

Thank you. That makes sense. What I don’t understand is why you can create an event dispatcher but cannot use it.

3 Likes