Different Music depending on line-up

Koulucky

Veteran
Veteran
Joined
Jan 25, 2016
Messages
68
Reaction score
31
First Language
English
Primarily Uses
Hello! I want a script that changes the bgm automatically based on what character is the first in the party line-up, BUT only changes it for one(or more) particular map(s). For example, in the village, regardless of the line-up, the music remains the same, but in the world map, if X is first in the line-up, the music changes to X, but if Y is the first, the music returns to normal.

Any help would be appreciated. :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
You don't need a script for this.

On those maps, put an event set to parallel process that does a series of tests to see who is the leader, and changes the BGM based on the results. I think Control Variables > Game Data > Party Member 1's > ID will let you put the leader's actor id into a variable, then you just use conditional branches to check what's in the variable. Add an Erase Event at the end.

If you want ALL the maps in this special group to play the SAME BGM depending on who is the leader, put all the logic into a common event, then in the parallel process event on each of those maps, just do a Call Common Event followed by an Erase Event.


What happens if you're on one of these maps and the music for the specific actor is playing, and the player changes the formation so someone else is the leader? Is the music to change automatically? That would require something more complicated.
 

Koulucky

Veteran
Veteran
Joined
Jan 25, 2016
Messages
68
Reaction score
31
First Language
English
Primarily Uses
@Shaz, thanks for the help.
About if the music changes automatically when changing formation, yeah, ideally the music would change automatically when that happens.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
In that case you would use a common event set to parallel process and conditioned by a switch, which would do the music change then turn the switch off, and you'll need a plugin to turn the switch on when the formation is changed.
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,467
Members
137,821
Latest member
Capterson
Top