The way the pressure plates are in the corridor are powering the dispensers no matter what. It is recommended to place them at head level.
This solution works on JE and BE.
Solution Images
Solution Notes
- This solution is single-sided. To implement the other side, simply build this design, and mirror it to the other side.
- If your corridor is less than five blocks long, you will need to place redstone dust on top of the dispensers. This will be a problem if your corridor is three or more blocks high.
- The lever is opposite what you have requested, ON is safe, OFF is deadly. Use a redstone torch to invert signal if coming from an auxiliary input device.
- The comparator at the bottom must be switched to subtraction mode to work. To do so, right-click on it so that the torch at the front is lit.
Downsides to This Solution
- You cannot disarm the trap while the pressure plates are activated. If you do, the arrows will keep firing forever.
How it Works
See how your Redstone Machine works so you can apply the principles to other builds!
- The input from the pressure plates runs into a comparator subtractor clockcomparator subtractor clock that rapidly pulses to fire arrows.
- Redstone Repeaters transmit the signal to the dispensers. Every powered dispenser will cause it and the adjacent dispensers to fire.
- Flicking the lever locks the repeater that sends the signal from the pressure plates, meaning it won't reach the clock, and so won't fire the arrows.
Next Steps
Here are some ideas that could come next. Try them out!
- Add a light indication that indicates to players whether it's safe or armed, so that they know before they go.
- Add dispensers from the ceiling.
- Try using splash potions instead of arrows, or even tipped arrows/lingering potions!