How to check one variable for multiple different results?

Hi, everyone!

I'm looking for a streamlined way to add a script to a conditional branch that will return true if Variable N = 1, 12, 29, 40, 51, 75, etc. What would be the best way to approach this, "for", or does rpg maker have an easier way to check this?

Thanks!
id order the outcomes to be sequential so i can then use greater/less than comparisons, but besides that, you could set up your outcomes as an array and then use .includes() on it.
Code:
[1, 12, 29, 40, 51, 75].includes(Variable N)
You can do this with event commands simply by checking the Use Else box in Conditional Branch.

So you'd do
Conditional Branch -> variable is 1
- Else
-- Conditional Branch -> variable is 12
-- Else
etc.

Or you can shorten it with the script call that @Robro33 gave you. That would go into the Script field of Conditional Branch, and where it says Variable N you need to replace it with the actual script call for getting the value of a game variable.
Code:
[1, 12, 29, 40, 51, 75].includes($gameVariables.value(69))
where 69 is the ID of the variable you're checking.
Thanks, guys! The .includes worked perfectly! I was over complicating stuff with 'for'.

This can be marked solved!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-one-variable-for-multiple-different-results.168769/