DYNAMIC SE TUTORIAL

In this tutorial I will teach you how to create a room in which when you walk into a certain area of the map, you will activate a common event and a sound effect will start quietly at first, and as you get closer and closer you'll hear more!

  • Jonnie91
  • 08/14/2013 12:51 PM
  • 2796 views
Welcome to my first RPG Maker Guide to RPG Maker VX Ace on RMN! I'm here to show you something which adds more realism to your maps and games.

Prerequisites
  • Basic Knowledge of Switches, Conditional Branches and Common Events
  • Clock SE (RTP is acceptable)

What we'll cover
  • Activating Common Events using Events
  • Using Region ID's in conditional branches using coding


You can see what you'll be able to achieve once you've completed the tutorial in the video below:


Why Use Dynamic Sound Effects?
So what's the point of it?

There are MANY points to use dynamic SE in your project. It adds a sense of realism into your game world, if there is a clock in your game world you can make it simply make a sound when you enter a room, but can you hear a clock in your house from the front door? Chances are not very likely, and if you CAN manage to hear it. It's no where NEAR as loud as if you were sitting right below it!

The clock example used in this tutorial is as basic as it gets (and it just so happens I'm using it for one of my projects) and is meant as an example. With this tutorial you can create so many different things, including sound related puzzles which require you to follow a far away sound ala Zelda or just simple to provide that little bit more immersion for your player!

Step 1: Region ID Setup

Now this step depends on the size of your maps, but what you want to do is setup your region id's first of all so switch to the Region ID View on the Toolbar or press F7. Start off by selecting Region 1 and filling in the squares that are immediately next to your sound object:


I ensure that I cover EVERYTHING, even if the player can't walk on it currently, it means that if you have to change the map for whatever reason you don't have to edit the regions later on.

Once you have done this move on to the second region, and fill about 1-2 squares out from 1 Region, (depending on your map size)


Once you've done the first couple, it is then you need to decide how far away you'll allow the player hear the SE from. In the example above, i'd like the player to hear the music until they start leaving the room. So continue to use a new ID each time you want the SE to be quieter:

Last of all you need one more region ID. This region ID will be dedicated to stopping the SE all together (as in it's just too far away to hear) In this case however you only need to place one sqaures-width around the area, as it's now going to be used to turn off the SFX:


Step 2: The Common Event
So the setup is done, however if we run this in game. nothing happens. That's because all we've done is setup the Region ID's. We now need to assign the audio to EACH Region ID. This can either be done in a Common Event, or with a Parallel Process on the Map ID. I'm gonna use a Common Event for reasons I'll go into later:

Now, what we are looking to do is to check which Region he's currently in, and then do something if he is standing there. the easiest way of doing this is by using a line of code:

$game_player.region_id == n


Basically what this snippet asks is IF the region the player is standing in is equal to n (the number)
Now, using the snippet and Conditional Branches, we can check to see whether the player is standing in a Region Id that we have assigned, and if it IS then we can do something about it. Nice and simple, so what you need to do first is open up either the Common Events tab in the database (or create a new Event page in the map you wish to assign it to) and create a conditional branch checking to see whether the player is standing in Region 1. Remember to ensure that at the bottom of the Conditional Branch window you tick the following:



Inside the Conditional Branch assign the SE that you want at the loudest volume you're going to use:



Repeat this for ALL regions you've used in your map. Remember to assign your final region to FADE OUT the SE at 1 sec:


Step 3: Activating The Common Event
Before exiting the common event create a switch called: "Dynamic Sounds" and set the trigger and the condition switch as below:


This step is ONLY needed if you are using a Common Event.
Now what you need to do is go back to your map and create a player touch event which activates the Common Event as and when you need it.

I'm gonna show you the one that ensures that the Common Event is only active when you need it.
What you need to do is set up a Player Touch event, somewhere where you KNOW the player will walk. I'm gonna set up my player touch events here:


Now as I know that my player has to walk through here to get near to the clock which makes the noise! I can setup the event accordingly:


Note that I've set the Priority to Below Characters and the Trigger to Player Touch. This ensure's that you can stand on the event, and it activates the MOMENT you stand on it.
And it's as simple as that!! :)
Pages: 1