Is there a method to perform the equivalent of an external callback from an animation blueprint?
I’m attempting to build a pretty basic gameplay animation pattern where external logic can know when the animation state machine is in a good state for various gameplay patterns to resume. For example, a ladder climb; when the player gets to the top, and plays an ‘exit ladder’ animation, I need to know when to resume locomotion, and, say, enable jump. Note that I am not literally implementing a ladder, but this is a good generic example.
Normally I would do this with a callback of some sort at the end of the ladder-exit animation, but so far in Unreal the only pattern I can find is to poll an animation blueprint value, and have various parts of the state machine update that value on the ABP.
I’m not fond of polling data from a tick function in order to check what state something is in. I know you can call functions on the owning actor from the event graph, but every place where I can know that I’ve exited a state or entered another is thread-safe, which means I have no ability to call into the event graph or access other actors.
A middle ground might be for the ABP’s event graph to poll itself in order to call functions on the owner, however, I don’t seem to have any way of querying the state machine of the ABP to determine which is active.
It seems to me that the only way to do this is to use an error-prone route of manually setting and clearing values, and then checking those.
Am I wrong?