Networking: determine which turn it is

Hi,

I have a gameserver where the players are connected(max player connection is 5). I want that the server says which turn is it right now. Playerscript has a [SyncVar] boolean.

easier explaind:

  • players are connected to the gameserver

  • gameserver knows which players are connected (with the connection id from the players. First connected player gets always the connection id 0)

  • gameserver says that connection id 0’s turn

  • connection id 0 says I’m done (endturn) to the gameserver

  • gameserver says that the next turn is connection id 1

and so on until the last player ended the turn and it will begin again with connection id 0.

Can someone help me with this?

Good day.

You must understand how multiplayer networks works, know how to use this parameters/properties (links):

IsServer

IsClient

IsLocalPlayer

SyncVar

Command

ClientRPC.

The clients must comunicate to the server that they finished its turns. and should be in the server where the turn number is calculated , and then reported to each client.

If helped, accept the answer :D!