I’m trying to make it when i collect pages in my slender game. The music changes. I have 3 different self made audio clips for the music. But when i collect the pages the music plays horribly stacked. Heres the part of my code:
if(pages == 6){
Application.LoadLevel(3);
}
else if (!audio.isPlaying && pages >= 5) {
audio.clip = Page5_6;
audio.Play ();
}
else if (!audio.isPlaying && pages >= 3) {
audio.clip = Page3_5;
audio.Play();
}
else if (audio.isPlaying && pages >= 1) {
audio.clip = Page5_6;
audio.Play();
}