MZ Script call for using multiple value of a single variable in a conditional branch event.

So, I want to create a conditional branch where if a certain variable's value is either 2 or 3, it will trigger the condition. I can do it, like that screenshot I shared. But want to know, if there is a script call that I can use to do the same thing using a single conditional branch. I much appreciate your help on this.
Screenshot 2022-09-20 195528.png
Hi there!

If the values you are checking will always be between two numbers, you can do this:

- Checking if the variable value is equal to or higher than 2 AND equal to or lower than 3.
$gameVariables.value(ID) >= 2 && $gameVariables.value(ID) <= 3

But if you want to check for specific numbers:
[1, 8, 5, 9, 13].includes($gameVariables.value(ID))
such conditional branches (without the script solution) look better if you disable the else-branch. you don't need it for lists of equal comparisons.
Hi there!

If the values you are checking will always be between two numbers, you can do this:

- Checking if the variable value is equal to or higher than 2 AND equal to or lower than 3.
$gameVariables.value(ID) >= 2 && $gameVariables.value(ID) <= 3

But if you want to check for specific numbers:
[1, 8, 5, 9, 13].includes($gameVariables.value(ID))
This is exactly what I was looking for! Thank you very much for your help 🙂 It will solve a lot's my problem I was having so far. Much appreciated! 🙂
such conditional branches (without the script solution) look better if you disable the else-branch. you don't need it for lists of equal comparisons.

I know that. 🙂 I guess I overlooked disabling the else-branch when I took the screenshot.
choice expansion
Increase the number of items by connecting options
Hide items by condition
Conditionally display items semi-transparently

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-using-multiple-value-of-a-single-variable-in-a-conditional-branch-event.151437/