Make a common event for random BGMs

Hello!

So I plan to make radio stations in my game when you visit certain shops and official buildings. I managed to make a system that plays a jingle for a specific radio for a specific place, I managed to make the play of the adverts and songs on random. On one single map it runs like a charm, but here is the problem :
- These buildings have more than one map and it seems everytime i enter a new map, it relaunches the common event and if the variable gives a different range than the one leading to the track already playing it cuts everything and goes back on the radio jingle. I don't want that because for the player it will be freaking annoying if he rushes from one room to another to get the same jingle starting over and over again.
Is there a way to make the process NOT start again when I reach a new map?
Or would this thing only be doable with a script triggered when entering specific buildings? In which case I'm in trouble ^^'

Thanks!
Hey bud, you still using VXAce for this one? Seems like more of a support question so I’d like to get it moved over.
Oh sorry, I thought because it was an event related problem it would fit better there.
EDIT : seems i can't erase it. I'll post a new thread there, you can erase this one 🙂
Oh sorry, I thought because it was an event related problem it would fit better there.
EDIT : seems i can't erase it. I'll post a new thread there, you can erase this one 🙂
That's not how the site usually works - as Littlefish said, she'll move the existing thread.
how is your common event triggered?
I hid the other one and kept this one since this one already has some activity on it. It’s all moved over now! 😍
Here's my solution... and yes it's almost script exclusive except for manually turning off the main map's switch.

Please visit the RandomBGM ACE thread where you can get the latest update of the script or a working demo.

Original thread: https://forums.rpgmakerweb.com/threads/make-a-common-event-for-random-bgms.160090/