Run On Owning Client does not work on NPC. Player Controller has been Set As Owner though?

  1. Server spawns an NPC. Immediately, that NPC has it’s owner set to a specific player controller.

  2. When tested, the Server prints the proper player controller as the owner.

  3. When inside the NPC’s BP, if I run a “Owning Client” RPC from the server, the event does not execute.

See Below…

Bump for visibility. I’d really like to know what I am doing wrong. Thank you.

Hi there,

Interesting issue, I tried to reproduce it and initially failed. After comparing what you had more closely to what I had done I found the missing puzzle piece that broke the RPC, and that was Set Default Controller.

It seems having an AI controller somehow messes this up, but I do not understand what is going on. It can be fixed by setting the owner of the controller to the same client PC, but again I could not say why sorry, as I totally can’t make sense of this and my attempts to research it are leading nowhere.

If anyone out there can explain, please please do… I can see some sleepless nights ahead (JK, but would really love to know what is happening here).

1 Like

yeah AI is always owned by the server so it must override the SetOwner.

you have to call the RPCs from your Pawn/Controller

Interesting! This would make sense why non-pawn actors spawned by the server can have their owners set and RPC’s called without issue.

Does the pawn and the controller need to have their owner set to the player controller, or just the spawned default controller needs to be set?