IF statement script question

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
395
Reaction score
311
First Language
English
Primarily Uses
RMMV
Hi all, I'm sure this has been asked before but I'm at the end of a long day and just want to crash out and get an answer tomorrow.

I need to do a scripted IF statement, which checks if three Switches are all turned ON, so in pseudocode...

IF {switch 1 == on} AND {switch 2 == on} AND {switch3 == on}

Like, to place in the "Script" field of a conditional branch.

Can someone remind me what the syntax is? It's been ages since I've been near script.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
594
Reaction score
319
First Language
Poland
Primarily Uses
RMMV
use following code

Code:
if ($gameSwitches.value(1) || $gameSwitches.value(2) || $gameSwitches.value(3))
example
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
395
Reaction score
311
First Language
English
Primarily Uses
RMMV
Thanks a bunch!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How do you cure sleep problem? It has been 7 months and it's 3 AM now..
Darn you, Seals! Why do you gotta be so cute when on land?:kaoluv:
So dragonbones getting laggy xD
I even removed the fingers armatures.

Have to remake this guy after crashing ( corrupted file).
:rtear:

Although limited to only this shop for room decorations, I like this aspect for previewing items.

Forum statistics

Threads
100,837
Messages
980,129
Members
132,487
Latest member
AnthonyDewitt
Top