Attempting to do a puzzle where the player steps on a button only once.

Hello RPG Maker forums! This is my first post, so I'll keep it short and concise.


What I want to do


I've been attempting to re-create a puzzle reminiscent of the button puzzle in UnderTale (Found here) (UnderTale Spoilers)


The game describes the puzzle as follows: "Turn every X into an O, then press the switch"


The Problem


Since when the player steps on a switch the second time it turns into a triangle, that's where problems arise, as the game instantly goes through the red button, to the green, to yellow. (As I'm using the player touch trigger)


What you can do


Tell me how to figure this out! All I need is an explanation as to how to fix the problem. 


Thanks!
Sorry, I'm not sure I fully understand what the problem is. I just set this up in my game using coloured buttons and it worked just as intended.


I step on the button once and it changed to the second colour, I had to step off and step on it a second time to get to the third colour.


Here's a link where you can see all three pages: http://imgur.com/a/Y9PQf


EDIT: Here's a better way to do it to, now that I decided to take more than 5 seconds on it:

Spoiler
JJWTVLM.png



Do you mind sharing the pages of your event so we can see where the error is?
Sorry, I'm not sure I fully understand what the problem is. I just set this up in my game using coloured buttons and it worked just as intended.


I step on the button once and it changed to the second colour, I had to step off and step on it a second time to get to the third colour.


Here's a link where you can see all three pages: http://imgur.com/a/Y9PQf


Do you mind sharing the pages of your event so we can see where the error is?

I decided to comb over the event real quick and found the problem. I accidentally had the final page activating with self switch A instead of self switch B. Thanks for the help, though. The pages did actually help though, as I had a few other things wrong.


Thanks for your help!
No problem! Check out my edit if you want to see how to do it in one page 🙂  It's in the spoiler.


BTW, have you figured out how you make the final switch check if everything is at the correct position? Because I have some suggestions for that.


Unfortunately, I'm not sure the best thing to suggest to reset the event. Since a main event couldn't access each individual events self switches. hmmm actually I may have something in mind for that too!


I'm familiar with the puzzle in Undertale, so if you need more help with it, feel free to ask.
No problem! Check out my edit if you want to see how to do it in one page 🙂  It's in the spoiler.


BTW, have you figured out how you make the final switch check if everything is at the correct position? Because I have some suggestions for that.


Unfortunately, I'm not sure the best thing to suggest to reset the event. Since a main event couldn't access each individual events self switches. hmmm actually I may have something in mind for that too!


I'm familiar with the puzzle in Undertale, so if you need more help with it, feel free to ask.

I've come up with the idea of adding to a variable when a switch is pressed once, and then subtracting on the second press, to do the final check.


Now, as for resetting the events if the player doesn't do it correctly, I don't have many particular ideas as to how to go about that.


I would be interested to hear your suggestions, though.
That was the same way I set up the check as well.


My idea for resetting the switches isn't working out to well. Sounded right in my head, but actual execution seems to glitch it up with more than one switch (probably because the timing isn't working the way I wanted it to) heh Still toying with it.


For reference though: it was to have the conditional branch for failure on the switch turn on a regular switch, give every 'button' a second page with conditions for that switch to be on, set that to autorun and have it turn off the self switch and the regular switch. Which worked for one button! Unfortunately, as soon as I add in more buttons, it doesn't seem to trigger on all of them before turning off the switch.


In Ace you used to be able to use a script call to access individual events' self switches. If that can be done in MV (and I'm not 100% sure it can or not), then that would be the BEST way to reset the puzzle for sure.


EDIT


Okay, there might a cleaner way, but I've got this to work. It's going to be different depending on if you have your events set up in the 3 page way or the 1 page way. There's a plugin that came with the program (it'll be in your Kadokawa plugins) called OuterSelfSwitch. Install that plugin, from there you can read the help file and see how it works. (it's pretty simple)


As long as the 'buttons' are the ONLY events on the page using a self switch with particular letters, you can use the 'all' command to trigger them all at once, or you will have to do each event number individually. It should be pretty straight forward for the Plugin Commands if you're using three pages.


You'll want this on your fail conditional branch:


Plugin Command: OuterSelfSwitch off all A


Plugin Command: OuterSelfSwitch off all B


and that will reset all switches back to their original page.


If you're doing the one page way, then you'll want this on your fail conditional branch:


Plugin Command: OuterSelfSwitch on all B


Then give each switch a second page that is on autorun, has a condition of Self Switch B ON and the event turns off self switch A and B.


Since each switch is using it's OWN self switch to do this, it won't have the trouble the old one using a global switch did of stopping part way through the process.

Original thread: https://forums.rpgmakerweb.com/threads/attempting-to-do-a-puzzle-where-the-player-steps-on-a-button-only-once.55962/