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.
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.
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! :)
asked Sep 08 '15 at 05:29 AM in Blueprint Scripting
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.
answered Sep 16 '15 at 01:26 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here