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.

stairs properly closedstairs opensairs closed after first openingvery rough initial setup


Solution 1:

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.

enter image description here

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.

enter image description here

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.

enter image description here

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

Solution 2:

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'.

Solution 3:

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.