This sounds a bit strange from the title so you'll need explanation.
When I make my game, I put on BG music on the first layout and make it loop so that plays on other layouts. However, when I return to the first layout, the BG music will overlap. What I want achieve essentially is
on the start of layout > play music
sub-event> if music is playing > "do nothing"
Here is my question: how do you do "do nothing?" I have tried "stop loop" but it doesn't work and there is probably more to it than that. I have tried using a variable but things got messy after that so I erased it.
FYI, on the topic of using variables, what I did is that I associated music playing or not with the number but then it goes back to the same case as before and it's still the same case when it's with a boolean, just alot more messy.
Develop games in your browser. Powerful, performant & highly capable.
I know exactly where your coming from; I'm currently using a system of a global variable and the audio devices 'is any playing' but inverted.
Looks something like
On Layout Start -
System:play music = YES - Audio:play "mymusic"
Audio: Is any playing (inverted)
It basically means that if there is already anything playing (on my game only the music is playing right at the start of the layout) it doesn't re-play the music.
It's not perfect and if its not what your looking for I hope someone else can chip in and suggest something better! (Which I will gladly swap too also).