How to Posses Pawn with custom AI/Player Controllers
Ive been looking for a solution to this but there is no documentation or answer anywhere on how to do proper possession.
I have my custom character BP class and custom AI/Player controllers that both can possess the character using automatic possession.
I need these options OFF i dont want the framework to decide when and what to spawn, i need full controll over controller spawning and possession.
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/PossessPawns/Blueprints/index.html This isnt helpful, it uses references to existing level pawns, it doesnt use AI controllers, and its not spawning any controllers they get spawned automatically.
The only functions i could find are:
-Spawn Default Controller(have no idea what that means, i dont need a default controller i need custom AI/Player controllers, how do i spawn controllers from custom controller class?) Also this func doesnt give me the spawned controller reference result.
-Possess and Unposses have no documentation or i cant find it.
What i need is a way to spawn a custom AI/Player Controller (or multiple ones) and then possess spawned Pawn's with them be it in the level blueprint or a custom BP that manages the spawning of things in the level which can persist between levels, i dont want my pawn/controllers references in my level blueprint.
Do i have to implement functionality from scratch in C++ if i want control over my pawns and controllers?
asked Oct 23 '17 at 12:13 PM in Blueprint Scripting
The easiest setup would be something like this in your AI blueprint:
You will have an AIController variable which holds the controller class. You spawn the controller and posses self. BeginPlay is called each time you spawn a new actor, so when you spawn the AI this will be automatically called, the controller will be spawned and it will posses the current actor.
Follow this question
Once you sign in you will be able to subscribe for any updates here