So I seem to be misunderstanding unreal engine state trees, here is a simplified example of my layout. Basically I have a parent state with an enter condition that is true (in this example SomeTaskThatNestedStatesRequire). That enter condition has a task assigned to it that does something like filters actors or whatever. If the filter fails and it isn’t able to find a valid target. I want the state to jump to the idle state. I know that if you call “FinishTask” in a state tree task, it triggers a re-evaluation of the tree if my understanding is correct. So I guess what would the best/correct way be to setup a state where if the “filter” task fails, the branch is skipped?
The task, in this case “STT_Find_Actor_Test” may be a computationally expensive task, so I don’t want it running every update. That is why I’m using an enter condition. That said the task which in this case is supposed to find an actor may fail if there are no valid actors. In this scenario I would like the tree to move onto the idle state. I have tried calling the “FinishTask” function in the STT_Find_Actor_Test when the task fails to find anything, hoping that I could use a transition with a condition to handle it like so:
Seemingly though these transitions aren’t intended to handle transitioning into child state, since it appears the “Wait” state is already active by the time STT_Find_Actor_Test calls FinishTask.
I think I could use an global task, or evaluator to run the STT_Find_Actor_Test every tick and use its result to drive the enter condition, but like I said, some of these tasks can be computationally expensive.
Anyway, if anyone knows the “fix” or if I’m doing this completely wrong and there is a better way I’m up for anything at this point! Thanks.