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.
[RMXP] Request - Temporarily remove music from maps (Resolved)

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
I've reached a point in my game where there's... Crisis, chaos, something like that. So I want to temporarily remove the music from all the maps, because it just doesn't sound good when there's chaos and a nice and calm town-ish music is playing. I had the idea of making a Common Event (Parallel Process) triggered by a switch, and its event will be: Play BGM: None. It works, it stops the music in every map from playing, but it lags the game too much. I've added a Wait 1 frame command... It stops the lags, but every time you go to a new map, the music plays for half a second and then stops, that's just ridiculous. If anyone will tell me how to stop the music in every map from playing, i'll greatly appreciate it, thanks.
« Last Edit: September 18, 2009, 09:23:13 AM by Some1 »

***
Rep:
Level 87
Embrace the stillness of eternity.
First way that comes to mind is to make every map not have an auto BGM. Then put an autorun event triggered by a switch or variable that plays the music and then erases the event in every map. When you want there to be no music, just turn the switch off and use Play BGM: None. Then turn the switch on when you want the music back.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Use parallel process, not autorun here. If you want music to stop for a time period, I bet you'd want something to happen within that time period and if you're running autorun, everything stops just to handle some music mumbo-jumbo.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, MJustin's solution wouldn't cause any severe problems. It erases itself after a single frame. I doubt 1/60 of a second will cause much harm.

I also think it is better than the original solution of making a global common event that always stops music from playing.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I'm just saying. He said temporarily. If he wants it to come back while on the same map, don't erase it and use a parallel to stop it for a time period.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, given the situation, it doesn't make much difference whether it is parallel or autorun, because it doesn't sound like a cutscene dependent on a waiting period. Parallel might be better since it initiates earlier. Either way though, it is erased after a single frame, and it really makes no significant difference. Based on the request though, I don't think there is a Wait frames issue involved, simply because the problem he mentions is precisely going to other maps and wanting to remove the music.

**
Rep: +0/-0Level 83
Thanks a lot people! I think i'm gonna use Mjustin's solution.