I’m working on a project were players can spawn actors by clicking on a card. If someone clicks on a card a “placer actor bp” gets spawned which spawns “unit actors” at the mouse position. The units should only start to replicate to everyone after someone places them.
If i place them on the server it works. It gets replicated and the client sees it. But after running it on the client, only the client can place them. They won’t get replicated. After reading more about the ExecuteOnServer RPC i figured out that it also gets executed on the client. So i checked if the one doing stuff is really the server.
The debug strings say on the server: Server: Auth, Server: Loop working (3 Times, because it loops 3 times. The string node is right behind the “Set Replicate Movement” node.
Client gives: Client1: Auth, Client1: Loop working (3 times)
The client sends the event to the server. Also the loop and destroying the actor works. But the replication doesn’t work.
I also tried using a RunOnServer event inside my Player which gets called after the “IsValid” node. This ensures I’m the owner of the actor im calling this from. From there I’m on the server. There i call the “ReplicateAll” event from the CurrentUnitPlacer. Also tried to give the event as an input the CurrentUnitPlacer (I thought, that the reference doesn’t exist on the server). I got the same problem there with both tries.
It’s a listen server. Not dedicated.
Server to Client works
Client to server not