How to reassign AI controllers to new pawn
I have three characters in my game where the player can cycle between them. What I currently have setup is when the player possess a new character, I a new AI controller on the previous pawn. However, with the current setup that I have, I'm continually creating new AI controllers and eventually it will clog up my outliner and suck up needed resources.
Would anyone have any idea on how to either reassign the AI controller to a new pawn when I possess the character that it's currently on or destroy unused AI controllers?
Thanks for any and all help!!
P.S. Here's what I have setup atm
asked Jan 15 '16 at 04:06 PM in Blueprint Scripting
AIController is like PlayerController, they are based of same class called Controller class and Pawn universally treats them as that class, so AI can dynamicly change possession too. So insted of "Spawn Default Controller" multiple times, spawn the controller just once get it set to some varable and change the possession same as you do with PlayerController
Follow this question
Once you sign in you will be able to subscribe for any updates here