Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Levers that work inversely!  (Read 1507 times)

Polar_Atom

  • Bay Watcher
  • Urist Cancels Life: Dwarf Fortress
    • View Profile
Levers that work inversely!
« on: February 12, 2011, 05:39:39 am »

I don't suppose there's anyway to have a lever work both ways. What I mean is, as one thing closes, another opens via pulling a lever?
Logged
This forum post menaces with spikes of humour.

rephikul

  • Bay Watcher
  • [CURIOUSBEAST_IDEA]
    • View Profile
Re: Levers that work inversely!
« Reply #1 on: February 12, 2011, 05:52:44 am »

I don't suppose there's anyway to have a lever work both ways. What I mean is, as one thing closes, another opens via pulling a lever?
you can do that. Link the lever to the first thing, then pull it. Now link the lever to the second thing. You now have a lever linking to 2 things of different state and one will open as the other close.
Logged
Intensifying Mod v0.23 for 0.31.25. Paper tigers are white.
Prepacked Dwarf Fortress with Intensifying mod v.0.23, Phoebus graphics set, DFhack, Dwarf Therapist, Runesmith and a specialized custom worldgen param.

rarborman

  • Bay Watcher
  • Penguin Dungonmaster
    • View Profile
    • dice
Re: Levers that work inversely!
« Reply #2 on: February 12, 2011, 06:09:16 am »

Just like in reality levers are both on and off at the same time...just be careful about how many things you connect to a single lever, it increases the lag caused by pulling it.
Logged
"But to that second circle of sad hell, Where ‘mid the gust, the whirlwind, and the flaw Of rain and hail-stones, lovers need not tell Their sorrows. Pale were the sweet lips I saw, Pale were the lips I kiss’d, and fair the form I floated with, about that melancholy storm."

Polar_Atom

  • Bay Watcher
  • Urist Cancels Life: Dwarf Fortress
    • View Profile
Re: Levers that work inversely!
« Reply #3 on: February 12, 2011, 06:10:45 am »

Bloody Good. Cheers.

Now I can seal a door, whilst simultaneously releasing magma. I'm sure I'll never need to use such a device.

.... -.-
Logged
This forum post menaces with spikes of humour.

ZetaX

  • Bay Watcher
    • View Profile
Re: Levers that work inversely!
« Reply #4 on: February 12, 2011, 06:12:54 am »

No, it's not true what rephikul said. This will not work for most things. The lever doesn't send a toggle signal (in most cases; gear assemblies should be an exception [haven't tested for some versions]), but a "close" or "open" signal (which is ignored if the object in question is already in that state).

You have two options:
- The easy solution is to use a raising drawbridge A and either a floodgate, retracting bridge or door B. Now the "open" signal opens B, but raises A, so A get's impassable (including fluids), and conversely the "close" signal closes B, but lowers A, making it passable again.
- The hard er but more general solution is to build an inverter using water or animal logic (which works for all kind of uses) or mechanical logic (which only works for some settings, as it cannot trigger pressure plates and thereby sending an arbitrary signal itself).
Logged

blue emu

  • Bay Watcher
  • GroFAZ
    • View Profile
Re: Levers that work inversely!
« Reply #5 on: February 12, 2011, 06:35:46 am »

My first thought was a fluid-logic inverter, yes.

Hook the lever directly to object #1. Also hook it to a floor-hatch which will drain water off of a pressure-plate connected to object #2. The combination of lever/floor hatch/water/pressure plate will invert the activation/deactivation signal.
Logged
Never pet a burning dog.

rephikul

  • Bay Watcher
  • [CURIOUSBEAST_IDEA]
    • View Profile
Re: Levers that work inversely!
« Reply #6 on: February 12, 2011, 06:37:31 am »

No, it's not true what rephikul said. This will not work for most things. The lever doesn't send a toggle signal (in most cases; gear assemblies should be an exception [haven't tested for some versions]), but a "close" or "open" signal (which is ignored if the object in question is already in that state).
Then I must admit not everythings behave the same way because I've been using this to open and close 2 different bridges at the same time.
Logged
Intensifying Mod v0.23 for 0.31.25. Paper tigers are white.
Prepacked Dwarf Fortress with Intensifying mod v.0.23, Phoebus graphics set, DFhack, Dwarf Therapist, Runesmith and a specialized custom worldgen param.

ZetaX

  • Bay Watcher
    • View Profile
Re: Levers that work inversely!
« Reply #7 on: February 12, 2011, 06:59:23 am »

Are those bridges of the same "type" (both raising or both retracting)¿
Logged

rephikul

  • Bay Watcher
  • [CURIOUSBEAST_IDEA]
    • View Profile
Re: Levers that work inversely!
« Reply #8 on: February 12, 2011, 07:13:32 am »

Are those bridges of the same "type" (both raising or both retracting)¿
ya they are both rasing and both made of the same material, size and direction.
Logged
Intensifying Mod v0.23 for 0.31.25. Paper tigers are white.
Prepacked Dwarf Fortress with Intensifying mod v.0.23, Phoebus graphics set, DFhack, Dwarf Therapist, Runesmith and a specialized custom worldgen param.

ZetaX

  • Bay Watcher
    • View Profile
Re: Levers that work inversely!
« Reply #9 on: February 12, 2011, 07:18:02 am »

Strange; maybe that changed recently. But then again, it seems to not have changed for floodgates...
I will test that later on, now I've to oversee an exam^^
Logged

Shambling Zombie

  • Bay Watcher
    • View Profile
Re: Levers that work inversely!
« Reply #10 on: February 12, 2011, 07:20:59 am »

Last time I tried to have one lever open one floodgate and close another, all my dwarfs suddenly found themselves drowning in my dining hall.

I think it might have been an accident.  :-\
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Levers that work inversely!
« Reply #11 on: February 12, 2011, 11:11:53 am »

No, you can't do this.  Levers send an 'open' signal when moved to one position, and a 'close' signal when moved to the other position.  When a bridge, door, floodgate, or other device with open/close positions gets a signal which matches its current state, nothing happens.  If you link a lever to a thing, pull it, then link it to another thing and pull it a few more times, both things will end up in the same state, regardless of what state they were in when linked to the lever.

Then I must admit not everythings behave the same way because I've been using this to open and close 2 different bridges at the same time.

Upload a save.  Bridges and lever have never worked this way, ever.
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.

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: Levers that work inversely!
« Reply #12 on: February 12, 2011, 11:16:29 am »

One could link a not-gate to the second building, though.
Logged

thegoatgod_pan

  • Bay Watcher
    • View Profile
Re: Levers that work inversely!
« Reply #13 on: February 12, 2011, 12:45:02 pm »

There is a way to invert it, and no water required--have two bridges on raise (one can be on retract)--one bridge covers an x-y axis entrance, the other covers a z-level entrance--thus when the bridge are deployed, one entrance is covered, one revealed and the lever pull reverses this--bridge goes up, shutting down the x-y entrance, other bridge goes up, revealing z-level entrance
Logged
More ridiculous than reindeer?  Where you think you supercool and is you things the girls where I honestly like I is then why are humans on their as my people or what would you?

ZetaX

  • Bay Watcher
    • View Profile
Re: Levers that work inversely!
« Reply #14 on: February 12, 2011, 01:58:05 pm »

That's just what I suggested above, but your's restricted to one of them being Z-level. The one mentioned earlier works fine for both being x-level (or y).
Logged
Pages: [1] 2