How to synchronize spawn in arena for each player then start game?

Options
Hi everyone, I am trying to make a 3v3 brawl arena game. At the moment after the number of players in room reach 6, I use PhotonNetwork.automaticallySyncScene = true and PhotonNetwork.LoadScene("Arena Scene") to move all players from Character Selection Screen to Arena Scene. But the problem is each player spawns at different time thus the countdown timer is different for each player in the arena. How to fix this?

Thank you very much for your help and support

Comments

  • Hi @ActiveDream,

    there is a CountdownTimer script in the PUN 2 package. You can use this one for a synchronized countdown timer.

    To start the countdown, a client has to set a certain property in the Custom Room Properties. In the Asteroids demo this happens when using the following code snippet:
    Hashtable props = new Hashtable
    {
        {CountdownTimer.CountdownStartTime, (float) PhotonNetwork.Time}
    };
    PhotonNetwork.CurrentRoom.SetCustomProperties(props);