In a State Tree, trying to find a way to use the "Output"s from a Task as “Input” to the next Task? Also tried finding a way to send outputs to a Global Task or Evaluator.
Any suggestions?
In a State Tree, trying to find a way to use the "Output"s from a Task as “Input” to the next Task? Also tried finding a way to send outputs to a Global Task or Evaluator.
Any suggestions?
Hi espr3ss0,
Instead of using the tasks as states, use them as tasks. For example, if you want your npc to get a patrol point location and move to it, instead of using the state tree as follows:
Add all the tasks to Patrol:
This way, you can use the output Location in GetPatrolPoint in MoveToLocation:
Hopefully that makes sense.
Thanks but a bit limited, can only have those happen together.
Can you give an example of the tasks and tree setup in which you are wanting to use the Output as an Input?
If you want to push data back to Global Tasks, I recommend using a parameter on the StateTree and have the task that you want to update the parameter use TStateTreePropertyRef<>
that binds to the StateTree parameter you are updating. The property refs are currently only available in C++ in 5.4.
-James