how to change animator bool of other player
Options
When this unit dies I want to stop other player's unit attack animation. how can I make this happen?
private void OnTriggerEnter(Collider other) { if (other.tag == "Player"||other.tag=="PlayerM") { other.gameObject.GetComponent<PhotonView>().RPC("Combat1",RpcTarget.Others,dmg); } } [PunRPC] public void Combat1(float dmg) { health -= dmg+(stats.strength*0.3f); if (health <= 0) { isDeath = true; animator.SetBool("Death",true); photon.RPC("WinnerStop", RpcTarget.All,false); } } [PunRPC] public void WinnerStop(bool holder) { animator.SetBool("Attack", holder); }
0