.
RPG Maker MV SupportHe mean he wants the music to pause as well, am I correct?
These are not the droids you are looking for.
My solution offered is for fixing a crash in the engine, it is not related to tabbing out of the game.
Oh, I miss read the OP... I thought he meant that the game pauses LIKE when you do click out of the game but the music still goes... My bad
Pausing the game when losing focus
The game continues to play when focus is lost. This includes BGS/BGM, event movement, maybe event interaction (on-map enemy set to approach - I haven't tested this yet), and the playtime counter (and maybe the game timer - also not tested). I had a quick search but all I could see was...
forums.rpgmakerweb.com
Maybe this topic is related. But I'm not sure, the plugin link doesn't work for me.
The link is no longer working, but you can get the plugin by going to your MV's installation directory and grabbing it from
dlc\RPGmakerWeb_plugins\Zalerinian.It seems to do the opposite of what OP is asking for, but that might still work (and in fact is probably a better solution) - instead of keeping the entire game running when unfocused, it pauses audio/video alongside everything else.
Are you using MZ? By default MZ pauses the game loop, but not the audio, on losing focus.
If you're seeing this in MV, check your plugins?
Yeah, my MV only pauses when the window is minimize.
So, you want the game to be "fully" paused when out of focus?
Meaning, the bgm would stop playing, and resume playing when back into focus?
This could be achieved by writing a plugin that does just that.
Edit : If that is what you are looking for, I just finished writing a plugin that can do this 🙂
I don't understand the current issue in the thread.
Isn't this solved by the plugin which comes with MV, which @Mac15001900 pointed out in post #7?
What is the different problem which is getting a new plugin?
I'm confused.
I don't know the plugin he is referring to, I just thought it would be a fun experience to try and make one myself. ^^
I tested my plugin and it works well, pausing the game entirely, including the bgm, and resumes it when the game has focus again (including bgm which resumes where it was paused using
AudioManager._bgmbuffer.seek)I believe the issue is that when he leaves the game (aka click on another window) the game pauses, but the music doesn't, which makes it go "out of sync", so I suppose the music is an important aspect of his game.
If the plugin mentioned in post #7 does that, then mine offer very little more, either way I had fun making it. ^^
Let me know if you need it and I'll upload it.
Meanwhile, I'll look into something that does "the opposite" and update my plugin so it can do both 😀
So the opposite would be Making the game run even when out of focus including music, animations, events, etc...
Edit : I can't get it to work when minimized 🙁 but it should work "out of focus", so long as the game is not minimized.
Original thread: https://forums.rpgmakerweb.com/threads/170342/