JS command for switches

I'm a big time beginner when it comes to Javascript. I'm looking for a specific line of Java. I'm using SRD's Hud Maker and I'm trying to make it so that a certain image shows up when a switch is on. In the conditions box I wrote:

if ($gameSwitches.setValue(91) === true);

However I'm not sure how to go past that. Under normal circumstances I could probably write it out from watching others on YouTube, but I don't know how it's done in this conditions box.
This means "turn on switch 91":
Code:
$gameSwitches.setValue(91, true)
I think you want this, though:
Code:
$gameSwitches.value(91)
This is true if switch 91 is turned on, else false. A condition is generally a simple true/false value, so try this one instead (no need for the "if" stuff). 🙂
This means "turn on switch 91":
Code:
$gameSwitches.setValue(91, true)
I think you want this, though:
Code:
$gameSwitches.value(91)
This is true if switch 91 is turned on, else false. A condition is generally a simple true/false value, so try this one instead (no need for the "if" stuff). 🙂
Works, thank you!
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/js-command-for-switches.113730/