In my previous question thread I was trying to figure out a way to make another song play after the current one has reached its end. I am now using two variables:
- One that contains the current song's length in seconds.
- One that counts the seconds since the song has started.
I also edited the battle and map related scripts to prevent all BGM and ME from playing when the radio is on.
Now I ran into another problem...If I tab out of the window at any point during a song is playing, it seems like the second variable stops counting while the song plays on merrily, therefore messing up the count and creating an awkward pause after the song has stopped.
Is there any way to fix this behavior? For example a script that would pause all audio while the game window isn't the active window?
Edit: I forgot to mention, the variable that counts the seconds is in a parallel process common event that increases the variable by 1 every second. (However there seems to be something wrong with it, since when I playtest and check the variables, it only seems to increase the number every 3 seconds or so...)