Legacy GM Pausing Music While Game is Paused and Then Playing it Again

G

Gravel

Guest
So I'm trying to get some music to pause when I pause the game and start again when I un-pause the game. I got the music playing and I have tried a lot of different ways to get the music to pause and un-pause but nothing I try works. If anyone know how to make this work I would be very grateful.

This is my pause screen code:

if (obj_input.pause_key) {​
switch (menu_index) {
case 0:
obj_player_stats.room_start_action = RETURN;
room_goto(obj_player_stats.previous_room);
break;​

case 1:
scr_save_game();
break;​

case 2:
obj_player_stats.room_start_action = LOAD;
room_goto(obj_player_stats.previous_room);
break;​

case 3:
game_end();
break;​

default:
break;
}
audio_resume_sound(snd_music);​
}​

}
 

obscene

Member
audio_sound_get_track_position and audio_sound_set_track_position are your friends. Get the position, stop the sound. When you unpause, start the sound and set the position.
 
Top