particle audio.

For my gun i have sparks that i want audio to play, such as, a bullet hit or something similar, i have the audi, and i attached it to the sparks, but they wont play when the sparks emit, is there a code example i can see to make this work?

Write a function that make the sparks emit and play the sound.

http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter-emit.html

thanks i tried this but no luck, i’ll keep trying and playing around with the audio scripts.

var soundbullethit : AudioClip;

// Emit particles for 3 seconds
particleEmitter.emit = true;
yield WaitForSeconds(3);
// Then stop
particleEmitter.emit = false;

// Play sound
if (soundbullethit)
AudioSource.PlayClipAtPoint(soundbullethit, transform.position);