F
FamousRob
Guest
Hi folks,
I've put a bunch of music files into my game for different levels - but for some reason it will only play one of them.
I had it set to pick one at random, and it would ALWAYS play the same one.
I just did it so I could press a key to pick a song, and it still only plays that song.
I've checked, and each sound reference has the correct MP3 file, and they playback within the 'edit sound' box.
Code used below for music select, 'control_music' is the only one that plays - even if I press a button marked for one of the other files!
Any ideas anyone?
Thanks in advance!
I've put a bunch of music files into my game for different levels - but for some reason it will only play one of them.
I had it set to pick one at random, and it would ALWAYS play the same one.
I just did it so I could press a key to pick a song, and it still only plays that song.
I've checked, and each sound reference has the correct MP3 file, and they playback within the 'edit sound' box.
Code used below for music select, 'control_music' is the only one that plays - even if I press a button marked for one of the other files!
Code:
if keyboard_check(1) && musicplay=0
{audio_play_sound(control_music,0,y);
audio_sound_gain(control_music, 0.3, 0);
musicplay=1}
if keyboard_check(2) && musicplay=0
{audio_play_sound(music_mega1,0,y);
audio_sound_gain(music_mega1, 0.3, 0);
musicplay=1}
if keyboard_check(3) && musicplay=0
{audio_play_sound(music_mega2,0,y);
audio_sound_gain(music_mega2, 0.3, 0);
musicplay=1}
if keyboard_check(4) && musicplay=0
{audio_play_sound(music_rock1,0,y);
audio_sound_gain(music_rock1, 0.3, 0);
musicplay=1}
if keyboard_check(5) && musicplay=0
{audio_play_sound(music_sawish,0,y);
audio_sound_gain(music_sawish, 0.3, 0);
musicplay=1}
Thanks in advance!