Mute all BGM after battle is aborted.

Hey.

So I have this problem... After aborting the battle, I want it to be no BGM.
But after aborting the battle, the music that was playing on the map before the battle automaticaly restarts.

Even if put a parrel or autorun event with "Play BGM: none" to try to stop it from playing, it will not do it instantly (As like a one second delay before it plays any event). So we can still hear for a split second before it just stops. I believe this because of the slight transition between the battle scene back to the map not being instant (There is a fade in and then Face out to back to the map). So even if put an event to instantly stop all BGM, it will not act instantly and the BGM that was playing before the battle will play for a split second because being abruptly cut.

This is pretty annoying.

Is there any to just not have any music play after the abort battle?

Thanks in advance.
Copy this into a text editor, save as a *.js file, include it as a plugin.
Code:
BattleManager.replayBgmAndBgs = function() {
};
I just answered this on steam:

I would say, play none. But you already tried that.

What if you put that command "Play BGM: none" right before the battle, instead of after?

If it is 1 certain troop you want to do this, and you abort the battle in a troop event, then you can use "Play BGM: none" in the battle event. This will not mute the battle music, but it will stop the BGM. Do this before the battle aborts.
Copy this into a text editor, save as a *.js file, include it as a plugin.
Code:
BattleManager.replayBgmAndBgs = function() {
};
Worked!
Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/mute-all-bgm-after-battle-is-aborted.157722/