I made an elevator, which should work like this:
If the elevator is at the height of 304, then the switch should only open the doors. If it's lower than 304, then it first raises it and then opens the door. There is another switch below which does the same, but with the height of 4.
Now, when I press the upper switch, it works. But when I go down, the second switch instead of just opening the door, makes the elevator go down even more. If the elevator is at the height of 4, and then I press the first switch, it does nothing.
Also, if you press the first switch, then press the second switch, then again press the first switch, then it raises it to the height of 4, but won't raise it to 304.
Here's the code:
I uploaded the map so you can see it yourself.