# What should be a pawn and what shouldn't?

**URL:** <https://forums.unrealengine.com/t/what-should-be-a-pawn-and-what-shouldnt/332525>\
**Category:** Architectural and Design Visualization\
**Tags:** actor, aicontroller, unreal-engine, architecture, UE4, pawn, question\
**Created:** [September 17, 2015, 1:36pm UTC](https://forums.unrealengine.com/t/what-should-be-a-pawn-and-what-shouldnt/332525 "2015-09-17T13:36:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon54778159](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon54778159](https://forums.unrealengine.com/u/anon54778159)\
**Post date:** [September 17, 2015, 1:36pm UTC](https://forums.unrealengine.com/t/what-should-be-a-pawn-and-what-shouldnt/332525/1 "2015-09-17T13:36:21Z")

</div>

We’re making a pretty simple top down twin stick shooter in Unreal 4. Right now, a couple of us are working on enemies, and I’m a bit confused about what type of actor they should be. Right now we have a turret that inherits from actor. It pops up if the player is close enough, rotates to them and fires. Right now, it’s all in the Turret actor class. Should this be a pawn possessed by an AIController, separating the AI from the turrent’s functionality? Since instigator has to be a pawn, this would make the most sense.

Should I be careful using a new AIController for every enemy? Or is that the idea? Should stuff like this be a pawn? What separates a pawn from an actor?

---

<div class="post-metadata">

**Author:** ![Nsomnia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nsomnia](https://forums.unrealengine.com/u/Nsomnia)\
**Post date:** [September 17, 2015, 4:18pm UTC](https://forums.unrealengine.com/t/what-should-be-a-pawn-and-what-shouldnt/332525/2 "2015-09-17T16:18:49Z")

</div>

What seperates a pawn from an actor? Not much. A pawn is just an actor with a few stock components added.

You can “duplicate” a pawn by creating an actor class and adding those components and its essentially the same thing.

The core thing to know here is class inheritance and inheritance in genreal. A character class inherits from the pawn class. A pawn class inherits from the actor class. An actor class is the lowest down in blueprints, but technially it inherits from “UObject”

If your actors are working just fine, stick with them however it cant be setup to be controlled by an AiC.

Generally I create character classes for anything that needs to move like a human, and pawn for those that dont, but thats just prefernce. You can acheive almost exactly tyhe same things in character and pawn classes because they can both be controlled by an AiC and cause character inherits from pawn.

As to the AIC question. Its probably technially best to have one AiC per “type” of AI but what you can do is create a “base” AiC class which holds everything that ALL AiC’s will share, lets say a interger variable called health. Then you can right click on the AiC parent class (lets say you called it AiC\_turrentsMaster) and click “Create Child Blueprint Class”. The child class you created (by stock should be named AiC\_turrentsMaster\_child I think) will do everything and have everything that the master does, but can have unique properties. You can go a step further even and create a child class of the child class.

So you could go like this.

AiC\_base :: All AiC’s. Holds a health variable.  
AiC\_base → AiC\_NPCs :: All NPCs Inherits the health variable and adds a mesh component  
AiC\_NPCs → AiC\_villagers :: All NPCs that are villagers. Inherits the health and mesh comp variables and adds a dialog system that constantly checks if the player is trying to talk to them.  
AiC\_villagers → AiC\_femaleVillagers alll NPC villagers that are female Inherits the health and mesh comp variables and the dialog system runs constantly.

Of course I probably wouldnt go like that, but it shows you how class inheritance and inheritance works.

Generally like I said. Actors are most versitile so use them when you can, but if its a character _generally_ pawn is suggested and if its a complex character _generally_ character class is suggested.

Hope this helps  
_Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going._

---

<div class="post-metadata">

**Author:** ![anon54778159](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon54778159](https://forums.unrealengine.com/u/anon54778159)\
**Post date:** [September 18, 2015, 5:06am UTC](https://forums.unrealengine.com/t/what-should-be-a-pawn-and-what-shouldnt/332525/3 "2015-09-18T05:06:38Z")

</div>

Yeah, I’m fine with having many different TYPES of AIControllers, but worried about having MANY instances of AIControllers. Since our game will have tons of tiny enemies at once, they will all need an AIController in theory. However, I think the auto possess AIController option in pawns kinda implies this is intended. You’d almost never have a PlayerController live only as long as it’s pawn, so I figured you wouldn’t do the same with an AIController.
