- Home /
how do u add sound clips to an animation using animation events?
ok so when i go into animation view > i go to add animation event > it adds it > i click it and it asks for a function > what next? > i have some code >
var shotgunsound : audioClip;
if(shootanimation) { Sound.Play(shotgunsound) }
why does it also tell me there are no functions even if i inport a bunch of scripts?
Comment
Answer by TomPendergrass · Dec 30, 2012 at 11:13 PM
animation events run functions. create a function like this:
function PlaySound()
{
audio.Play();
}
and then put that function in the animation event.
Your answer
Follow this Question
Related Questions
Play sound on animation event? 3 Answers
multiple Animation Events in an Animation 0 Answers
How to play Audio Once if enemy has enterd a trigger 1 Answer
Play sound on anim frame 1 Answer