Is it possible to do AND statements in events?

I ran into a logic issue where I need to do something like: if Switch bla AND switch ya are on then do this, else, do tthat. nesting the checks is.....not good.

So can I do a conditional statement that sais something like if $game_switch[7] == ON && $game_switch[6] == ON {} else {}. Your probably thinking, yes you can do that, through scripting - that's fine and all, but I would like to do it in the events conditional (I dont want to have to actually write a script that checks this if I can do it in the section of the coditional page where I can enter script calls), on the last page where you have the abillity to do script calls, would I simply do: $game_switches[6] && $game_switches[8] ??

Sorry, I cant tell if its switches or switch, haven't opened the script editor to check.
it is switches, but I would also add '== true' to the end of those. Otherwise Ruby will check if the objects exist (as in, are not nil, they have SOME sort of value), and you want to make sure they they're true. But yea, that's all you do.
Figured out that all I had to do was: $game_switches[x] && game_switches[x] in the script section of the conditional page. because its an array at position x, x will either be true or false, or what ever variable is stored in there at that position.
You don't need to add == true.


$game_switches[1] is the same as $game_switches[1] == true.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-do-and-statements-in-events.16454/