[VIDEO with problem] Multiplayer issues with actors and functions

Hello everyone

Basicly this is my first try using blueprints, before that I only used C++ but decided to try them out and it looks stuff is getting faster and easier for experimenting. So I tried to make multiplayer pickup system for me. But it seems like the code is working only on the server side. The Client doesn’t work at all.

I have basic understanding that I need to replicate functions from server to everyone but did not understand quietly well how to implement it.

Here’s a video with my problem with clearer understanding:

I had the same issue with C++ so that’s why I decided to go for blueprint version, but no luck

It should be very easy, if you have set replicates on your actor. To destroy you actor you can call the destroy node only on the server and it will get destroyed on clients as well, you don’t need to call a multicast for that.

Ok, you need to always remember: The Server is the one who decides what in the world is happening.

So if a Client wants to destroy the Pickup it needs to ask the Server to do this. How?

You create a custom event that is set to Run on Server. You give this event an Input for the Object that
you want to destory and call the destroy function with this custom event.

You are right to use a custom event but you need to set it to Run on Server.

If you have trouble understanding how replication works, then i recommend you to start smaller.

Spawn and Destory a single object. Just a Mesh or something. Ray Trace it and try to destroy it with replications
through the server.

The server can destroy your apple because it is his right to do so.

It is possible to give client power over actors in the world, but then these actors are really only for him. No one
else can see them and know that they are there.

HA! Cool I just changed the custom event to Run On Server and it worked! Thanks for the help guys.

What about the character? It’s still not being seen in the game? Client doesn’t see the Server and vice versa.

I guess that’s because the Model itself is set to only be scene by the owner. Check the Components Tab und the Mesh.

Search for “Owner” and you will see these two options. I guess “Only Owner” see is marked there.
The First Person Template only has Arms and the Weapon. They are set to “Only Owner” because otherwise you would see
floating arms in multiplayer.

You will need to add a new Mesh (the THIRD person one for example) with a weapon (i guess the Market Place has Animations for that).
There you leave these two check marks empty and the other Player should see the model.

http://puu.sh/fkEVR/342a877b4e.png

You can use the “Animation Starter Pack” (it’s free) from the Market Place for this second Mesh.

Yes that was the problem :smiley: thank you