Multiple Characters Using Behavior Tree

I’m trying to get multiple character to use 1 behavior tree, but i can only cast to one enemy at a time otherwise complications start to occur.

(The set up in the pic shows both code wrote for each enemy character i have, they just be plugged in at the same time)

Is there a way i can make my task and services within the behavior tree more clean and able to use multiple characters without getting error messages?

Hey @oAnubus!

So if you want them to share a behavior tree, you’ll need to use a common parent. If they are both using the same variables, give them the same parent and then put those variables on the PARENT, then just cast to the parent. :slight_smile:

So i changed the casting nodes inside the task and services and they work but only one enemy can be out

image

When i place both enemies out and give them a control path to follow, the enemy closest to the player character seems to start to walk and stop each second. Is there something i need to check to fix this?

If you mean the one with the coat, it LOOKS like it’s moving from one point to the next but both points are stacked. It’s really hard to tell just by the video, but keep in mind while the game is running you can examine your behavior trees and watch them work in real time! Maybe that will illuminate your problem! :slight_smile:

hey @Mind-Brain I setup the blackboard and did all the codes in the Parent and setup 2 childs. However only 1 child is following the behaviour Tree, the second one just stands still… any suggestions?

Hey @XxRajeevxX!

Go ahead and make a new post, and bring all of the information you can give! :slight_smile: Pictures and video help the most!

Sometimes the cases are very similar, but sometimes we need to get a better look because everyone does things a little differently. Plus, being a new post it will get a lot more attention and possibly help from others, not just those who have been on this thread! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.