Reply To: Turn-based logic best practices?

NodeCanvas Forums General Discussion Turn-based logic best practices? Reply To: Turn-based logic best practices?

#13889
gtranger
Participant

Thanks for the response!

We actually already disabled the repeat option on all of our agents and set the OnEnable() option to “Do Nothing”. Currently we are invoking each of the agents with StartBehaviour() and passing in a callback to alert our AI Handler when the next agent may run.

That being said, I should have more accurately phrased my question to be “Should we be doing all of this computation in “OnExecute() or is there a better way to do this?” It feels like putting everything in OnExecute() is fighting against what NodeCanvas generally wants you to do as you lose one of the most powerful features, which is the visual debugging. As for setting break points, are you referring to the BehaviourTree itself or in the code for the ActionTask I am using?

Also, one additional question: is there any way to recover a tree that threw an Exception? Currently, if a tree throws an exception in its execution the agent will never run again on subsequent calls to Start Behaviour().