MV Script Call: Is there an OR command?

Special thanks to Baka-chan for helping me figure out the Region ID check commands for RPG Maker MV; they are as such:

  • $gameMap.regionId($gamePlayer.x, $gamePlayer.y) === n
  • $gameMap.regionId($gameMap.event(m).x, $gameMap.event(m).y) === n
My issue is that I need to create a script call from a conditional branch event that continues the conditional branch if Condition 1 OR Condition 2 is met:

i.e. $gameMap.regionID($gamePlayer.x, $gamePlayer.y) === 1 OR $game.Map.regionID($gameMap.event(2).x, $gameMap.event(2).y) === 1

  • This roughly translates to "If Player's X & Y are equal to Region 1 or if Event ID 002's X & Y are equal to Region 1"
My question is how would I go about making it continue through the conditional branch if either Condition 1 or Condition 2 are active?

Could I do this with eventing? Would I have to rely on a script call OR function for it to work?
The or in JavaScript is ||

That's 2 of the "pipe" symbol.

http://www.w3schools.com/js/js_comparisons.asp
The or in JavaScript is ||

That's 2 of the "pipe" symbol.

http://www.w3schools.com/js/js_comparisons.asp
Gotcha, thanks for providing an extra link as well, lots of helpful JS codes as well for future reference. Thank you, taarna!

Original thread: https://forums.rpgmakerweb.com/threads/mv-script-call-is-there-an-or-command.48538/