|
Hi, I have a function that if I hit a player call an RPC that change the life of the hit player over the network, this is my code: int damage = Random.Range(5, 15); Debug.Log("Calling setlife with value: " + (hit.collider.transform.parent.gameObject.GetComponent().life - damage)); hit.collider.transform.parent.gameObject.GetComponent().RPC("SetLife", PhotonTargets.AllBuffered, (hit.collider.transform.parent.gameObject.GetComponent().life - damage), gameObject.transform); And this is my RPC: If I hit a player in my local player editor I see that the other player's life is changed, but in the other game window (the one where is playing the player who was hit), his life doesn't change. Why?
(comments are locked)
|
