Clients can't access other players' controller [Advanced Sessions]
With the current way I have things set up, to be able to find a player's Steam name, I have to have their PlayerController which I am attempting to get using the method below. The issue I've found with this is that only the server can use the "Get Controller" node and all other clients get a blank return value. Is there a better way to do this?
asked Jan 21 '18 at 01:15 AM in Blueprint Scripting
No. But you can use the PlayerState instead.
clients aren't meant to communicate with other clients its a security risk and can also cause issues with gameplay. if client 1 was directly connected to client 2 then each would have a direct line into the others PC which bypasses all security by piggybacking on the game data. and from a gameplay perspective if you have events happening that are relative to more than one player but the server doesnt know about it then inconsistencies will occur and the whole system would break down. theres a reason all actions are taken by the server then replicated on clients.
For your case i would have client one request the server to get the data. when the server gets the username it can relay it back to client one if needed.
answered Jan 21 '18 at 01:24 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here