- Home /
Question by
george3d2011 · Dec 27, 2013 at 03:43 PM ·
multiplayeraudiosoundbullets
Audio Sources Across the Network
Hey guys I am making an FPS Multiplayer game. I have the weapon and a sound i want my weapon to make when it shoots! Unfortunately my weapon shoots and make the sound but that sound doesn't travel across the network so it isn't noticeable by the other players.
I tried to call it by an RPC like that:
public GameObject holdSound;
public GameObject bulletSound;
[RPC]
void SpawnRevBullet(Vector3 position, Quaternion rotation, string originatorName, string team)
{
GameObject go = Instantiate(bullet, position, rotation) as GameObject;
RevBulletScript bScript = go.GetComponent<RevBulletScript>();
bScript.myOriginator = originatorName;
bScript.team = team;
if (bulletSound)
{
holdSound = Instantiate(bulletSound, CurrentWeapon.RevSpawnpoint.transform.position, CurrentWeapon.RevSpawnpoint.transform.rotation) as GameObject;
}
}
but it doesn't work. What should I do?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613124948im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
AudioServicesPlaySystemSound - iOS System Sounds from Unity 1 Answer
Voice Recording issue ?? 0 Answers
Audio when I shoot 3 Answers
Background Music 2 Answers
Vehicle help 1 Answer