- Home /
stop song and play song
Hi im trying to play a song when i click a paper with this code :
var papelsonido : AudioClip;
function OnMouseDown (){
//Play Key Pickup Sound
if (papelsonido)
AudioSource.PlayClipAtPoint(papelsonido, transform.position);
}
that script works fine when i press a paper and the song play it self,, but when i attach that script to another paper, i cant hear the second paper i press ... so my question is this
how i can play a song and when i press another paper that song stops and play the new one ...
thanks a lot
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Destroy GameObject and play sound 1 Answer
I can't go back to the start up screen after hitting not now 0 Answers
Light flashing through walls help 0 Answers
Whats The difference? 1 Answer