Event reset if wrong chest open

I need help. Still not sure where to post things yet so, sorry in advance.
Can someone guide me as to how to make an event(s) reset themselfs if for example the player opens the wrong chest. What I'm trying to do is making sort of a puzzle. Where the player must open 6 different chest, but have to be opened in the right order, this will make the next chest openable. But if the player messes up. I want the events to reset so that the player has to try again until he completes the puzzle.
My issue is trying to figure out how to make them reset after a failure. Can any help me? Possible show me an image of the eventing needed to create this. Since I'm very visual, and when reading things, a lot of times I don't fully comprehend what must be done.
If you are using self switches for the chests, you can either have one event that will turn off all the self switches on all the chests (you will need to do a script call or use the Outer Self Switches plugin which I think comes shipped with the engine), or have a third page on all the chests, with a closed chest sprite, conditioned by a global switch (all events will use the same switch for this), set to parallel process, with the command to turn off the self switch. When you want to reset, turn on the global switch, wait 10 frames or so, then turn it off again - and reset anything else you're using to keep track.

If you are using MV and need help with eventing, your question should go into the MV Support forum. A mod will move this one there for you soon.
if you want it a sequence, you need to count with variables.

on the first chest, check if the variable number is zero. If yes, count up one and open the chest. If no, set counter to zero and show text "failure".
on the second chest, check if the variable number is one. If yes, count up one and open the chest, if no set counter to zero and show text "failure".

and so on until every chest has its own counter number checked.
Thanks guys. Yes I'm using MV but sadly after reading this I'm still slightly at a loss. Not sure how to make all self switches turn off using a command or script. Can you explain it for me please. I've got everything else down except for that part.
Use a switch not a self switch. It will be easier that way. Or you can use variables.

I've moved this thread to MV Support. Thank you.

Just use a single variable for them all...
Reiterating what mentioned above with image :
upload_2019-10-13_5-48-29.png


The second page of the event for opened chest :
1st chest = 1, 2nd chest = 2, 3rd chest = 3, and so on
upload_2019-10-13_5-49-47.png


Basically everything will reset when the variable become 0
Okay I think I finally got it. Thanks guys! Now I'm one step closer to finishing my demo. The hard part is yet to come lol
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/event-reset-if-wrong-chest-open.114191/