Reply To: How do you usually start your AI/NPC behaviour trees?

NodeCanvas Forums General Discussion How do you usually start your AI/NPC behaviour trees? Reply To: How do you usually start your AI/NPC behaviour trees?

#12238
jonc
Participant

Hi Gavalakis, thanks for taking the time to help!

May be “generalizing” was the wrong wording and poor choice of timing in my opening post. I actually meant to ask, what people do to keep their trees clean and easy readable and I assume part of that would be, for instance, to redirect to a “Goto” hook somewhere in the tree or would it be a subtree? I don’t know. That’s where I get lost. :-S

Let’s say our AI has many actions which involve a “moving to” action followed by a “interact” action. How do you handle that duplicate “goto” code best?

Gavalakis, would you mind showing me a little high-level “what-when” example? I’m just not involved enough to understand.

As for the game I am working on. It’s gonna be an mmorpg-ish singleplayer open world rpg, of course with a strong focus on the NPCs, which will have daily routines, so they’ll have to do alot of actions, like “moving to” bed and “sleep”. “moving close” to deer and “shoot”, “moving to” a well and “fetch water”. All controlled by some sort of scheduler.

But that’s a long road in terms of Behaviour Tree AI for me, because I’m not even able to make a simple agent, who attacks targets which come too close and then goes into wandering mode if target is dead or went out of chase range (using Unity NavMesh).

Thanks for anything useful you can throw at me!