AIController Not Possessing AI Characters
I'm having quite the issue with our AI in our project. Here's the setup so far:
AIModule is included in project CS Enemy (ACharacter) has a BehaviorTree variable assigned AIController (AController) has both BehaviorTreeComponent & BlackboardComponent AIController - OnPossess -> Initializes blackboard & StartTree(CharRef->BehaviorTree) Enemy AIController is assigned via "Spawned or Placed in World"
The blueprint child of the Character class sets the AIController class to use - and its appropriate BehaviorTree variable.
When I playtest the project as DEDICATED SERVER + SingleProcess(True) - this works fine. . . AIController is assigned/possesses the pawn correctly and the behavior tree funcitonality works as designed.
HOWEVER: When I playtest the project as Dedi + SingleProcess(False) (which is supposed to be as close to pure packaged game as PIE mode can get) - the controller is assigned but the pawn is never possessed (I can Shift+F1 and select the AIBot and see its assigned controller)...
I have troubleshot this left & right - and cannot come up with any working solution. What am I missing here?
asked Sep 13 '17 at 02:50 AM in C++ Programming
This turned out to be a replication/ownership issue. While the controller DID IN FACT possess the pawn (i was debug stringing falsely i guess) - i was also running my behavior tree & BBoard initialization after a cast to a widget - off begin play.....
Servers - whom set up the BTree & BBoard, dont have access to widgets..... i never had a fail branch off the cast, nor did i properly set up replication standards for this class....
Moving the ccode to setup the bboard & btree to a server native function (OnPossess) solved the issues i was having.
answered Sep 14 '17 at 02:33 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here