I am trying to make a networked multiplayer game and I am using UMG for the HUD. I am simply displaying text, which displays if the owner is the server or the client. When launching from the editor and setting the number of players to two, this works as intended.
However when I run from the command line, the client displays both the server and client text overlapping one another.
Also note that on the far left I am using the Event Receive DrawHud to display the same text
Thank you for any info!
can u post your command line here, and code where u check for client or server ? For -game it will be considered as client and server together, that might be your case
The server client is (MultiplayerTest Minimal_Default?Listen -game)
and the client is (MultiplayerTest 127.0.0.1 -game) here is the screen shot of the bp
what blueprint u call this one, it might be construct 2 times, and don’t use the player to check for server or client use SwitchHasAuthority.
As Duncan Dam pointed out … rather use Switch Has Authority to decide … not Owning Player Has Authority. If this is the HUD or Widget Blueprint then the Owning Player will always have authority. Well that is what I have experienced.
This is called in my Widget which does not have a SwitchHasAuthority. That is why i go through the player