Continuous BGM from one Battle scene to another

Give me a little time to look at this and brainstorm... its a bit late for me, so I cant promise any ideas/suggestions tonight (3:40am here >.< )


just to check... correct me if I'm wrong


Fadeout BGM before battle


DURING battle change the battle BGM


DURING battle play different BGM after boss dies


exit battle and have the same music playing here that was playing after the boss died in in the following event on the map?
No music in the map. If it's the same BGM on the next battle it will reset the BGM.
OK, but in order to go from one battle to the next it does have to transition back to the map between, yes?


If so before the 1st battle change the BGM to the one you desire for the 2nd battle. In the 1st battle when you change the BGM for the moment you also should change the default battle BGM as well so the next fight will use it by default and there shouldn't be a pause.


The pause I think you are experiencing is cause of the battle BGM changing to the map BGM during that 1 frame transition to the next battle (if they are immediately back to back) and then to the next battle which you have chosen to use the same BGM.


This is actually a lot harder to put into words than it is in my head...


This is the way it would look if what I am understanding is correct:


https://www.mediafire.com/?3y0p4pc5fmzpp3w


and the screenshot of the simple event and the battle events:

Spoiler
Untitled-2.pngUntitled-3.pngUntitled-1.png
There is still a delay, but it is far less long than before.


Maybe it's because of the loading?


Also, I got a problem if it's more than one fight in a row, how I am supposed to change the song on the second fight while keeping the same song on the first fight? They will overlap and it'll just reset the song.
Depending on what all you have going on the load time could very well be causing a gap if you're still having one... and sadly I know no way to get rid of loading lag :/


and if you have multiple fights in a row just change the battle theme immediately before the fight and have the events in the battle start at turn 0 *should* work


but in the end if my idea didn't get you what you wanted it is more than likely load lag and something I cannot help with further... sorry if thats not the response you were looking for 🙁
Changing the battle theme before the fight no longer work after the first 1 + the loading, so yeah i'm stuck with a plugin that would always keep the same bgm going unless another bgm is up.


Thanks for helping
a_BattleManager_replayBgmAndBgs = BattleManager.replayBgmAndBgs;
BattleManager.replayBgmAndBgs = function () {
// switch id for stopping the game from replaying bgm
var switchId = 1;
if ($gameSwitches.value(switchId)) {
return;
}
a_BattleManager_replayBgmAndBgs.call(this);
};

a_AudioManager_playBgm = AudioManager.playBgm;
AudioManager.playBgm = function (bgm, pos) {
// switch id for stopping the game from changing the bgm to play
var switchId = 0;
if ($gameSwitches.value(switchId)) {
return;
}
a_AudioManager_playBgm.call(this, bgm, pos);
};

a_AudioManager_stopBgm = AudioManager.stopBgm;
AudioManager.stopBgm = function () {
// switch id for stopping the game from stopping the bgm
var switchId = 0;
if ($gameSwitches.value(switchId)) {
return;
}
a_AudioManager_stopBgm.call(this);
};


Change switch id in the replayBgmAndBgs


I included playBgm and stopBgm just in case
This doesn't seem to work, is there anything else l should be aware of besides turning the right switch on?
3 days
3 days
3 days
3 days
3 days
3 days
3 days
3 days
3 days

Original thread: https://forums.rpgmakerweb.com/threads/continuous-bgm-from-one-battle-scene-to-another.70126/