State Tree ... how use Output from Task?

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:

  • Root
    • Patrol
      • Get Patrol Point (Tasks: STT_GetPatrolPoint)
      • Move To Location (Tasks: STT_MoveToLocation)

Add all the tasks to Patrol:

  • Root
    • Patrol (Tasks: STT_GetPatrolPoint, STT_MoveToLocation)

This way, you can use the output Location in GetPatrolPoint in MoveToLocation:

image

Hopefully that makes sense.

Thanks but a bit limited, can only have those happen together. :frowning: