Hey,
I thought I had finally understood everything concerning replication but unfortunaley I came across some big ambiguities…
My question concerns the “owner”-principle. When I have a City class, spawned on the server in the player controller, this player controller should be the owner, right? But, now, what happens when I spawn inside the city class another actor, and now the city class is the owner. What do I get now when I use COND_OwnerOnly?
I will describe my actual problem:
I have a city class that is spawned in an city-manager class that only exists in the gameState and replicated to clients. Therefore I pass a PlayerController pointer to set this controller as the owner of the city.
Now, this city spawns a nobleman-council class inside BeginPlay, and setting the instance of the nobleman-council to COND_OwnerOnly. The variables in the council also are all COND_OwnerOnly. But who is now the owner of the council? I mean, actually the city. But it’s the same game-instance… It’s like replicate from server only to server?! So my “owning” client doesn’t get the data, but when I set replicate freely to all, everyone gets it. How can I get to just replicate to the original player-controller? I tried to make the controller itself the owner with spawnParams, but this didn’t change a thing…