# Help me understand State Tree transitions

**URL:** <https://forums.unrealengine.com/t/help-me-understand-state-tree-transitions/1734403>\
**Category:** AI\
**Tags:** unreal-engine, question\
**Created:** [March 6, 2024, 6:42pm UTC](https://forums.unrealengine.com/t/help-me-understand-state-tree-transitions/1734403 "2024-03-06T18:42:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![6to9Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@6to9Games](https://forums.unrealengine.com/u/6to9Games)\
**Post date:** [March 6, 2024, 6:42pm UTC](https://forums.unrealengine.com/t/help-me-understand-state-tree-transitions/1734403/1 "2024-03-06T18:42:39Z")

</div>

Trying to learn the State Tree system and trying to understand how the transition logic works. I read the introduction to the State Trees and I gathered that when a state is selected, all the parent states are also active and when a transition is triggered, the new state will become active, along with its respective parent states.

I have made a simple debugging tree.

![st1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/c/35cb0da1c307963eb8c5d8e42084b6fa2660d224.jpeg)

 ![st2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/e/99e6c90971ad3a370c3d1528e77faa8744d6151e.jpeg)

My expectation would be that i would see State 1a and its parent (State 1) running, then it would transition to State 1b (and State 1 as its parent), then to State 2.

 ![st3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/2/fc2146c086e0fbc3e82a7188406cabfb8ebff6a2.jpeg)

However it seems to be stuck in State 1a and I don’t know why.

Any insights? 🙂

---

<div class="post-metadata">

**Author:** ![6to9Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@6to9Games](https://forums.unrealengine.com/u/6to9Games)\
**Post date:** [March 6, 2024, 9:17pm UTC](https://forums.unrealengine.com/t/help-me-understand-state-tree-transitions/1734403/2 "2024-03-06T21:17:15Z")

</div>

Update:

I am looking into visual debugger and I captured some gameplay with it.  
Apparently my state tree “could not trigger completion transition” and jumps back to start.

This was maybe because “State 1” didn’t have a transition.  
So I added one.

![st6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/6/1d639c2d8a2fd0f30c7fc30586a2cbb23060a2d6.jpeg)

It’s slightly different now, but doesn’t solve my problem. :\<

 ![st5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/0/fc0222ec62011aa0d7b77bc1ebd585ebe3f21bae.jpeg)

Still not sure why ^^;;;

---

<div class="post-metadata">

**Author:** ![6to9Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@6to9Games](https://forums.unrealengine.com/u/6to9Games)\
**Post date:** [March 6, 2024, 10:26pm UTC](https://forums.unrealengine.com/t/help-me-understand-state-tree-transitions/1734403/3 "2024-03-06T22:26:14Z")

</div>

Update once more:

Soooo, the task that I used on all states was printing a string and then ending with a “Finish Task” node (set on success).

That may have been the problem… in some way that I dont yet fully understand.

Anyway, removing the task from State 1 solved my problem.

![st7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bc26624b7c853f00dd06807bf9e7efce9fa353a.jpeg)

Now it runs through the tree like I wanted it too.

 ![st8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/8/ac8e35abf5f1282004d46f8d0160f1344f024b1b.jpeg)  
 ![st9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/e/22e22f211205ea33cdf17548cfa0eca12ff903bb.jpeg)

As it is close to midnight, I will call it a day and try to understand it another day.  
If anyone can elaborate or throw their knowledge at me, that would be welcome. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [April 5, 2024, 10:26pm UTC](https://forums.unrealengine.com/t/help-me-understand-state-tree-transitions/1734403/4 "2024-04-05T22:26:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
