Changing auto BGM after switch

Bryan Rael

Villager
Member
Joined
Mar 19, 2017
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
Does anybody know if you can change the background music that automatically plays once you set it in a map?
In my game there's a night switch which triggers many changes across the entire game, basically the second half of the game. One of the things I'd like to change with that switch is the bgm for most maps. I know how to do that, but I'd like it so that it continues playing across maps with the same bgm, instead of resetting every time you change map just like it does when you have the automatic bgm.
 

Kyoku

Veteran
Veteran
Joined
Jan 19, 2017
Messages
282
Reaction score
653
First Language
English
Primarily Uses
RMMV
Never tried doing this, but try making a common event start up in the beginning and continue on forever that'll check if the night switch is on or off. For off change the BMG for not night. If on, just do the same except with night BMG. Problem being that you probably wouldn't be able to change the BMG for events in which case you should have a variable linked to the common event in the beginning and let's say if it's 0, do the switchy thing and is 1 then don't play BMG. Probably won't work, never tried, but let's hope...
 

Bryan Rael

Villager
Member
Joined
Mar 19, 2017
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
I tried what you said on a couple of maps using a common event that checks the map ID, then, using the common even you suggested to check for the map ID and setting the song accordingly. Seems to work quite fine, but its rather inefficient because of the way my map IDs are ordered. Thanks for the help, I'll try looking more into it to see if I can improve on what I have.
Capture.PNG
the common event
 

byronclaude

Master of all things... (except the things I am no
Veteran
Joined
Aug 9, 2013
Messages
392
Reaction score
180
First Language
English
Primarily Uses
I actually am fascinated with Kyoku's idea... I have yet to try something like that. In fact, Kyoku's post has me thinking of all kinds of possibilities involving parallel processing that would be fun to try. :smile:

Depending on the game you are making, I have one consideration that I have used for seamless game play in projects involving day and night. Simply copy/paste the map to make a duplicate "night" map. And then alter the transfer event so that if the night switch is set to 0... it transfers you into the original "day map"... but if the night switch is on one, it instead transfers you into the "night map". I have used this in projects in cases when I wanted to alter music at night... to light torches at night... and in some cases, easily embed stories that only happen at night.

(I of course alter any Inn so that it uses a custom event designed not only for recovery, but to transfer them to their waking point on the day map.)

I admit it is my easy way out, and costs an extra map... ...but it is effective.
 

Bryan Rael

Villager
Member
Joined
Mar 19, 2017
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
I admit it is my easy way out, and costs an extra map... ...but it is effective.
I thought about making new maps but I'll have to almost double the number of maps that way, which didn't seem like the best idea
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
You could squeeze many of those conditions into a smaller script conditional branch like...
PHP:
$gameMap._mapId > 3 && $gameMap._mapId < 6
or
PHP:
[3,4,5,7].indexOf($gameMap._mapId) !== -1
The first example covers maps 4 and 5.
The second example covers maps 3,4,5,7, but no 6.
For example.
 
Last edited:

Reapergurl

Drummer Extraordinaire! xD
Veteran
Joined
Dec 15, 2016
Messages
534
Reaction score
552
First Language
British English
Primarily Uses
Other
I personally use parallel processing common events, or place the parallel process event on the map if it's not a massive effect I'm looking for.

For BGM shift, BGS shift, movement of Deus Ex Machina, you name it.

For shifting of screen shading, it's better to not make duplicates of maps, but to use a common event.

Unfortunately, 100% smooth transitions are really difficult to manage without external scripts/plugins.
 

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
It is much simpler and easier to change the BGM in transfer events that lead to certain maps. Say you're going from a town to a world map. Just change to the world map BGM in the event. Say you return to that town, but something happens immediately that's very serious. Just have the event change the BGM to something appropriate. You have to make sure that you didn't set the default NGM to anything. You have to leave it unchecked.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top