Script call for conditional branch checking multiple conditions

I need to check two separate variables at the same time, like this:

if $gameVariables.value(25) = 0 AND $gameVariables.value(26) = 3
(do some stuff)
else
(change values for vars 25 and 26)
if $gameVariables.value(25) = 0 AND $gameVariables.value(26) = 3
(do some stuff)
else
etc.

I remember seeing something about it a long time ago, but I can't seem to find it now.

Thanks!
Use && instead of the word AND

Also use == to check for basic equality. Just a single = is for assignment.

e.g. your condition could be
$gameVariables.value(10) < 20 && $gameVariables.value(10) > 10

$gameVariables.value(12) == 15 && $gameVariables.value(2) <= 10
@standardplayer

Thanks. Now I realized that I don't really grasp how to just do a basic condition in script form. Following is a screenshot of a test event I set up. The idea is that you add 1 to a variable and keep getting the message "No" until the variable equals 3, and then you get a "Yes". I get the error message "Unexpected end of input".

forum_question.png


Obviously I don't know what I'm doing. The list of script calls here says that the format for conditions is:

if (code) { stuff } else { stuff }

but that's not working for me here.
One Script command knows nothing about another Script command: they are entirely separate. To use the if (condition) {result1;} else {result2;} structure, you would have to have the whole thing in one Script command, i.e. everything in code. That's way overcomplicating things here, though. 😅

Instead, you can use Conditional Branch > Script:
Code:
$gameVariables.value(43) === 3
This will evaluate the script to true or false, and use that to decide which branch of the Conditional Branch command to run. It'll look something like this in the editor:
Spoiler: Event example
Code:
◆If:Script:$gameVariables.value(25) === 0 && $gameVariables.value(26) === 3
  ◆Text:None, Window, Bottom
  :    :Everything is ready, let's go!
  ◆
:Else
  ◆Text:None, Window, Bottom
  :    :Not ready yet, return later.
  ◆
:End
(You can use == or === to check equality; there are obscure differences but those shouldn't make much difference in this context.)

Alternatively you can simply nest one Conditional Branch command inside another; can be a little messier but it means no need for scripting~ 🙏
@caethyril

Thank you so much! I totally get it now (I think).
Great, hope it works out! 😂

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-conditional-branch-checking-multiple-conditions.114532/