Is it possible to use behavior tree on Player Controller?

Hi, I would like to ask if I can use the behavior tree which was used to control AI on my player?
I followed the documentation and made a simple Behavior tree, it works fine on AI controller but I found out that the RUN BEHAVIOR TREE node’s target is AIController only. Is that means the behavior tree can only used on AI Controller?
image

To make my situation clear, I’m trying to find a method to do loadtest on Dedicated server, Now I have a client without graphic and it can be runned on my server, connecting to my ds
server. But I want multiple player characters on my ds server not only just connecting, but also simulating the real person playing the game. I could just spawn multiple ai but that means the data transfer between client and server would be ignored. So I’m thinking if I can use the Behavior Tree to control the players.

You can’t run a PlayerController with a BehaviorTree, no.

There is a system in the engine for running tests that you can do something like running around with a test character plugged into an AI.

I’m not entirely clear on what you’re trying to do, with “the data transfer between client and server would be ignored”. If you’re trying to network test the game, I don’t think there’s anything built in for that (I might be wrong though!) that would allow you to do something like that, but you could make a AutomatedTestingPlayerController or some such that extends PlayerController, and will run various command sequences to your server via some method.

1 Like

Hi there,
Player controller and AI Controller cannot coexist. You can switch between those two if you want to create an “auto-play mode”. For this, you want to check the “Action RPG” template that was shipped with this feature. Also, you can add an AI controlled actor to your player as a “child actor blueprint”, to act as an “AI companion” or “personal assistant”, so to speak.

Yes, I’m trying to network test the game. I tried to make multiple ai on the server but in that case, all the calculation like Navmash would be done by server, which means the server performance would be different from the actual situation.
A AutomatedTestingPlayerController would be a good idea but writing a script to control the player would be a huge amount of workload so I’m thinking if I can find a way to offload computations like pathfinding to the client so I can let the player character to play by themselves while simulating the actual server load.

well, i think there are some settings that can be made that will allow navmesh to exist on a client… if you’re not trying to test the PlayerController, then you could instantiate an AIController on the client to control the Pawn …