No "OR" in Conditional Branches in MV?

Is there any way to do like an "OR" type of conditional branch whatsoever in MV?

Example:

Conditional Branch: Variable > 0 OR Variable < 3?

event commands, etc etc.

End?

It seems a bit inefficient to have multiple conditional branches just to test multiple conditions of the same 'type' be it a variable containing numbers, or skills, etc, when you might have 3-4 to test out at once, or a range of numbers.

Hope this makes sense, and hope MV is capable of getting this function. 

-Drew
RPG Maker has never had multiple conditions in one branch using the radio buttons. To do so, you need to check things manually using a script as your condition. In this case, you'll want:

$gameVariables.value(<VARIABLE ID>) > 0 || $gameVariables.value(<VARIABLE ID>) < 3or if you want to be a real pro,

Code:
[1, 2].contains($gameVariables.value(<VARIABLE ID>)
The easiest solution I can think of with pure eventing, without resorting to scripts, is:

1) Assign 0 to a variable. (I'll name it "TestVar")

2) If Condition A, then TestVar += 1

3) If Condition B, then TestVar += 1

4) If TestVar > 0, then do X

Step 4 is effectively "If 2 or 3"

You're still using multiple conditionals, but you won't have to have duplicate copies of the contents of "X"

You can also use a similar setup as a XOR function by changing the condition of step 4 to "If TestVar = 1"
RPG Maker has never had multiple conditions in one branch using the radio buttons. To do so, you need to check things manually using a script as your condition. In this case, you'll want:

$gameVariables.value(<VARIABLE ID>) > 0 || $gameVariables.value(<VARIABLE ID>) < 3or if you want to be a real pro,

[1, 2].contains($gameVariables.value(<VARIABLE ID>)
In this specific case I think you want an 'AND' operator. 'If var > 0 OR var < 3' will always evaluate to true, because every possible number is either greater than 0 or less than 3!

Also I'd disagree that the second option is better; firstly, it's not as easy to read (I've been programming for many years and it even took me a few seconds to see what the intention was!) and secondly it's not as efficient as a simple 'if and' construct. Finally, what about a situation like this:

if($gameVariables.value(<VARIABLE ID>) > 0 && $gameVariables.value(<VARIABLE ID>) < 2000000)While technically you could use Array.apply to do this, it's not clean at all!

(Array.apply(null, Array(200000)).map(function (j, i) {return i;})).contains($gameVariables.value(<VARIABLE ID>));Not very elegant!
When clicking on the Conditional Branch under Flow Control, did you remember to select the box at the bottom labeled "Create Else Branch"? If you didn't the conditional would be:

statement

If true

    then that

instead of:

statement

if true

      then that

else false

      then that
If you're going for OR... What's wrong with making two conditional branches?
If you're going for OR... What's wrong with making two conditional branches?
For one thing, it's possible for both parts of an OR statement to be true,

which means if you separate them into two statements the code executes twice.
Ultima2876 is true you would need an AND for that operation

For an OR let's take that example :

A = B or A = C

conditional branch

   IF A = B

     some action

   Else

       Conditional branc

           If A = C

             some action

           end branch

    end branch

 

For one thing, it's possible for both parts of an OR statement to be true,

which means if you separate them into two statements the code executes twice.

 
It cant be executed twice becouse the second if will be in an Else. Another example here

Var 1 = 10

Var 2 = 10

conditional branch

   IF Var 1  = 10

     some action

   Else

       Conditional branc

           If Var 2 = 10

             some action

           end branch

    end branch

Only the action on the first IF would be executed becouse the condition on the IF is satisfied and the Else just will not execute
For one thing, it's possible for both parts of an OR statement to be true,

which means if you separate them into two statements the code executes twice.
Looking at Jecht's post I see mine in now redundant, so I'm removing it.

Original thread: https://forums.rpgmakerweb.com/threads/no-or-in-conditional-branches-in-mv.46623/