If variable... is * script

Hey im looking for scripts and symbols that checks what state the variables are... id like to use it in this manner:
condition branch,
if script variable 0001 is 1 to 3 || if script variable 0001 5 - 9 || if script variable 0004 is NOT 5 || if switch 0004 is on
Do action...

So basically im looking for the scripts to check variables, and switches.
And im also looking for the symbols that represent: (IS NOT) 3, (IS FROM) 1 (TO) 4, (IS) 3,

Thanks in advance 🙂
The damage formula refrence various basic/beginner mv script calls and the full
script call list is here.
So if you're using a condition branch and you are using the script part, then this:
$gameVariables.value(x) = the value of variable x,
$gameVariables.value(x) === y the value of variable x is equal to the value of y,
$gameVariables.value(x) !== y the value of variable x is not equal to the value of y,
to do ranges like form 1 to 10:
$gameVariables.value(x) <== w &&
$gameVariables.value(x) >== z, where w>z, this code means is the value of variable x less than or equal to w and great than or equal to z.
If you don't used the equal signs you're not inculding w and z, so if you used 1-10, it would give the numbers 2-9.

To check switches:
$gameSwitches.value(v) where v is the switch id.
to check if it is something use this:
===
to check if it not equal to something use this:
!==

"true" is on and "false" is off.
So,
$gameSwitches.value (v) !== "false"
which is switch v is not off
@Zarsla Hey, thanks for being so thorough with your explanation.

Also for me, apparently the equal or less, and equal or more is actually <=, and >=, instead of <==, and >==.

Anyway you covered everything i wanted to know. Thanks a bunch!
@Zarsla Oh actually i have one additional question. Does there happen to be a: "is (not) less/more than'', or ''is (not) equal or less/more than" symbol too? The link you send doesnt mention it i think, but just out of curiosity.
@Zarsla Oh actually i have one additional question. Does there happen to be a: "is (not) less/more than'', or ''is (not) equal or less/more than" symbol too? The link you send doesnt mention it i think, but just out of curiosity.
AFAIK no, you just have to make do with equal or less/more than.
About you're above post MV is weird when it comes to javascript evals and conditional branches, and I've found that using <= and >= to have problems from time to time so I use <== and >==
Hey im looking for scripts and symbols that checks what state the variables are... id like to use it in this manner:
condition branch,
if script variable 0001 is 1 to 3 || if script variable 0001 5 - 9 || if script variable 0004 is NOT 5 || if switch 0004 is on
Do action...

So basically im looking for the scripts to check variables, and switches.
And im also looking for the symbols that represent: (IS NOT) 3, (IS FROM) 1 (TO) 4, (IS) 3,

Thanks in advance 🙂

hi friend.
here symbole and function your are looking for .
(IS NOT) 3,
!==3
(IS FROM) 1 (TO) 4,
>0&&<=4 //(&& = And, || = or )
(IS) 3,
===3

Here somes logical example
Code:
if (myvar!==3){ // if my variable are not === 3
// do my code
}

if (myvar >0 && myvar <=3){ // if my variable are sup 0 and&& inferior or === to 3
// do my code
}

if (myvar===3){ // if myvar are sticted === to 3
// do my code
}

so you can do logical like this

Code:
var myvar = $gameVariables.value(0001); // to get value
if (myvar >0 && myvar >=3){ // check if myvar are absolute superior to 0 and(&&) if myvar are inferior or === to 3.. Do my code....
// do my code
}

In computer language 0 are a binair value.
So take into account.

you can do >0 // superior to 0 only
than
0>=0 // superior or = to 0 .
@Zarsla alright thats too bad i suppose, but i guess i can make do. Thanks again for your efforts.
@Jonforum Zarsla actually helped me already. But I appreciate the efforts you put into explaining it in any case 🙂

Original thread: https://forums.rpgmakerweb.com/threads/if-variable-is-script.77838/