Reply To: Turn-based logic best practices?

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

#13981
Gavalakis
Keymaster

Hello again,

I understand what you mean. Maybe there is a simple code change solution. Can you please try opening up Node.cs file and in method “Execute”, changed the last few lines to be like this:

The change here is to comment out the ‘isChecked’ property set, which is also the reason why the behaviour is getting stalled on subsequent “StartBehaviour” calls.
With this change, when an exception is thown, the tree will remain active and running. As such a good change without your code where you call “StartBehaviour()”, would be to first force “StopBehaviour” before starting it, like for example:

Let me know if the above works for you.
Thanks.

Join us on Discord: https://discord.gg/97q2Rjh