Death Messages?

Options
Hi, in my scene I need to be able to show a game over screen when a player dies, at first I thought about setting a custom property but wasn't too sure if having a script with Update constantly checking would add some lag, or if there is another way to detect? On the bullet prefab I'm destroying the player through PhotonNetwory.Destroy() but wasn't too sure if that's a good idea or to do something else?

Comments

  • TechCor
    Options
    Vague design questions like these are hard to answer, but I think you are looking for PhotonNetwork.RaiseEvent.

    Just raise an event when you call PhotonNetwork.Destroy and listen for the response on the clients.
  • Skar
    Options
    Alternatively you can just listen for the player property change in OnPhotonPlayerPropertiesChanged().