Random Child Selection State Tree

No matter how many times I run this it never randomly selects the third child. It always prints FIRST or SECOND… What is the issue here? Adding another child allows the third to be selected but the last child is never selected.

I guess a janky workaround would be to just have a fake state at the end that does nothing…

Man you got it better then me… couldn’t make it work at all. Seems like my last 2 do get ignored. Build is similar to yours.

Did you find a solution meanwhile?

The only thing that works is having a sacrificial dummy state at the end… I wish I had better news.

5.5 Released… Still not fixed

Not only the random child selection behavior,below’s select children with highest utility and random select by utility also broken :rofl:

Hey, it’s working properly in UE5.5 as long as the child states are inherited from the proper class.


The first option BP_StateTask was a trap…
When I use that to create my task, the random select will not work properly along with the assessment of TaskCompletion.

You should pick State Tree Task Blueprint Base as the parent class to create your task.

About the select by utility, it’s also working properly.
Just don’t be fooled by the Weight, you should add some value by clicking the plus button.

Have you guys tried the dev branch? It looks like there are some fixes with the random selector

I tested it in source build UE5.6, the random selection works fine.

Just wait for 5.5.2