MV What am I missing in my script? (Controlling Selfswitches of other events)

Hey there!
I am trying to make a puzzle right now where you have to turn on the right 2 orbs out of 6.
My basic logic idea is that wrong orbs add +1 to the "wrong var" and right orbs +1 to the "right var"
If you interact with an orb it starts glowing to indicate it's turned on.
If you interact with any orb a second time it checks if wrong var=0 and right var=2 is and if yes the puzzle is completed.
Now the difficult part.
If no, a sound is played, all vars are reset to 0 and I have to reset all orbs.
The thing is that I'm working with self switches instead of normal switches to learn how to do it. If you have the wrong combination I want the orb you're interacting with to not only turn off it's own Selfswitch to stop the glowing to indicate it's turned off again but also to turn off all the other orb's self switches.
TL😀R How do I make one event turn off the self switches of other events?
I've been using this table so far.

1600797529800.png

Where is the mistake in those? I'm sadly no coder myself.
1600798295182.png

Does it work if you have it set up like the table example? This is how I have mine and it works. I don't know if you can just do a large script command this way like you're doing, so I usually just do one script command per self-switch.
Hi ^^
I can't see anything wrong from here...
I mean, I'm supposing that you are not using the same key variable for all switches, I think you put into that way just to illustrate how you are doing right?
If not:
Spoiler
When you put "//" You are turning the code in a comment, so I guess that is the reason for it not be working.
Try to put the array directly on the script call, instead of repeating the same key variable for every code.
Otherwise, maybe you have another event turning the self switches on again?
You need to set the key to a value before calling the $gameSelfSwitches.setValue function. (And right now your key is being commented out, since it has // before it, which means it's never being run). You can use // to make comments to yourself.

So for example, you can do this instead where you write the key in the function itself:
$gameSelfSwitches.setValue([44, 2, 'A'], false);

Or you can do it the way the poster above mentioned.
I mean, I'm supposing that you are not using the same key variable for all switches, I think you put into that way just to illustrate how you are doing right?
Yea totally haha it's totally not me being a total idiot in coding haha :oswt:
That was indeed my mistake. I just spread out all commands, put the key set commands out of the comment and above the key commands and now it works!
:ewat:
MAGIC!

Original thread: https://forums.rpgmakerweb.com/threads/what-am-i-missing-in-my-script-controlling-selfswitches-of-other-events.127734/