I want to start a discussion about the way state trees work.
If I have a node that has a transition on completion the transition does not take place if the success state is set by Enter State. Any thoughts on this - is it a bug or am I not understanding the way State trees work.
The example shows a simple state tree and a minimalist function that just prints a string and reports success - on running the tree it gets stuck in the Hello state rather than transitioning to the exit state. (confirmed using visual logger). This would seem to me to be incorrect behaviour.
Yeh I think this is a bug. From my experience and the very few examples of State Tree tutorials on youtube the Succeeded flag wont work like this.
What you can do to get around this is create a “completed” bool that you set to true after the print string. Then override the ontick function and check for when this is set to true using a branch. Connect the True pin to the exit node set to “Succeeded”. It should now work.
I am still experiencing this bug on 5.2. I’m reporting a success in the task’s on tick, I’ve confirmed it’s firing, but the state will not advance to the next state. It instead calls the task repeatidly.