Main Menu
  • Welcome to The RPG Maker Resource Kit.

Stop music playing when game window loses focus

Started by shaz, June 19, 2009, 11:13:12 PM

0 Members and 1 Guest are viewing this topic.

shaz

Posting this here 'cause I think it'll be a change in a script somewhere that's needed...

When playing the game in a window, if you click on another window and the game loses the focus, activity stops, but BGM and BGS continue to play.

Does anyone know how to make the sounds stop when the window loses the focus, and start again when it gains the focus?
Always remember you're unique.
Just like everybody else.

tSwitch

I'm not certain, but I don't think that's something any old script can handle, I think it'll require modification to RGSS libraries, or the player.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

shaz

I was afraid of that.  I suspected window losing focus == scripts no longer playing.

Maybe the best I can achieve is to fade the music when the mouse leaves the window and bring the volume back to normal when it returns...
Always remember you're unique.
Just like everybody else.