Can't set actor's owner from Blueprint (replication)

Good day. I’m sorry for my english. Is not my native language.

I’m just beginning to understand how to use the replication. I want to do classic chess game with two players. At the moment, I have a problem related to the “set owner” node in my actor (pawn). If i set an owner (when spawn actor from class) - all good. Replication successful. But if i “set owner” for an object who was in the scene before, I can’t use “Run to server” events. Like an actor doesn’t have an owner. So i want to know Why i can’t “set owner” for an actors who was in the scene before game start.

If I understood your problem correctly spawning the chess piece at start has the correct owner but when setting it at runtime it doesn’t change?

I cannot seem to understand where you actually change the owner at runtime can you specify that to me, all I can understand is the one the is working is run through the level blueprint, the ones in the gamemode and actual actor doesn’t work correct?

Sorry if my previous reply was confusing but I want to know where you want to change the owner at runtime cause all I can see in the blueprints is that they are all called automatically like “Begin Play”, “On Post Login”.

Do you have an event where you need to interact to that actor where the change of owner takes place.
If you have that kind of event that is I would like to see

Testing in my project I was able to change owner of an actor in runtime with no problems. Using Play as Client with 2 players. I have an “Interact Event” where the claiming of ownership takes place

Hi, if you want to change the owner to a client, then you would need to do that on the server, while setting the client as new owner.

As far as I see it, in the “work-good” image you’re setting the server as owner who is already the default owner. In your first “doesn’t work” image you’re setting the client as owner on the client and the server as owner on the server (the event begin play node will be executed by everyone and get player controller with index 0 will return the server on the server and the client on the client).


Imho if you need to change the owner during runtime, then that is a bad sign :slight_smile:

Then it might be easier/better to just do it on the server. So directly where you handle the client input, do a “RunOnServer” and then continue on the server. Then you do not need to change ownership of actors during game play and do not need to switch between server and client execution on the actor.

Do u find a solution?