Hey,
I'm having a problem with my script to play music. I have six levels and in the first one, there's a script that starts music. When entering the second level, there is a script to stop music.
The code is as follows:
void OnEnter(){ PlayMusic("02_amb_strange.ogg",true ,0.4f,0.2f,1,false);}
On the next level, I have a statement that should stop the music from playing which is as follows:
void OnEnter(){ StopMusic(2.0f,0);}
However, there is a problem. When I enter the second level, the music continues to play. On the last 3 levels, the music is supposed to stop but it doesn't on any of them. I've tried putting StopMusic statements in 'OnLeave' in addition and that doesn't work.
Is there something I'm missing?