Bay 12 Games Forum

Please login or register.

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

Author Topic: Linking stuff out of sync  (Read 1559 times)

Marsunpaistii

  • Bay Watcher
    • View Profile
Linking stuff out of sync
« on: September 10, 2010, 09:30:54 am »

How can I link doors or floodgates to levers / pressure plates out of sync. So, that I can determine when I pull the levers, that some floodgates open and some close, instead of all of them opening / closing at the same time
Logged

csebal

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #1 on: September 10, 2010, 09:45:38 am »

From what i can tell, all triggers have two states: on and off. If you link something to it, then that something will follow the trigger's state, regardless of when you linked it. Example: You link a door to a lever, then if you pull the lever (turn it on), the door will open (on state). If you pull it again (turn it off) the door will close (off state). If you link the door to an already pulled lever however, pulling it will appear to not do anything, as it will put the lever into the off state, while the door is already in that state (being closed after it was built). Pulling it again however will open the door as expected.

With that said, the thing you want to accomplish can only be done through dwarfputing. You can find some info about it on the wiki or probably also here on the forums.

Wiki link: http://df.magmawiki.com/index.php/DF2010:Computing
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Linking stuff out of sync
« Reply #2 on: September 10, 2010, 09:47:42 am »

You can't, at least not directly.  The only way I know of to do this is with water logic gates.  Have a lever linked to a floodgate that lets water flow onto a pressure plate, the pressure plate being set to trigger when water isn't on it.  Pulling the lever will open the floodgate, shutting off the pressure plate, which will then close floodgates connected to the pressure plate.  You will also need a way to let the water off the pressure plate when the control lever is shut off to open the inverted floodgates.  This method will also introduce a delay due to the activation time of the water logic inverter.
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.

epyn

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #3 on: September 10, 2010, 10:08:58 am »

Related but untested for duplication:
I have upright spike traps that alternate when the lever is pulled, because halfway through the trap line I toggled the switch to see where I was, then wired up the remainders without toggling it back to off.

I'd done this once before and they all re-synchronized eventually though.
Logged

Halykan

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #4 on: September 10, 2010, 10:22:03 am »

I could swear that it didn't used to work this way. I agree that it certainly seems to behave this way now - but as of like 40d ish I seem to recall that objects linked to the lever's current state. At least, I thought I'd arranged a situation almost exactly like the OP is describing without any special considerations.

I don't have any of those old saves anymore though, so maybe I'm just crazy.
Logged
If you don't remember whether the lever will collapse half the fortress, flood it with magma, flood it with water, flood it with water THEN magma, or kill the invaders, you pull it and hope you take the god damned goblins down with you
clicky

Gearheart

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #5 on: September 10, 2010, 10:52:58 am »

Probably easier to Just use two levers than to descend into the complex hell of dwarfputing.
Logged

Sir Finkus

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #6 on: September 10, 2010, 10:58:58 am »

Probably easier to Just use two levers than to descend into the complex hell of dwarfputing.
Wouldn't be too hard, just use water, a channel, and some pressure plates.  If you need more time, increase the length of the channel.

Shoku

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #7 on: September 10, 2010, 10:59:52 am »

If the spears have a delay then it's not that they ever stayed on different states than the lever, just that you were pulling it thirty times before they switched for the next signal.

-

And no, 40d didn't work like that.
Logged
Please get involved with my making worlds thread.

Arekis

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #8 on: September 10, 2010, 12:23:40 pm »

I just ran into this in my fort when linking levers to gear assemblies.  I tested my first link by pulling the lever and forgot to turn it off before connecting a second one.  This caused one gear to be engaged and another disengaged at all times (not the behavior I wanted).  However, I seem to recall that when I screwed up linking multiple floodgates in the same fashion, they synchronized...  Maybe it only works on gears?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Linking stuff out of sync
« Reply #9 on: September 10, 2010, 12:29:42 pm »

Gear assemblies are the exception.  Gears toggle their state every time they get an 'on' or 'off' signal from a lever or pressure plate, so you can do tricks where a single lever turns some gears on and others off.
« Last Edit: September 10, 2010, 12:32:23 pm by Sphalerite »
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.

Hyndis

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #10 on: September 10, 2010, 12:44:30 pm »

Tried this with bridges, and unfortunately you cannot do this with a single lever.

I was hoping to build alternating bridges that extend or retract with the lever, such that there is always a route into the fortress at all times, but the route switches from one bridge to the other.

Below the bridges there was of course a brief "scenic" route to a lovely heated lake... Unfortunately both bridges went back into sync even though I linked up one set of bridges, threw the lever, and linked up the other set. Didn't matter. They synced back up within seconds.
Logged

Lord Darkstar

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #11 on: September 10, 2010, 06:26:33 pm »

You need to do a gear pass or a other "dwarfputing" to have alternating bridges. Easiest to just do it with two levers and do it manually.
Logged
learn to give consolations to frustrated people
What is this, a therapy session? We don't need to console someone because they're upset about a fucking video game. Grow a beard, son, and take off those elf ears!

Hyndis

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #12 on: September 10, 2010, 06:59:16 pm »

You need to do a gear pass or a other "dwarfputing" to have alternating bridges. Easiest to just do it with two levers and do it manually.

Yes, thus my plans for an easy to use, single lever alternating bridge defense were defeated.  :(

However I've since revised my design, making it smaller, easier to use, and just as lethal. It uses a 1 tile wide walkway with 5-7 tile wide bridges over the walkway. Very wide bridges basically. The bridges retract and extend repeatedly, which knocks anyone about. If they are standing open ground, they fall. If they are lucky enough to stand on the 1 tile wide walkway they get knocked to the left or right, and then fall. As there is always a path to the fortress goblins will happily continue to run at the bridge, only to plummet to the holding tank.

Not to their doom, no.

Holding tank first.

Then doom.  :D
Logged

krenshala

  • Bay Watcher
    • View Profile
Re: Linking stuff out of sync
« Reply #13 on: September 10, 2010, 07:54:28 pm »

The dwarfputing article in the wiki wasn't really clear to me (of course, thats probably due to my inexperience with dwarven mechanisms in DF ;)) but are you saying that if you set up a single lever to a bridge and a gearbox, and hook that gearbox to a second bridge, you can have one lever alternate which bridge is open/closed?
Logged
Quote from: Haspen
Quote from: phoenixuk
Zepave Dawnhogs the Butterfly of Vales the Marsh Titan ... was taken out by a single novice axedwarf and his pet war kitten. Long Live Domas Etasastesh Adilloram, slayer of the snow butterfly!
Doesn't quite have the ring of heroics to it...
Mother: "...and after the evil snow butterfly was defeated, Domas and his kitten lived happily ever after!"
Kids: "Yaaaay!"

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Linking stuff out of sync
« Reply #14 on: September 10, 2010, 08:09:13 pm »

The dwarfputing article in the wiki wasn't really clear to me (of course, thats probably due to my inexperience with dwarven mechanisms in DF ;)) but are you saying that if you set up a single lever to a bridge and a gearbox, and hook that gearbox to a second bridge, you can have one lever alternate which bridge is open/closed?
No, because you can't hook a gearbox to a bridge.  Gears transmit rotation, they don't trigger devices.

It would be possible to set up a single lever that turned one pump on and another off with a single pull by using gears connected out of sync, but not bridges or doors or anything else not powered by rotary power.
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.
Pages: [1] 2