# How do I create a hidden staircase?

I'm currently trying to create a hidden set of stairs (made of whole blocks, not stair blocks) by having pistons stacked on top of each other, so that when it's deactivated it looks like a flat surface, but when activated the stairs raise from the ground (similar to a lot of action adventure/RPG/puzzle games, think Zelda). The problem is pistons don't behave nicely when pushing and pulling each other while active.

I figured out I need a delay so each layer could activate one at a time, but the problem is I need the order of the delays to be in the opposite order when activating compared to the order when deactivating.

When opening, the bottom layer has to activate first, because they won't activate under an already active piston, but when deactivating it needs to deactivate last, because they can't pull an active piston.

I am also relatively new to red stone circuits, so maybe the solution is easy and I just missed it, but some direction would be appreciated.

-
Can you post screen shots of the staircase on and off so we know what you are aiming for? – Ronan Jul 5 '11 at 22:07
Do you have to move the stairs only vertically? i.e. it may be easier if the steps come out from the side while the disguise blocks come from other directions. This will reduce your issues with timing. – Dmitry Selitskiy Jul 7 '11 at 11:36
had to remove some of the wood after i remembered i was going to use sand, due to wood not falling – Piat Jul 8 '11 at 1:09
Ahh, I thought your pistons were facing horizontally, not vertically. – Kevin Yap Jul 8 '11 at 2:06

One way you can approach this is to use an `RS-NOR Latch Array`. This is essentially many RS-NOR latches next to each other. RS-NOR latches are circuits that can store a `0` or a `1` (represented in Minecraft as an off or on current). When the button to activate the staircase is pressed, you want all the RS-NOR latches to set themselves, to open the stairs. When the button to close the stairs is pressed, you want to reset the RS-NOR latches to close the stairs.

The good thing about RS-NOR latches is that you can adjust the delay of the signals going to the S (set) and R (reset) lines of the circuit. Essentially, you want to make the lines setting the RS-NOR latches to set them in one order, and the ones reseting the latches to do so in the opposite order.

Unfortunately, it's a little difficult to explain this in text, so I'll point you to this video by Minecraftaddict.

The video isn't about your specific scenario, but to build the station, he uses an RS-NOR latch array. Note how the lines are set through the signal running under the delay, and are reset through the signals that are set to different delays, allowing the pistons to reset correctly.

As promised, here is a little RS-NOR Latch Array tutorial.

This is the RS-NOR Latch Array. It is a series of RS-NOR latches. The nice thing about this design is that the latches are vertical, allowing them to be put next to each other with one block of space in between. Additionally, the reset lines for the latches are underneath, meaning all the latches can easily be reset with one input. The lines running towards the left of the screenshot are the outputs of the latches.

The reset line (or what you'll probably use as the set line) is located under the latches. The signal must be inverted to keep the torches off, so that when an input is given, the line turns off and the torches turn on. I removed part of the right-most latch so the reset could be seen more clearly. Notice the repeaters. Repeaters can pass a signal through blocks, so the reset line signal is sent to a repeater leading into a block, turning the torch on top of the block off, and then sent to a repeater right after the block, which continues until the last latch. This allows one signal to be sent through all the latches to (re)set them from first to last.

This is technically the set line of the latches, but it's better for the reset line when you need the reset to happen in a specific order. This is where you would make adjustments via repeaters make sure the pistons reset in the right order. Note that the final block leading into the latches should always be a repeater, or else the `!output` signal will contaminate the rest of the line.

That structure in the distance is a piston-powered vertical item transportation system - just ignore it.

-
If it's not completely clear how you can implement the RS-NOR latch array in your circuit, just comment and I'll attempt to clarify. – Kevin Yap Jul 5 '11 at 7:48
I think I see how the concept of this would work, but as i said im still new to the whole red stone circuit thing so still looking into how these latches are setup and how they work – Piat Jul 7 '11 at 9:36
RS NOR latch is definitely a way to go if you insist on only moving the steps vertically. – Dmitry Selitskiy Jul 7 '11 at 11:35
@Piat I'll see if I can get a mini-tutorial done with screenshots. – Kevin Yap Jul 7 '11 at 16:26
So, when hooking this us, you would put a monostable circuit on each of the set, reset lines and say hook that up too a RS-NOR latch and a button? And the outputs to the pistons as needed. – Theo Belaire Jul 9 '11 at 2:35

Depending on the tallness of your staircase, active levers isn't the only issue; if you have several sticky pistons stacked the compression order becomes quite involved indeed.

One thing you should definitely consider is to turn the staircase through 90 degrees; causing it to pop out of the wall instead of the floor; that tends to help; and allows you to use fewer, better hidden pistons.

Without any screenshots of your current setup it's difficult to speak to specifics of redstone wiring, tho'.

-

I haven't tried this, but could you not use a minecart to activate/deactivate the pistons? Have one launched from a powered rail when you activate it, it trundles over detector rails activating each layer of piston as it goes, then gets stuck on another powered rail at the end. When you want to retract the minecart goes back to the start and hits each detector again, but in the opposite order.

The only challenge then is how to turn the pulse as the minecart goes over into a on->hold->off which I imagine someone has already solved with some form of latch.

-

Ok, after working on this for a few weeks, I almost have a solution. I have a working elevator that consists of 7 pistons on top of each other.

It is really just a bunch of pistons on top of each other, with a "tape" ROM telling it when to extend and contract each piston.

The tape is run by four rows of pistons, pushing it around and around. I can read the tape by pushing power through it, wool or other solid blocks will conduct it, while glass and fenceposts will not. Then I just wrote out what order the pistons should fire in, and hooked all the wires up and boom, elevator.

Now, I can make stairs that drop by two each step, just by not firing the bottom pistons, however I haven't yet figured out how to make a less steep staircase, as I can't really drop the blocks all by one, as that would throw off the whole system.