I have been having some trouble getting music to go on and go off. To make music play, I do:
First you need to use Play Music not Play Sound
Then with some global variable or scene variable check if is on|off
like my_var_music = 0 is off
my_var_music = 1 is on
Plus there is an example here
Just to clarify some items here:
- Play music and play sound can both be used for music files.
- As far as I know, AAC file support is very minimal, so you could run into issues using that file type other than a .wav, .mp3, or .ogg audio file.
- Sound channels are just a number you define. There are infinite channels and you can assign as many as you want. They are important because without using channels you will stop all sounds/music being played.
- By using the “play music/sound on a channel” actions, you can also use the “Stop the sound/music of a channel” to stop that channel’s sound or music.
I want to learn the same thing about this sound system.
Actually, I have set up a button that will pause the game. I also have a background sound attached that will play on a loop throughout the scene. How, can I stop the music when the pause button is pressed and continue playing the music when the pause button is pressed again? I cannot figure out the conditions and events for this. Please help me sort this thing out.