Need Help Getting Started With Networking

Tried it myself. You can set the “Test Text” as replicated with OnRep, so the client can receive a notification when it changes on the server. I then run the role verification in the BeginPlay only at the server, checking the controller role using GetController()->HasAuthority() to set the character variable to Server or Client whether it has authority or not.

roledetection2.png

So the flow is something like this:

  • BeginPlay run at the Server for each character and we verify whether its controller has authority or not, setting the OnRep variable appropriately.
  • Each client receives the variable modification, and changes the TextRender text locally.

I hope this helps :wink:

EDIT: This actually works for the wrong reason! It worked here was because “GetController->HasAuthority” was null for client characters (as stated by Amaresh below), so the branch would be false. I explained another solution in a new post. Sorry!