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"

AI Blueprint not possessing pawn.


We've been following the behavior tree quick start tutorial, but we've been running into an issue.

We've got an "enemy" blueprint that has the capsule component and all the other parts that we want in an enemy that follows the player around.alt text

The Imp[Suffix] things are different flipbooks used to represent different perspectives from which the player observes the enemy character. This is made to achieve a doom-like sprite system. Enemy_Blueprint contains the blueprint scripting necessary to make the flipbook change depending on the player's view (none of this changes the orientation of the actual capsule), and it also has a rudimentary health mechanic.

Now, on to the issue: you'll notice that in the "pawn" category on the right of that image, the Auto Possess AI option is set to "Placed in World or Spawned", and the AI Controller Class is set to "Follower_AI_CON". Follower_AI_CON is close to Follower_AI_CON in the quick start tutorial linked above (this). There are two differences.

  1. Instead of event beginplay starting the execution, it's event onpossess. This was something suggested by another answer to a similar problem.

  2. There's an IsValid check on the "Get Controlled Pawn" function output to check if we actually are getting a controlled pawn.

With these changes, we were able to pinpoint the issue: there's no pawn possession taking place. With event onpossess, it never triggers (i.e., no possession is taking place). If we replace onpossess with beginplay, our IsValid tells us that "Get Controlled Pawn" is returning null. So the AI blueprint is actually never set to be the AI controller of the pawn. So the question is, why is this happening? We also tried setting the controller on beginplay within Enemy_Blueprint to the AI controller, but no dice. Also, the behavior tree is naturally never triggered, so our Enemy never follows the player as intended.

I'll be happy to provide any additional information. Please help! :)

Product Version: UE 4.8
more ▼

asked Sep 08 '15 at 05:29 AM in Blueprint Scripting

avatar image

43 2 5 10

avatar image Ramesside Sep 12 '15 at 06:33 PM

Anyone have any idea?

avatar image Laurent Giroud Dec 14 '15 at 05:00 PM

I have the exact same issue with 4.10. The (BP) controller I used was initially derived from AIController and the OnPossess event was properly called then (on the server). After modifying the parent class from AIController to our subclass of APlayerController, the OnPossess event is simply not called anymore.

I am still investigating the issue to determine whether this is an engine bug or an overlook on my side.

Update: check that the parent class of your Blueprint does declare an OnPossess event. In my case, the APlayerController did not, while the AIController does.

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

1 answer: sort voted first

I don't know why or how, but upon revisiting the issue, it... resolved itself. Seriously, it just started working. Dear people from the future: I'm sorry.

more ▼

answered Sep 16 '15 at 01:26 AM

avatar image

43 2 5 10

(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