The script only prints the host’s player name. Clients aren’t being produced on the server nor other clients.
How can I get this to work properly?
Do I need to be running something on server?
Thanks in advance!
The script only prints the host’s player name. Clients aren’t being produced on the server nor other clients.
How can I get this to work properly?
Do I need to be running something on server?
Thanks in advance!
Player States dont all get created on the first tick.
Instead of constructing your list only once when this actor is constructed, I would recommend setting your player state class to tell your list to update once the Player state Beginplay is called, on server side of course, and each time it updates server side, replicate to all clients.
Thanks for the reply and advice, Enigma. I have one follow up for you. If a player leaves the game by just exiting out of the game client all together, how would I have that player removed from the list? I understand there is an option to set how long a playerstate sticks around after leaving. Would this be the option I’m looking for?
I actually dont know the answer to that question, but I would do the following:
Are you found a solution to replicate playerarray to clients?
And remember, the PlayerArray is already replicated, so don’t send it over the multicast RPC; just use the one the Client already has.
One way you can make sure the client doesn’t update the UMG until the server side version of the PlayerArray has changed, is to put a repnotify variable on the PlayerState class, and update the UMG as part of the repnotify function. you can change this variable any time the list should change.
This^ Great thinking Mighty