Variables help.

I need to figure out a way to make it so I can't use a specific item that teleports the party to a hub map in this dungeon, but it has two seperate maps. The obvious solution is a MapID variable, but I need to prevent use in both maps. I think using a range of values would work, but I can't figure out how.

TLDR: Need to figure out how to use range of values for a variable in conditional branch.
I assume you use a common event for the item teleportation? Could you not just add a switch conditional to that common event and turn off the switch when the player enters into a place you don't want the teleport item to work?

edit: Sorry, if you just want to answer the question, you would use nested conditional branches.

Code:
conditional branch: Variable > X

  conditional branch: Variable < Y

    [stuff goes here]

  end

end

This would give you a range between X and Y. Is this what you mean?
range of values for a variable in conditional branch.
make it two nested conditional branches, one with greater and one with lower to test the boundaries of the range
I assume you use a common event for the item teleportation? Could you not just add a switch conditional to that common event and turn off the switch when the player enters into a place you don't want the teleport item to work?

edit: Sorry, if you just want to answer the question, you would use nested conditional branches.

Code:
conditional branch: Variable > X

  conditional branch: Variable < Y

    [stuff goes here]

  end

end

This would give you a range between X and Y. Is this what you mean?
A range between X and Y was not what I meant but you telling me to use a switch was just what I needed. I have no clue how I didn't think of that, lol. Thnak you!
If you want your common event to not work on certain maps, you could always use note tags on those maps.

For example, put <NoTeleport> on any map you want to block the common event from executing on, then, in your common event, do a conditional branch script check like so:

Code:
If : Script : !$dataMap.meta.NoTeleport
   - Your teleport event flow here
End

Note: Unlike many plugins, note tags derived from the meta property are case sensitive. NoTeleport in this example will work, but noteleport or NOTELEPORT will not.

Original thread: https://forums.rpgmakerweb.com/threads/variables-help.123224/