Question by
szentiszilas · Sep 11, 2015 at 03:37 PM ·
sound
Other players positions How can i send this?
public void Client_DoSound(string GunName)
{
GetComponent<NetworkView>().RPC("Server_DoSound", RPCMode.Others, GunName);
}
[RPC]
public void Server_DoSound(string GunName)
{
if(PlayerController.instance.IsSilinced == true)
{
AudioSource.PlayClipAtPoint(PlayerController.instance.CurrentWeapon.SingleShootSilenced, PlayerController.instance.CurrentWeapon.Spawnpoint.transform.position);
}
else
{
AudioSource.PlayClipAtPoint(PlayerController.instance.CurrentWeapon.SingleShoot, PlayerController.instance.CurrentWeapon.Spawnpoint.transform.position);
}
}
you can see PlayerController.instance.CurrentWeapon.Spawnpoint.transform.position this is my character postion but i want other players position for good sound system. Please Help me Thank you :D
Comment
Your answer
Follow this Question
Related Questions
What causes the audio clicking & how do I get a clean sound? 11 Answers
Play animation while sound is playing? 0 Answers
How to play a random audio clip from an array in C#? 3 Answers
Sound doesn't always play 0 Answers