How do I prevent unwanted audio during battle sequences from the maps?

Hello!

I noticed that when I finish a battle sequence (victory or run away), the audio from my map (BG wind file in this case) will start playing, even while it's busy telling players they got EXP, items, etc.

There is no parallel process of the BG playing continuously going on, so it's not that.


How do I stop this? I want to make it to where the map audio will resume only after the player has fully returned to the map after all the victory/run away battle stuff is over.
Did you try searching? I know I made a little plugin for someone about this a while ago. I'll see if I can find it.

Edit: Here ya go.
Hey man! I did try searching, just couldn't find the right words I guess cause I didn't even see that forum post.


I went ahead and copied/pasted your code in that post, and made it a .js file, etc. Turned it on, put it in my plugins.

It still doesn't work : /
The BGs kept playing during victory anyway, as if nothing had changed.
That's okay, the search didn't come right up for me either, I had to get a little in depth to find it.

Please try it in a new project - it worked for me when I made it. Verify if it's an issue with another plugin in your list.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-prevent-unwanted-audio-during-battle-sequences-from-the-maps.158168/