# How to define a pawn owner on pawn spawn?

**URL:** <https://forums.unrealengine.com/t/how-to-define-a-pawn-owner-on-pawn-spawn/376841>\
**Category:** Multiplayer & Networking\
**Tags:** owner, unreal-engine, Multiplayer, pawn, question\
**Created:** [November 19, 2016, 7:09pm UTC](https://forums.unrealengine.com/t/how-to-define-a-pawn-owner-on-pawn-spawn/376841 "2016-11-19T19:09:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaffeetrinker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kaffeetrinker](https://forums.unrealengine.com/u/Kaffeetrinker)\
**Post date:** [November 19, 2016, 7:09pm UTC](https://forums.unrealengine.com/t/how-to-define-a-pawn-owner-on-pawn-spawn/376841/1 "2016-11-19T19:09:52Z")

</div>

Hi!

I’m building an RTS like game and I’ve run into some struggeling.

I want to place a building which spawns pawns. For singleplayer, no problem.

Now I want to add multiple players and this question came up: **how to know, who owns which pawn**?

My first thought was to add a PlayerID property to all buildings (Actors) and units (Pawns) and copy playercontroller-\>player state-\>player id into that.

Is this the right approach or is there already a better way in UE4 to differentiate between which player controlls which pawns/actors?

Also please keep in mind, in the future, AI controlled players should be possible (have their own Player ID).

C++/Blueprint is both ok.

Thanks!

---

<div class="post-metadata">

**Author:** ![lotodore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lotodore](https://forums.unrealengine.com/u/lotodore)\
**Post date:** [November 20, 2016, 10:03am UTC](https://forums.unrealengine.com/t/how-to-define-a-pawn-owner-on-pawn-spawn/376841/2 "2016-11-20T10:03:08Z")

</div>

Maybe this link helps? [Set the Actors Owner in C++ - Programming & Scripting - Unreal Engine Forums](https://answers.unrealengine.com/questions/167742/set-the-actors-owner-in-c.html) but probably you are looking for a different kind of “ownership”…

---

<div class="post-metadata">

**Author:** ![Kaffeetrinker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kaffeetrinker](https://forums.unrealengine.com/u/Kaffeetrinker)\
**Post date:** [November 20, 2016, 11:40am UTC](https://forums.unrealengine.com/t/how-to-define-a-pawn-owner-on-pawn-spawn/376841/3 "2016-11-20T11:40:20Z")

</div>

Not what I was searching for. The topic is hard to search/google for, as the questions/solutions like yours appear. I search for a method to define, which pawn/actor belongs to a player (faction/team?) As all my pawns are spawned by the server, the authority is not the solution.
