Proper use of Switch Has Authority

Switch has authority just tests if the player is the client or the server.

So everything behind “Authority” only gets called if it’s called on the server and everything behind “Remote” gets called if a client uses it. I guess the server itself counts as a client too :X.

If you have a replicated variable, that holds your weapon, you can make a custom event that is called by client and only runs on server (so behind the red node you put the Switch node and take the Authority). If the client knows what he picked up, you could pass the weapon by the custom event inputs and fill the variable with it. If the variable is replicated, you don’t need the multicast i think. This is what you already did i guess?

I don’t know if your variable is set to replicate, so you could try changing this and removing the multicast. If it doesn’t work, then i’m wrong, sorry. (: But at least give it a try. If you current setup works completely fine, i guess you can stick to it.

The best thing to learn the networking system is to watch the networking videos on Youtube, made by Epic. They teach you how to replicate things to other players and much more.

Most of the time i have a twist i my head too, thinking about the networking RPCs.

5 Likes