x


Particle Sound Emission

How can I play a sound every time a particle is emitted? I'm using a particle emitter to cause lightning strikes, but I want it to play a sound each time.

more ▼

asked Dec 12 '10 at 09:21 AM

RockGuy32 gravatar image

RockGuy32
17 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

make a new script and say

function Update()
{
 if(gameObject.particleEmitter.emit)
 {
  audio.Play();
 }
}

and that should work for every frame your lightning particles are emitting... please help me by telling me anything missing, or anything else you might need for this to work if it isn't!

hope that works for you!

more ▼

answered Dec 12 '10 at 02:56 PM

Jesus_Freak gravatar image

Jesus_Freak
1.2k 38 44 59

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1060
x542
x335
x31

asked: Dec 12 '10 at 09:21 AM

Seen: 1173 times

Last Updated: Dec 12 '10 at 09:21 AM