Get Blackboard returns none when running Dedicated Server in PIE

I have a simple follower AI character (with AI controller, behavior tree, and blackboard) that works fine in the editor with 1 or more players, but when I check Dedicated Server (Our game has dedicated servers) the GetBlackboard node in the AI character blueprint returns none.

I have UseBlackboard and RunBehaviroTree nodes executing on BeginPlay in the AI controller blueprint. The Behavior Tree is set to use the correct blackboard and the NPC (derived from Character) is set to use the proper AI controller.

I have two other simple NPCs that work fine both in the PIE and in a compiled game on a dedicated server.

My thought is that I have some setting or flag wrong somewhere, but haven’t been able to find it. I tried comparing the working and the nonworking blueprints, but did not find the problem.

Has anyone encountered this problem and does anyone have a suggestion as to where I should start looking?

You need to make sure all the AI related code is run on the server since AIControllers do not get spawned in client code. I’m guessing that’s your problem :slight_smile:

Cheers,

–mieszko

All of the related code is in the AI controller or on the controlled pawn, but your suggestion indicated the nature of the problem.

Inserting a OnComponentBeginOverlap makes everything work right as is, but the design requires the NPC to be activated by a specific player.

I was using the OnClicked event on the pawn to activate the pawn code. This was my error. Some research has revealed that the OnClicked event does not replicate.

I’ve started researching a workaround.