how to update other player Custom props

i use otherCollider.GetComponent().owner.CustomProperties["DeathCount"] = deathcount++;

this not work =/ don't have error

Best Answer

  • N1warhead
    N1warhead ✭✭
    Answer ✓
    ExitGames.Client.Photon.Hashtable props = new ExitGames.Client.Photon.Hashtable ();
    deathCount++;
    props.Add ("DeathCount", deathCount); // Update Our Death Count.
    PhotonNetwork.player.SetCustomProperties(props);

    That should do it, also I would change "DeathCount" to "DC" or something, the smaller, the more efficient network speed will be.

Answers

  • N1warhead
    N1warhead ✭✭
    Answer ✓
    ExitGames.Client.Photon.Hashtable props = new ExitGames.Client.Photon.Hashtable ();
    deathCount++;
    props.Add ("DeathCount", deathCount); // Update Our Death Count.
    PhotonNetwork.player.SetCustomProperties(props);

    That should do it, also I would change "DeathCount" to "DC" or something, the smaller, the more efficient network speed will be.