Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Reverse Lever Control?  (Read 1989 times)

nutsshearer

  • Bay Watcher
    • View Profile
Reverse Lever Control?
« on: December 13, 2011, 11:29:11 am »

Is it possible to have reverse lever control?

For example, when my dwarfs pull Lever X, floodgate 1 opens while floodgate 2 CLOSES?

Could I build a lever first for floodgate 2, pull it so it opens, then destroy the lever, then hook floodgate 2 up to lever X?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Reverse Lever Control?
« Reply #1 on: December 13, 2011, 11:33:56 am »

Not directly - the only way you can do it is to use fluid and pressure plates to invert the original signal, since triggers send explicit "on" and "off" events, not "toggle" events (the sole exception being gear assemblies).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Reverse Lever Control?
« Reply #2 on: December 13, 2011, 12:17:32 pm »

When I need to do something like this, I use a single-tile drawbridge instead of the second floodgate.  A drawbridge has the opposite action of a floodgate - it blocks when 'on' and lets fluids or creatures pass when 'off', while a floodgate does the reverse.  If you link a single lever to both a floodgate and a drawbridge, you can have one open while the other is closed.  The main downside to single-tile bridges is that you can't tell when looking at them if they're raised or lowered, so you may want to make it a 2X1 drawbridge instead.  The other downside is that unlike the floodgate the bridge will crush (nearly) anything in the way when it raises, but maybe that's a plus for your application.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Reverse Lever Control?
« Reply #3 on: December 13, 2011, 03:56:20 pm »

If you really want two bridges or two floodgates or two doors for something, you can set up a water reactor next to two pumps on top of each other (like a pump stack, but they're not connected to each other directly). Each pump has its own powering gear connected to the same lever, and the lever is pulled after the first gear is connected. Put two pressure plates into the water intake tiles and make sure they're set to activate at the same water levels, and the system just needs to be linked to something and the water added.

Note that because pressure plates remain active for 100 ticks after they stop being triggered, the buildings they're connected to won't do their respective things at once. There are a couple of ways around this. One is to hold the water somewhere else for 100 ticks so that one plate deactivates as the other is being activated and the signals go out at the same time. The other way is to use one door and one floodgate. Because floodgates have a delay and doors don't, pulling the lever one way will deactivate the door plate just as the floodgate is responding to its pressure plate. Pulling it the other way will result in a 200-tick delay between the door and the floodgate's respective responses.

Having both a floodgate and a door connected to each pressure plate would result in a system which takes 200 ticks to respond fully to each lever pull. For the first 100 ticks, only the door attached to the just-activated plate has switched states. At 100 ticks, the floodgate attached to the just-activated pressure plate responds and the just-deactivated pressure plate switches off, causing the door connected to that plate to change states and sending out a signal to the connected floodgate. At 200 ticks, the floodgate connected to the just-deactivated plate responds.

This would work out well for trade depot airlocks, since having the depot sealed off from both the fortress and the outside world for a little while is no big deal.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Garath

  • Bay Watcher
  • Helping to deforest the world
    • View Profile
Re: Reverse Lever Control?
« Reply #4 on: December 13, 2011, 04:25:18 pm »

I think i'll stick to 2 seperate levers for now
Logged
Quote from: Urist Imiknorris
Jam a door with its corpse and let all the goblins in. Hey, nobody said it had to be a weapon against your enemies.
Quote from: Frogwarrior
And then everyone melted.