Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Automated traps, and multiple triggers.  (Read 403 times)

billw

  • Bay Watcher
    • View Profile
Automated traps, and multiple triggers.
« on: July 07, 2010, 07:42:48 am »

So I am planning my first elaborate automatic trap (I have heard it whispered that this kind of thing is possible, and as a programmer it is my kind of fun): Its going to be an automatically flooding corridor with auto reset. The steps of its activation seem pretty simple:
  • first a pressure plate closes off the corridor and starts a flood timer,
  • the flood timer floods the corridor and resets itself,
  • another pressure plate in the corridor triggers once enough water is on it starting an empty timer,
  • the empty timer closes the inflow, opens the outflow (empties the corridor), starts the open timer and resets itself
  • the open timer opens up the corridor again for use

This stuff requires certain behaviour from pressure plates and levers, which I can't find info about in the wiki: do pressure plates trigger both close and open? i.e. the first time they are triggered they will open a door, the next time they will close it again. OR do they always set their target to the same state? i.e. every time they are triggered they will open a door, if its already open they do nothing. Is there some way to reverse (not gate..) the operation of trigger plates, so that when they are activated they will close a door? How can I achieve this kind of behaviour?
If (as I suspect) trigger plates will just set their target to a single state, how is it possible to make auto resetting traps? Or is it not?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Automated traps, and multiple triggers.
« Reply #1 on: July 07, 2010, 07:52:42 am »

Pressure plates send an 'open' command when something steps on them, and a 'close' command when something steps off of them.  If a pressure plate sends an 'open' command to a door/floodgate/floor hatch that is already opened, nothing happens.  The only exception to this is gear mechanisms, which toggle their engaged/disengaged state on every trigger from a lever or pressure plate.

In order to build a timed sequenced mechanism like you device, you will need to build logic gates and timers using water logic.  For example, you have the first pressure plate open a door that lets water into a sealed chamber.  That chamber contains both a pressure plate set to trigger when the chamber has water in it, and a pressure plate set to trigger when the chamber doesn't have water in it.  The pressure plate set to trigger when water is not present is linked to the doors in and out of the drowning chamber, and will close the doors and hold them closed when the trap is active.  The pressure plate set to trigger when water is present opens the floodgates to let water into the drowning chamber.

When the drowning chamber fills up with water, it activates a pressure plate that starts the timer.  The timer can consist of a long corridor that water is let into from one end, with a pressure plate at the other end.  When the water reached the other end of the corridor, it will open a door to your sealed chamber described above that will close the floodgates letting water into your drowning trap and open the doors to the drowning trap, letting the water out of it in the process.  You will also need to have a mechanism that drains water out of the timer to let the system reset completely.
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.

billw

  • Bay Watcher
    • View Profile
Re: Automated traps, and multiple triggers.
« Reply #2 on: July 07, 2010, 08:17:33 am »

Oh cool, so what I want to do is possible, it will just take a bit more fiddling. Thanks for the tips, looking forward to getting out of work to try this stuff out. Only problem is I need something to try it on!
Logged