Download

Gamestate in multiplayer mode

Hi i have a problem

I need to show stadistics in a multiplayer game. I need to access to a variable (puntos) created in the player controller file (PC_MP)

To do this i try to get all players in the player array of the game state:

The problem is that the code work fine in the server and it find all players and show the variables

2.png

But in the client it only find one player

3.png

How can i fix that?

Ensure the player-array is replicated, and / or create the stats on the server and store the result in a user array and replicate that instead… Also, where is the construct-event happening, and in what order? In general, Stats especially Health / Score, should only ever be managed on the server anyway.