Best way to change an anim blueprint statemachine state from another blueprint

I need to have a characters animation change when a lever is pulled in the my level and when the character comes into contact with certain objects but am struggling to do this. I’ve tried to use direct communication, event dispatchers and interfaces but have failed to get any of these to work. Could someone show or point me to a good example of how to do this.

There are several different ways to this.

Ideally, you would want to set a function call inside of your AnimInstance to set a variable which is monitored by your State Machine transition logic. Call this function from your CharacterBlueprint.

Ok, you can use the the node:

“Get Anim Instance” from your character blueprint. Then you can cast it to your custom class if you extended it.

Hope that helps =)

My problem is that I’m trying to call a function that is in my animation blueprint using direct communication from my Character blueprint but I’m unable to select it when referencing it.

I’m unable to put anything in that box.

55480-capture.png

Thanks that worked.