Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.16
more ▼

asked Sep 13 '17 at 02:50 AM in C++ Programming

avatar image

117 9 14 24

avatar image walldiv Sep 13 '17 at 04:16 PM

FWIW - this is the same effect when i package the game.... AI sits in place.... all elements are in tact to make them act as it does in PIE (SingleProcess=True).

I dont understand what i'm doing wrong, what module i'm missing or what setting i'm not setting up right.... it works in SingleProcess=True.... what is the difference?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Sep 14 '17 at 02:33 PM

avatar image

117 9 14 24

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question