State Tree Transition OnEvent Jumps To Root When Different Event Tag Recieved

Sorry if this is something that’s been asked before, or may be a feature or how it’s intended to work.

But I’m trying to make use of events in states in State Trees in order to go to either the next state or jump to a completely different state.

However what I’ve found is that if a state tree instance receives any other event that what is defined, it jumps back to the root and reevaluates. Below shows what I’ve seen in the rewind debugger.

And below is the transition event for the “Wait For Revive” state that it’s in:

As you can see STEvent.Character.Revived is the first event it receives, which to me should be fine from a design point of view to have the option to act on that. The revive exit is sent a little later from the animation BP currently bound to a revive state node on exit.

The thing is that event doesn’t exist in this tree, it’s not used for any transition at all. Also when the event I want is sent it’s too late to do anything with it. As the tree has already jumped back to the root and revaluated the tree and selected the node to follow the party leader.

I can think of some potential workarounds to this but it feels weird to have to do so, as if I don’t send this STEvent.Character.Revived event it works as expected. Which is the character stands up, then proceeds to enter the follow state.

Any info on this would be appreciated, just so I know what the best steps to take next would be.

Try adding a Delay (forever) task to that wait for revive state.

When building something like this, I tend to put the event based transition on a parent state that contains child states that has tasks to do dialogue call outs, animation, delays, task to modify health/die… Etc.