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.

![alt text] (https://s1.postimg.org/17bzmvs9gf/problem.png)

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?

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.

Ok i solved the spawning part, my bad i didnt check that Controller class inherits from Actor so i can spawn it like any other actor.
Ok so when i spawn a Character i also tell it to spawn an AI Controller from a Class variable which is set to my custom AI_Controller, but calling Possess with self on this AI_Controller does not work.

For some reason when i try to print the controller name on spawned character it returns empty string instead of my AI controller.
In the World Outliner there is an AIController spawned and the character was possessed by it since the character falls to the ground after spawn, if i dont possess him it stays in air, but the AI controller code isnt working either and when i try to print it its empty.

I am very confused right now, its getting possessed but its not possessed by any controller?

And why is the engine spawning my default custom PlayerController that i set inside game mode? my custom player controller has most of the input code in it for the player and if i choose to not spawn a default character bp(set to none) the engine spawns a default pawn and attaches the custom player controller to it and i get lots of errors.

How do i stop the engine and the game modes for spawning stuff automatically, i need full controll over it.