Hello! I have a similar issue but I didn't want to open a new topic, so I'll explain here.
Basically, the player can restart the layout whenever they want, to keep it easy to try again. However, the selected music for that layout won't stop restarting.
I did get an idea of what calminthenight said, but I don't know exactly how to execute it through the events.
^^^^
This is basically what I wanted to say. Here below I am about to give extra thoughts.
I guess the game should recognize that the game has already the music played. I guess one possible way to do this is through global variables, although there is an issue with the audio tag.
On start Layout > Set Global.MusicPlaying to music.mp3
> Play Global.MusicPlaying looping from Music at 0db (tag "music")
Global.MusicPlaying = music.mp3 > ???
I could use the "Set Paused" event in the state of "Resume", but it requires the audio tag ("music"), which, by restarting the layout, gets removed and added once the layout starts again. Meaning, I doubt it's the solution.
Let me know in the comments, I'm super open to suggestions! Thank you so much!