Light switch Graphic Change?

I have a lighting event set up wherein you interact with a switch on the wall and it gives you a choice (On / Off); the choice you make affects the lighting accordingly. Okay, a light switch. Simple enough. I am using a switch sprite (or graphic), however I can not get it to switch from "every time the action button is pressed" to "only when the choice is made" - i.e. light is on, switch is up and vice-versa.

The switch starts out in the "off" position - makes sense since you start off in a darkened room. When you interact with the switch it gives you the aforementioned On / Off option. Okay... everything is set up correctly, however every time you interact with the switch, it moves anyway, hence it's always going to be in the "off" position - first press moves the sprite to where the "on" position should be and brings up the choice box, second press takes it back down regardless of your choice. I don't know why I can't figure this out, really. I just need it to toggle back and forth depending on your choice.

Sorry if I worded this horribly, still a bit flustered from working this out for an unforgivable amount of time...
Could you show a screencap of your code? It's kind of hard to see the problem without seeing the actual code. My guess is that you've got the image change outside of the conditional branch but I'm not a code person. Seems like an odd way to do it anyway. When I walk up to a switch and click on it I'm intending to flip it, not think about it first.
I know what he's talking about (I think) This situation would be an event something like this:

Show Choices (ON, OFF)

when ON

Screen Tint (Normal)

Set Move Route: Change Graphic to Light Switch (ON position)

Exit Event Process

when OFF

Screen Tint (Dark)

Set Move Route: Change Graphic to Light Switch (OFF position)

Exit Event Process

This is how I'd do it (if it works). Set Move Route will help you with your graphic changing problem.
set direction fix to true
You don't want to exit event process and use a move route to change the graphic - when you leave the room and come back, they'll be back to their original state.


When you turn the light switch on, also turn on a REAL switch. Then add a second page conditioned by that switch, with the switch sprite in the ON position. If you want to, give it an option to turn the light back OFF again, and that option will turn the REAL switch off.
You don't want to exit event process and use a move route to change the graphic - when you leave the room and come back, they'll be back to their original state.

When you turn the light switch on, also turn on a REAL switch. Then add a second page conditioned by that switch, with the switch sprite in the ON position. If you want to, give it an option to turn the light back OFF again, and that option will turn the REAL switch off.
Oh yeah, I completely forgot about leaving a map. Forget what I mentioned.

Original thread: https://forums.rpgmakerweb.com/threads/light-switch-graphic-change.22062/