Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Levers + bridges & doors  (Read 1458 times)

D.L.

  • Bay Watcher
    • View Profile
Levers + bridges & doors
« on: April 21, 2011, 03:06:57 pm »

My question is about toggling states.

Say I have two brand new levers, A & B, in the left pointing state, hooked up to the same bridge (or door). If I toggle lever A, I raise the bridge. What happens now if I toggle lever B? Does the bridge lower? It seems from reading the wiki that only gear assemblies toggle reliably.
Logged

Masennus

  • Bay Watcher
    • View Profile
Re: Levers + bridges & doors
« Reply #1 on: April 21, 2011, 03:28:51 pm »

I recommend you do some !SCIENCE! Since this isn't terribly difficult to set up, and isn't going to permanently scar your fortress if it doesn't work the way you want, there is very little reason not to just set it up and find out what happens.

You have a question.
You have a hypothesis.
Set it up.
Watch what happens.
Write down what happens.
Tell everybody else what happens.

Scientific Method.
Logged
i mean, what kind of military gives people weapons straight off and tells them to go hit each other with them, with no proper training.
The same guys that think its a good idea to make magmafalls.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Levers + bridges & doors
« Reply #2 on: April 21, 2011, 03:31:12 pm »

Say I have two brand new levers, A & B, in the left pointing state, hooked up to the same bridge (or door). If I toggle lever A, I raise the bridge. What happens now if I toggle lever B? Does the bridge lower? It seems from reading the wiki that only gear assemblies toggle reliably.

Bridges and doors don't toggle.  Bridges and doors obey the last signal sent to them.  If lever A is in the OFF position and you pull it, it will raise the bridge.  If lever B is also in the OFF position and you pull it, nothing will happen as the bridge is already in the raised position.
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.

D.L.

  • Bay Watcher
    • View Profile
Re: Levers + bridges & doors
« Reply #3 on: April 21, 2011, 03:35:58 pm »

Thanks. I actually had set up a system and was testing it, but was having difficulty working out the logic, as my fort is currently experiencing FPS death and I couldn't tell if I was just being impatient. Last signal sent - it probably would have taken me a while to figure that out.
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Levers + bridges & doors
« Reply #4 on: April 21, 2011, 03:38:55 pm »

Actually, to be completely clear it's slightly more complex than last signal sent.  Bridges have a 100 tick delay time between getting a signal and then raising or lowering.  Any signals which arrive during that delay time are completely ignored, so if you send a bridge a 'raise' signal and then send it a 'lower' signal 50 ticks later, the bridge will raise and then not lower.  This usually isn't a problem when you're controlling the bridge with something like a pressure plate, since pressure plates have a 100 tick minimum on-time anyway, but can be an issue if you're trying to do something tricky with multiple signals controlling the same target.
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.

Uristocrat

  • Bay Watcher
  • Dwarven Railgunner
    • View Profile
    • DF Wiki User Page
Re: Levers + bridges & doors
« Reply #5 on: April 21, 2011, 03:41:14 pm »

My question is about toggling states.

Say I have two brand new levers, A & B, in the left pointing state, hooked up to the same bridge (or door). If I toggle lever A, I raise the bridge. What happens now if I toggle lever B? Does the bridge lower? It seems from reading the wiki that only gear assemblies toggle reliably.

Yes, only gear assemblies toggle.  Everything else turns on when it gets an on signal and off when it gets an off signal, meaning that you sometimes have to flip a lever twice to get it in synch.

If you want a lever that will toggle a bridge or something, you should be using a rather complex system that Quietust helped me invent.  I even called it the Toggle System.

It's basically an S/R latch with a nice reset lever.  Be careful not to let your water freeze!
Logged
You could have berries on the rocks and the dwarves would say it was "berry gneiss."
You should die horribly for this. And I mean that in the nicest possible way.

wuphonsreach

  • Bay Watcher
    • View Profile
Re: Levers + bridges & doors
« Reply #6 on: April 21, 2011, 04:33:30 pm »

*has a TTL flashback*

Ah, the joys of line-level logic gates...
Logged