I recently revisited some simple AI logic I wrote in an earlier version of NodeCanvas, and I noticed things breaking that I didn’t expect. Upon digging into it I found that some of my nested FSMs were returning Success and therefor stopping evaluation prematurely.
This seems to be because the FSMs in question use FromAnyState and events rather than direct connections to change states. The lack of a direct connection seems to trick the FSM into thinking it has “ended” and thus Success gets thrown.
So far I’ve been able to work around this by putting an action that does nothing and loops to itself when I’m done handling whatever I’m handling to keep the graph alive, but I’d like to know if there’s a better way to keep a nested FSM from going to Success prematurely 🙂
The version can be seen on the top right of the Graph Editor toolbar.
Can you share some screenshots of your setup? I specifically don’t understand what you meant by saying “…use FromAnyState and events rather than direct connections to change states. The lack of a direct connection…” 🙂
No, the AnyStates are connected, just the start/hub has no outgoing connections (in one case the actions off the any state also have no connections, but that doesn’t seem to matter)
I’ve attached images of the two nested FSMs that had this problem, returning success immediately to the tree above them. If I connect the states to themselves the problem goes away (v3.03).