I’m having an issue that I’m not sure is a possible bug. Long story short, I have a state tree on my ai pawn (call it ST1). The first state is a linked state that runs another state tree (call it ST2). ST2 finds a smart object, then calls UseSmartObjectWithGameplayInteraction on it which runs another state tree (call it ST3). ST3 makes the AI move to the smart object and perform an interaction. This all works as expected and is super simple. Once ST3 completes, ST2 moves to the next task and the AI moves to a random location, then tries to find another smart object and claim it again (constantly doing this). I’m trying to send a event to break out of this so when an event is received, ST1 transitions from state 1 (that runs ST2) to another task. My issue is, while the UseSmartObjectWithGameplayInteraction task is running none of the state trees can receive events until after the UseSmartObjectWithGameplayInteraction finishes for some reason. So when an emergency happens and I need the AI to stop what their doing and go do something else (i.e. go from the first state in ST1 to the second one). From digging into the GameplayInteractionContext, it’s tick is calling tick on the state tree’s context which does make its way down to call and process events returned from GetMutableEventsToProcessView and GetEventsToProcessView so I’m really not sure why the events are not being received.
Edit: Well for some weird reason it seemed to be related to my move to task. I switched to using Epic’s move to and now it works. The only thing I’m unsure on how is figuring out how to complete the smart object’s state tree so it cancels out and unclaims the slot in the smart object. Right now when the event fires it ends up running my task that the event transitions to as well as the smart object state tree
Edit again: Figured it out, each smart object runs its own state tree so events from the AI’s state tree component are never received.