How do I make the music stop?

I have been having some trouble getting music to go on and go off. To make music play, I do:

The only thing is, How do I make it stop? I do not know what channel identifiers are and that’s what they are asking for! Can I get some help?

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
https://editor.gdevelop-app.com/?project=example://toggle-music-play-sound

1 Like

Just to clarify some items here:

  1. Play music and play sound can both be used for music files.
  2. 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.
  3. 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.
  4. 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.
1 Like