gedamial
(gedamial)
March 31, 2016, 8:56pm
7
One is an RPC call that moves the call to the Server, Client or Multicast (3 different types of RPC).
The other one is to check if the instance, which is calling the function, is running on the Server or the Client.
There are even more checks, for example if it’s a dedicated server or not.
For example: Dedicated Server don’t need a UI, so you can make sure the UI spawning logic is only called on ListenServer
and Clients.
Authority Checks are not about calling something. They are more about making sure that only a specific kind of authority can
use a specific function.
A Server RPC would mostly not be used to update the Leaderboard, since the whole killing should only happen on the Server.
The Client only gets the visual effects.
But pressing “Shoot” (left mouse button) is a client action and needs a Server RPC to actually handle the shooting and replicate it.
But then when I start the game and in the BeginPlay I print a DebugMessage, why does the DebugMessage gets printed as many times as the number of players ?
To execute that function exclusively on the client I’m controlling, I should use a RPC-Client call then?
@eXi Also, it looks like for each player there’s a server… look at this:
When I start the game with 2 players (1 server, 1 client), I get
Server: YOU ARE THE SERVER
Server: YOU ARE THE SERVER
both in the Client and Server window.
#Headache