# State Tree ... how use Output from Task?

**URL:** <https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint\
**Created:** [May 5, 2024, 10:23pm UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940 "2024-05-05T22:23:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![espr3ss0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@espr3ss0](https://forums.unrealengine.com/u/espr3ss0)\
**Post date:** [May 5, 2024, 10:23pm UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940/1 "2024-05-05T22:23:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![earcem00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@earcem00](https://forums.unrealengine.com/u/earcem00)\
**Post date:** [May 6, 2024, 5:59pm UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940/2 "2024-05-06T17:59:07Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/7/b873c9727ebea58c56d5901e0559394c6bcadb78.png)

Hopefully that makes sense.

---

<div class="post-metadata">

**Author:** ![espr3ss0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@espr3ss0](https://forums.unrealengine.com/u/espr3ss0)\
**Post date:** [May 6, 2024, 6:17pm UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940/3 "2024-05-06T18:17:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![James.Keeling](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James.Keeling](https://forums.unrealengine.com/u/James.Keeling)\
**Post date:** [June 24, 2024, 3:53pm UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940/4 "2024-06-24T15:53:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Woestijnbok](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/woestijnbok/32/1013471_2.png) [@Woestijnbok](https://forums.unrealengine.com/u/Woestijnbok)\
**Post date:** [January 2, 2025, 4:32pm UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940/5 "2025-01-02T16:32:57Z")

</div>

So Just to make sure I understand it TStateTreePropertyRef\<\> in most cases wil be either under the Property Binding Category **Input** and sometimes **Context** but rarely a normal property / parameter or Output. All because it’s meant to write data back via the mutable pointer that’s in the wrapper?

I also watched the [State Tree Deep Dive](https://www.youtube.com/watch?v=YEmq4kcblj4&ab_channel=UnrealEngine) video which explains it at around 20:00. And from what I understand it’s mainly used to copy / write data in a more memory friendly way than the normal property bindings which just copy the properties. But you can still write to global data using the normal properties via bindings for example for an int16 which doesn’t take much memory anyway?

Hope someone can confirm or deny what I think the use cases are, thanks in advance.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [November 23, 2025, 12:51am UTC](https://forums.unrealengine.com/t/state-tree-how-use-output-from-task/1841940/7 "2025-11-23T00:51:38Z")

</div>

> [@James.Keeling](#):
>
> I recommend using a parameter on the StateTree and have the task that you want to update the parameter

I’m trying to do that on 5.7 now, in blueprints. But the parameter is not being updated. Any documentation on this?
