According to your screenshots, the player needs to flip the switch on event 3, then event 2, then event 5, then event 4, to get a 3124 sequence. Is that what you are intending? And they have to actually walk up to the gate in order for it to open - it doesn't open on its own after you flip the last switch. If you want it to open on its own, then you need to give it 2 pages. The first page will be the gate closed, and the second page will be the gate opened, and will be conditioned by the switch you turn on in the common event.
If you're not sure you have the sequence correct, you could put a Show Text command with \v[14] in it at the start of the common event, and it will tell you what the sequence is as you flip each switch. A good debugging technique that is easy to remove once you've got it working properly.
Also, I'd uncheck the Stepping Animation boxes. In this case they do nothing, but if you had different coloured switches in the different columns of the spritesheet, it would make them cycle between the colours even when the player isn't interacting with them.
I assume the second page of each of your events is just the switch in the 'on' position and self switch A as a condition?
If it makes it easier for you, you could just change the numbers you are adding to the variable, to be the event id (so event 3 will add 3 to the variable, event 4 will add 4 to the variable), and then you can change the sequence in the comparison in the common event to represent the event numbers. You can only do this because your 4 events all have ids less than 10.