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. the easiest way of doing this is by using a line of code:īasically what this snippet asks is IF the region the player is standing in is equal to n (the number) 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. I'm gonna use a Common Event for reasons I'll go into later: This can either be done in a Common Event, or with a Parallel Process on the Map ID. We now need to assign the audio to EACH Region ID. That's because all we've done is setup the Region ID's. So the setup is done, however if we run this in game. 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: So continue to use a new ID each time you want the SE to be quieter: In the example above, i'd like the player to hear the music until they start leaving the room. 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. 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) 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. Start off by selecting Region 1 and filling in the squares that are immediately next to your sound object:
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.