Download

Program Character Pawn or AI Controller?

I have a character which generates it’s own appearance and will be mostly used for bulk NPC characters. On occasion, the player will possess one of these characters.

I have already set up a Character Pawn with some basic functions to check health, hunger, and mood, but now I’m getting to movement and behavior based on these functions. Regardless of AI or Player, the Character shall always work under the same rules.

Is it safe for me to work under the assumptions that the Character Pawn is just a body, and should only have the rules programmed into it, such as status and health. Then I put AI behavior into a AI Controller class object and the program all the Blackboard and Behavior Tree functions into that so it can possess the character pawn when the player isn’t controlling it?

Thanks!

Yes. The Character is used in the same way for both AI and Player. The difference is in the Controller, where you would swap from Payer Controller to AI Controller, and vice versa.

You might find that as a Player, you need a more advanced AnimBP than an AI would.