pixeltroid
Member
So basically I have assigned the music for each room or area in the room creation code.
So when I enter a room, the previous rooms soundtrack fade outs and the current rooms music "ost_2" starts playing.
The music plays in the background when I go to rooms B and C. BUT when I go back to room A, the level music "ost_2" starts playing again over itself. So I'm stuck with 2 instances of the same song playing in the background.
How do I make it so that re-entering the room with "ost_2" does not cause the currently playing level music to start playing over itself?? Is there a way to tell the game to ignore the code to play "ost_2" when its already playing??
Any help would be appreciated!
Code:
audio_sound_gain(ost_1, 0, 5000);
audio_play_sound(ost_2, 8, true);
The music plays in the background when I go to rooms B and C. BUT when I go back to room A, the level music "ost_2" starts playing again over itself. So I'm stuck with 2 instances of the same song playing in the background.
How do I make it so that re-entering the room with "ost_2" does not cause the currently playing level music to start playing over itself?? Is there a way to tell the game to ignore the code to play "ost_2" when its already playing??
Any help would be appreciated!
Last edited: