When I built Storm Point in Tears of the King, I built a magical grove attached to the city, rather like a park. All of the groves in the game have the same music except the one in Storm Point; since the Grove is part of Storm Point, it plays the town’s music. So this week I wanted to see if it was possible to tie the music into a map’s region. A bit of research revealed that yes, it’s totally possible! Here’s how you do it.
First, you need to set up the region you want the music to play in, like this.
As you can see, I’ve made the Storm Point grove into Region 1.
Next you need an event. Here’s the one I have for this particular case:
You’ll notice that this is triggered only after the Lava Cavern Switch is turned on. If it’s not on, this event does nothing.
Once the event is triggered, you’re going to use a conditional branch (that’s found under Flow Control, just like Loop from last time). Go to the fourth page, where you’ll find Script.
Now you’re going to type in $game_player.region_id == 1 as your script. The number will be whatever region you used (so in this case, since I used Region 1, I have to use a 1). Click OK, then fill in what you want to happen when the Player is in that region. I used Play BGM, which is under Picture and Sounds, and selected the music I wanted whenever the Player stepped into the Grove. Under Else, I said to play the BGM that normally plays in Storm Point. Make sure this event runs as either an Auto Run event or a Parallel Process if you have another event going on at the same time as this one (which I do).
And here’s what you end up with:
I’d like to give a big thank you to LoneWolfDon on the RPG Maker forums for his demo of region controlled events. You can find his discussion and a link to the demo here. That’s where I got the script I used from.
2 responses to “RPG Maker VX Ace – Music Playing in a Specific Region”
Hi! I used your method but unfortunately it causes some lag and/or it doen’t start the BGM. If I use BGS only it works.. but a change of BGM causes lag with this parallel process.. 😦
Weird! It’s been a long time since I’ve looked at this, but I don’t remember ever getting any lag….I got exactly what you see in the video. There’s a hesitation when you originally cross from one area to the next, but then everything is fine. Did you try looking over the demo by LoneWolfDon I linked to at the end of the post? Maybe something in there can help?