I begin learn a bit of multiplayer i think a got the basic concept until i “print string” a health variable and start two client, the print string print the health variables off both clients in each window.
I was waiting see printed the heal of each character in each client window, that mean in client1 window Client1: 90 and in client2 Client2: 70
Not in each client windows Client1:90 Client2: 70
i miss something or its something about print string?
print strings are for debugging values, if you want different hp values for each player on screen you need to send it to a hud
That is weird. I tested it with four clients and they had all the exact same values. The clients were identical in their values. Could you give more information about, what you want to achieve? Or even post a screenshot of your blueprint? It seems like you are somehow subtracting more from one client than the other. Print string is multiplayer compatible and is already being replicated, so you don’t need to explicitly replicate it to another machine. Variable you use however must be replicated.
thanks for responses.
perhaps i did not explain well because my bad english. I expected when use print string for debugging each client show his own data and only in his window, that mean if i print “health” on begin play, i expected see:
Client1Window Show-> Client1 Health:90
Client2Window Show-> Client2 Health:80
and that puzzled me. and I wanted to be sure not obviated some concept about multiplayer
but seems normal behaviour of print string.
i think its something strange because if want print some log information/debugging, all clients will see the problems of other client. And must avoid print error messages with sensitive info and use only for errors i want announce to all world.
i not check too much yet, but i notice few minutes ago that only occurs when start the dedicate server+clients from editor, if i start the server and clients from CMD seems work like i expected in the first moment. Seems something about editor then not print string, if this it so.
I am facing the same “problem”, I am using dedicated server option with 2 clients and, in both screens it is printed “Client 1 : hello” and “Cliente 2 : hello”.
Is that because my actor is replicated?
Does anybody have an explanation about this?
Thanks in advance.