Ordered Puzzle Variable/Switch

Good evening at all.
I can not program a puzzle ^^'
My intent is to use 4 events, which if selected in the right mode with the chosen exhibition, trigger a special event, otherwise nothing will be activated.

To be more precise about what I'm looking for, it should work this way:
- Text: Do you want to pull the lever down?
Show Selection
- Yes
- no

and so on...

(If the lever has already been pulled down, the text should appear:
The lever has already been pulled down, do you want to lift it again?)

Can any of you help me?
1) on your level event, use to pages and a self-switch to switch between the pages for displaying the switch status.

2) use a single variable to count up the current status.
On each switch, have it check which number is currently in the variable (which should be the number of switches in the correct order)
For example on the third switch in the order, that variable needs to contain a 2 (for two switches in correct order).
If the number is correct, increase it by one, ir it is wrong, reset it to zero
If the number reaches four, give the special effect.
Thank you for the reply @Andar 😀
I had already done as you indicated, but maybe something wrong ...
Do you want me to show you screenshots?

EVENT 1: (one page)
1.png

EVENT 2: (two page)

2.png 3.png

EVENT 3: (two page)
4.png
5.png

EVENT 4: (3 page)
6.png
7.png
8.png

Can you create a sample demo?
show the screenshots of the event pages, and we can tell you where it went wrong
I edit the post before ^^ @Andar
I wasn't talking about using conditions to check the variable, I was talking about using conditional branches for that, and you need to reset the variable when in the wrong order (which is why you need the conditional branch, to get the else if it gets to the wrong order)
I wasn't talking about using conditions to check the variable, I was talking about using conditional branches for that, and you need to reset the variable when in the wrong order (which is why you need the conditional branch, to get the else if it gets to the wrong order)
Then I do not think I understand ...

Can you give me an example?
if switch is turned by player
> conditional branch var Q_1 = 2
>> control variable Q_1 = 3
> else
>> control variable Q_1 = 0
@Andar In what event? In all?
whereever you have the question if a switch should be turned, at the place where you currently have only the control variable - and of course you need to remove the condition from that page (if doing it that way, all your events should be one-page-only, with the switches that are to be used multiple times getting multiple branches).

My comment about the two pages assumed a slightly different setup without those show choices.
I think I've done it right...
How do I reset everything if the sequence is wrong?
Here is a demo:
https://www.dropbox.com/s/hr9mu5dc7d9epg3/Andar Puzzle.rar?dl=0

This must be the solution:
4 1

2 3

Original thread: https://forums.rpgmakerweb.com/threads/ordered-puzzle-variable-switch.77717/