As this is made in VX through a common event alone, I assume it is also doable in all the other makers.
This only works, if your variables can be updated at any given moment. (So if you tumble around the menu, your variables won't be updated. However, you might use a script to enable the variables updating in the menus, etc.)
For my game, I wanted to have something like a song that has multiple parts to it and you can continue it to it's next part via activating a switch, or the sort.
A great example is the track "Destati- Dive into the Heart" From the first Kingdom Hearts game. You know how you get introduced to that area with the stained glass window aestethic? You know how the music keeps building up the further you go in that place?
Well today, I have just the solution... but maybe a temporary one, as it may just not sound good when, as mentioned above, the common event cannot be played during a menu_scene or the like.
So keep in mind that this is just a temporary solution that only works during specific times.
I have actually made a whole video about it:
Excuse my pathetic attempt at explaining things in that video, I made this tired. (Hopefully you still understand what I mean)
If you have any questions or even a better solution to that, please do post them.
No problem! Hopefully you can also get past some of the annoyances like not being able to increase the variables through the menus, the game being unfocused but music still plays(I didn't even mention that one, I think...), etc.