Manage scene objects

In my game, the master client creates a scene object using PhotonNetwork.InstantiateSceneObject.. I believe if the master client dies, then the scene object is managed by the new master client.
I want to create a new scene object 10 seconds after the scene object dies. For example, the 1st master client held the scene object for 6 seconds and died. The next master client held it for 4 seconds until the scene object died. How could I get the 6 seconds that disappeared with the 1st master client?
Can it be figured out by using PunRPC or something? Is there any way to transfer the data of a master client to new master client? Thanks for any advice. :)

Comments

  • If client dies, he leaves room? or for some reason you switch master all the time?

    Anyway...
    You can sync reference time between all clients and then run countdown timer based on reference time.
    In this case timer will be same on all clients and at the end you simply check:
    if (PhotonNetwork.isMasterClient) PhotonNetwork.InstantiateSceneObject(.....);
  • @OneManArmy My game is about combat between fighter planes. Even the master client creates an network object which is an fighter. If the master client loses his fighter, he has to leave and get back in the room in order to create new fighter. Anyway, I did not know all clients can share the value of a variable (must be public static, right?). I will try it.
    By the way, in order to create a fighter, leaving room and get back is bad idea, comparing to staying in the room and create fighter again?
  • You can use room custom properties.
    I think it's terrible idea to kick player out of room every time he dies.

  • @OneManArmy I see. I wish I knew this earlier. I think I have to think it over. Thanks.