Spawning actor from client doesn't replicate on server

IamSpree
Tue, 20 Apr 2021 16:19:22 +0000
Multiplayer & Networking

Hello, I’m lost. I’ve been watching and reading a lot about replication and networking fundamentals in ue4 blueprints. Been spending days trying to solve this issue and I’m now desperate.

I’m trying to make a game where both players spawn their units from their own camp. Right now I already have a simple issue trying to spawn anything from the client side.

When pressing ‘F’ key on client it doesn’t spawn (on either machines) when set the event on “Run on Server”
On the other hand when pressing ‘F’ key on the server it spawns successfully for both.
This is called from my BP_Spawner actor and this actor is set to “Replicates” so is my unit spawning.

Now changing the event to “Multicast”
When pressing ‘F’ key on client it does spawn but only on the client and of course they’re not moving because they don’t exist on the server. And when pressing ‘F’ on server it works like normal but shows 2 not moving units plus 2 normal moving ones on the client.

Also another not so important problem is when spawning from server side where it’s working for both machines. The color doesn’t apply on the client side. Even tho my Enum var “Player” is replicated.

4 posts - 1 participant