MV Region ID Script

Is there a script for the Region ID?
From the Script Call List:

You can either reference it from a character, character.regionId()
Or from a map position $gameMap.regionId(x, y)
From the Script Call List:

You can either reference it from a character, character.regionId()
Or from a map position $gameMap.regionId(x, y)
Are you able check if an event xy coordinates equals region id 1 then do this action?
Of course, but what is the context? Where are you putting this code? What is "action"?

If you're not familiar with how to do something like this, it sounds like you should either be using event commands or a plugin to help you.

You can get the Region ID of anything on the map using the Get Location Info event command. Then you use the standard Conditional Branch commands to compare that to whatever number you want.
Of course, but what is the context? Where are you putting this code? What is "action"?

If you're not familiar with how to do something like this, it sounds like you should either be using event commands or a plugin to help you.

You can get the Region ID of anything on the map using the Get Location Info event command. Then you use the standard Conditional Branch commands to compare that to whatever number you want.
I am making a super simple fps, however the projectile is going over the wall when you shoot. What I want to do is if event x & y of the projectile equals to region I’d 1 then turn off the switch of the projectile.
You can do all of that in event commands as I described above.

Original thread: https://forums.rpgmakerweb.com/threads/region-id-script.159532/