No announcement yet.

Gamestate in multiplayer mode

  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    Click image for larger version

Name:	1.png
Views:	42
Size:	94.9 KB
ID:	1687272

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

    Click image for larger version

Name:	2.png
Views:	28
Size:	24.5 KB
ID:	1687273

    But in the client it only find one player

    Click image for larger version

Name:	3.png
Views:	27
Size:	27.0 KB
ID:	1687274

    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.