Trouble With Switch Events

Alright, so I have been spending literally 3 days trying to figure out how to solve this problem, and I have as of yet had no luck.


    What I have, is a room with 11 switches on the wall, when the player activates the 4 correct switches, the path forward opens. I already know how to make it so that the path will open when the right switches are pressed, the issue I can't solve, is the actual graphic of the switch.


    The end result I want, is when the player activates a switch, the switch looks as if it's in the on (downward) position, and then if they activate the switch again, it makes the graphic move back to the off (upward) position. This is easy enough to switch the graphics using separate event pages. Easily enough, I managed to get the switch into the on position, but when I set up the second event page to have it turn off, and you go to press the switch, it just resets the animation of turning the switch on, and stays in the downward position.


    If anyone knows how I can fix this issue, I would greatly appreciate it. I have included screenshots of my event. As you can see, I added in an event page that activates a self switch. I did this, because using just two event pages, I could not get the event to switch back and forth, the reason being that both pages need to have either a switch, or self switch activated to switch to that page. But you also can't activate an event if those other switches aren't on, basically making me create a separate event to achieve this.


    I would simply like it all to be in one event, switch is down when on, and up when off. I also have 11 switches created, that turn on and off when the events are turned on and off respectively.

Screenshot_2.png

Screenshot_3.png

Screenshot_4.png
Hello,


I think the problem of your event is that you didn't turn selfswitch B off. The program reads the pages of events from right to left. Because of that the game just turns switch 31 off on the third page.


Furthermore - and this is just an advice - you don't even need two selfswitches. You could make the event pages up like this:


page1.jpgpage2.jpg


Instead of a switch you could also use a variable to count if all four correct switches are activated 🙂
Ah I see now. I can't believe I didn't think of this option sooner. I basically have what you just did, on a more complex scale than I need. Thanks for the assist. Finally I think I can get on with my life xD

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-switch-events.56222/