MV Conditional Branch Script Question

I just switched over from VX Ace to MV but am having some touble with Conditional Branch Scripts. I use to use one as a check via region ID to allow a player to jump up/down a platform but can't seem to get it working in MV. My Scipt from VX ace was:

$game_player.region_id == 1

I know they changed $game_player to $gamePlayer and region_id to regionId however neither of the following scripts have worked for me:

$gamePlayer.regionId == 1

or

$gamePlayer.regionId === 1

Any help on how to call checks via scripts would be greatly appreciated.
If you have any understanding of programming at all, you can look in the js files to see the correct syntax. If you don't, you can look in the pinned thread for script call equivalents for event commands.


In this case, you could use a Control Variables to get the region id of the player into a variable, and then use the variable in the conditional branch.


If you really want to use a script, the correct command is this:

Code:
$gamePlayer.regionId() === 1
Sorry if I'm not understanding, but are you saying that rpg maker can no longer check the region id that the player is currently standing on in a conditional branch? You now have to set a control variable to where the player is standing and then do a conditional branch on the control variable?
You can check using the script command of the conditional branch, using the command that Shaz gave you :


Sorry if I'm not understanding, but are you saying that rpg maker can no longer check the region id that the player is currently standing on in a conditional branch?
No, I'm saying there are several ways to do it, and then I GAVE you the command to use in a conditional branch if you want to do it that way. I was just saying that you don't HAVE to put it in a script in a conditional branch.
No, I'm saying there are several ways to do it, and then I GAVE you the command to use in a conditional branch if you want to do it that way. I was just saying that you don't HAVE to put it in a script in a conditional branch.
My mistake, was working all day and only just got home to check it. Your script does work, thanks!
thx i need that 1

Original thread: https://forums.rpgmakerweb.com/threads/mv-conditional-branch-script-question.50821/