# AI Character: No owning connection

**URL:** <https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237>\
**Category:** AI\
**Tags:** connection, aicontroller, unreal-engine, Multiplayer, question\
**Created:** [January 10, 2018, 3:46pm UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237 "2018-01-10T15:46:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Napoleonite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napoleonite](https://forums.unrealengine.com/u/Napoleonite)\
**Post date:** [January 10, 2018, 3:46pm UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237/1 "2018-01-10T15:46:44Z")

</div>

When calling a server RPC on a character that is controlled by an AIController (like an RTS unit) will throw the following warning:

> LogNet: Warning:  
> UIpNetDriver::ProcessRemoteFunction:  
> No owning connection for actor  
> RTS\_Test\_Character. Function Server\_RPC\_Foo will not be  
> processed.

This makes sense because the Player whom calls the RPC is not technically the owner of this actor, the server is. But, how can you make this work? How is this intended by Epic?

Note that someone gave me a c++ hack around it _(by overriding the GetNetConnection() in every such actor that has server RPC calls and assigning the first PlayerController to it instead)_ but what is the ‘non-hacky-way’ of doing this?

---

<div class="post-metadata">

**Author:** ![xsmokumsx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xsmokumsx](https://forums.unrealengine.com/u/xsmokumsx)\
**Post date:** [October 15, 2021, 3:15am UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237/2 "2021-10-15T03:15:50Z")

</div>

I would really like an answer to t his as well because im having the same problem.

---

<div class="post-metadata">

**Author:** ![GamesByHyper\_Eric](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamesbyhyper_eric/32/709237_2.png) [@GamesByHyper\_Eric](https://forums.unrealengine.com/u/GamesByHyper_Eric)\
**Post date:** [December 3, 2022, 1:16pm UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237/3 "2022-12-03T13:16:24Z")

</div>

Hello! Have you ever found a solution and are you willing to share that?  
Thank you in advance and with kind regards,  
Eric

---

<div class="post-metadata">

**Author:** ![GamesByHyper\_Eric](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamesbyhyper_eric/32/709237_2.png) [@GamesByHyper\_Eric](https://forums.unrealengine.com/u/GamesByHyper_Eric)\
**Post date:** [December 8, 2022, 3:00pm UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237/4 "2022-12-08T15:00:16Z")

</div>

Solved it. I confirmed that the AI is being run on the server and the server also own the AI. So I am able to call RPC’s and replicate back to clients from any AI. You just need to make sure that you are also not running it double on the client, because that can give you trouble. I thought it was doing that by default but it is not and is actually quite logical.

---

<div class="post-metadata">

**Author:** ![bbois1999](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bbois1999](https://forums.unrealengine.com/u/bbois1999)\
**Post date:** [February 7, 2023, 12:02am UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237/5 "2023-02-07T00:02:32Z")

</div>

Can you send your code as to how you did these things? I’m getting completely spammed by this warning in my logs

---

<div class="post-metadata">

**Author:** ![GamesByHyper\_Eric](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamesbyhyper_eric/32/709237_2.png) [@GamesByHyper\_Eric](https://forums.unrealengine.com/u/GamesByHyper_Eric)\
**Post date:** [February 11, 2023, 3:25pm UTC](https://forums.unrealengine.com/t/ai-character-no-owning-connection/414237/6 "2023-02-11T15:25:07Z")

</div>

Add a Switch has Authority before you are running any code on your AI. Use the authority to only keep it running on the server.

Sometimes you would want to run some things on the client as well or only on the client. That code can be connected to the remote.
