Conditional Branch Checking if Player is Located in Specified Region

Do you know how to use a script in conditional branch to check if the player is located in region 14?

I am using vx ace engine.
More than 30 minutes have passed and nobody knows?
I think you can use this:
Code:
$gameMap.regionId($gamePlayer.x, $gamePlayer.y) === 14

Edit: Oh sorry, thought it was MV :blush:

I think this should be the right code for Vx Ace:

Code:
$game_map.region_id($game_player.x, $game_player.y) == 14
[bump]rudostan[/bump]

30 minutes? Please remember that everyone helping here is doing so in their free time. Due to differing time zones people will have varying patterns of work, sleep and leisure. Please show at least a little patience.
JamesRyan your suggestion has worked. Thank you. You are going to be credited for giving me a working and used in the project suggestion (credits note dubs suggestions to advices).
@Rudostan @JamesRyan
Absolutely no need for complex scripts.
1) use get location info to load the current Region ID into a variable
2) check the variable by conditional branch

And I suggest checking the game data option of control variable as well - for this specific case you'll need get location info, but most of the data people often check with scriptline is directly available in those two event commands.
Yeah i know complex scripts are not needed, but it is faster than doing two steps separately ☺️ I just want to reduce the amount of work, since i'm a lazy person 😀
Yeah i know complex scripts are not needed, but it is faster than doing two steps separately ☺️ I just want to reduce the amount of work, since i'm a lazy person 😀
We both are lazy people.
Andar I haven't thinked about it, since i'm having vacation from school and my school had some devilish math teacher, not just a regular math teacher, she was someone far worse. Anyway I have changed my school and fixed math issue so I passed to the next class. I have resigned from using my brain on maximum efficiency for a moment.
An even shorter code:
Code:
$game_player.region_id == 14
Double-post notice: Rudostan

Double posting is where you post immediately under another of your own posts before 72 hours have passed. If you want to add something, just edit your earlier post and include the additional info/comment.
Double-post notice: Rudostan

Double posting is where you post immediately under another of your own posts before 72 hours have passed. If you want to add something, just edit your earlier post and include the additional info/comment.
Nobody cares, Janny. 2 years later I found this thread and it was very helpful. Thanks to his double post, the thread was kept alive and helped someone.

Edit: Waiting with bated breath for a Janny to lock the thread due to "necro;" (did you know? Forum Janitors do their job unpaid).
Nobody cares, Janny. 2 years later I found this thread and it was very helpful. Thanks to his double post, the thread was kept alive and helped someone.

Edit: Waiting with bated breath for a Janny to lock the thread due to "necro;" (did you know? Forum Janitors do their job unpaid).
@Zorkon15 So not only are you intentionally breaking the rules (and possibly confusing forum members) by dredging up a 2-year-old topic, but you are doing so specifically to act like a wiseass toward a moderator. Not smart. You don't own the forum (I don't even own the forum), so don't act like you do - if you don't like a rule, this is not the best way to air your opinion. A respectful thread in Site Feedback would do just fine. [RMOD]Consider this a friendly warning. Further intentionally disruptive posting will have consequences - probably a suspension.[/RMOD]Moderator note: Closing this topic.

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-checking-if-player-is-located-in-specified-region.96518/