RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Stop music playing when game window loses focus

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 87
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.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
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

*
Rep:
Level 87
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.