So what I am trying to do is, I have a Trigger Box in my Level, and I want to so when I overlap on it, switch to another state machine on my Player’s Anim Blueprint.
I don’t know how to do it, or if there is a easier way to do it.
What I am actually trying to do is so when I get in a room (it’s a dark room), change my player’s animation blueprint so the player changes his animation to one where he has a flashlight on his hand (Something like resident evil 2)
Hi!
You can communcate with your ABP through your pawn with node GetAnimInstance.

For example, when your pawn overlaps trigger box get pawn’s mesh, use node GetAnimInstance, cast it to your ABP class and call whatever function or event you need.
Hope it helps.
Oh I got it, but I used another way, let me know if this is too stupid lol.
But the thing is, when i overlap the trigger box, the anim will not play unless I stop moving, but when I get out of the trigger box i don’t have to apply that stop so the animation blueprint goes back to the normal one.
you probably want to have the trigger Call an Event Dispatch, maybe in the player controller or player character.
The anim blueprint can be bound to this event such that when it fires, you can do a montage that in an upper body only slot group, that way the arm will trigger the flashlight but you could keep walking or whatever.
In order to accomplish this you’d need to be familiar with:
Event Dispatcher
Anim Slots
Anim Montage
A good reason to do this with an event rather than direct communication is because you probably also want to do other things associated with the event, like play a sound effect, start some music, etc. If you handle it with an event, an infinite number of classes can react to the event, and you don’t have to hard-couple so many together.
You can think of an event dispatch as like a warning siren. Something happens, the siren goes off and everybody can hear it. Then the only thing you need to think about is whether or not each class should respond to the event in some way, or ignore it.
This is generally easier to manage compared to having actorA talk directly to actorX. Having a direct communication system gets hard to handle quickly and has little flexibility.
1 Like