Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pressure plates triggering  (Read 1161 times)

Anjey aka PM

  • Bay Watcher
    • View Profile
Pressure plates triggering
« on: November 15, 2007, 02:17:00 am »

As was discussed somewhere in the forums, pressure plates does not simply change state of object when triggered but put this object in the same state as a state of pressure plate: i.e. floodgate normally closed will be opened when pressure plate is triggered and closed when it's not.

I suggest to add additional option when linking pressure plate to something which will control if object's state will be equals to pressure plate state or opposite  to it. I.e. i want to make a sluice with floodgates:

code:
 
###########
..1..^..2~~
###########
1,2 - floodgates
# - wall
. - corridor
~ - water


Water comes from the right and is under pressure. Pressure plate set to react for water levels 5-7 it linked to floodgate 1 to open it when triggered and to floodgate 2 to close it when triggered. To set system running we first open floodgate 2 with leveler.

Purpose of this system is to lover water pressure which comes from huge tank on top z-level of fortress to machine room or irrigation zone so water will not over flood everything.

There are also many interesting things which could be done with this add-on: i.e. floodgates acting as a main entrance gate closing automatically when attack comes opening hatch on top at the same time and flooding main corridor so everyone is drown.

Logged
he greatest programming project of all took six days; on the seventh day the programmer rested. We''ve been trying to debug the *&^%$#@ thing ever since. Moral: design before you implement.

Karlito

  • Bay Watcher
    • View Profile
Re: Pressure plates triggering
« Reply #1 on: November 15, 2007, 02:21:00 am »

I'm tired so I'm not exactly sure that this will work, but in the whole logic gates discussion someone pointed out that a one square draw bridge that raises is the exact opposite of a flood gate.  In that it will open when a flood gate closes or visa versa.
Logged
This sentence contains exactly threee erors.

Stof

  • Bay Watcher
    • View Profile
Re: Pressure plates triggering
« Reply #2 on: November 15, 2007, 05:45:00 am »

So, THAT was why my security antiflood mechanism didn't work (a pressure plate linked to main floodgate and was expected to close to prevent more water from entering)

This is a great idea and it should be that hard to implement. I'd like myself to have slightly more control than just inverting the state. IE, chose one of:
- do nothing on press
- toggle state on press
- open on press
- close on press
and one of:
- do nothing on release
- toggle state on release
- open on release
- close on release

Logged

Anjey aka PM

  • Bay Watcher
    • View Profile
Re: Pressure plates triggering
« Reply #3 on: November 15, 2007, 09:20:00 am »

quote:
Originally posted by Karlito:
<STRONG>I'm tired so I'm not exactly sure that this will work, but in the whole logic gates discussion someone pointed out that a one square draw bridge that raises is the exact opposite of a flood gate.  In that it will open when a flood gate closes or visa versa.</STRONG>

but don't forget about mechanisms, maybe someone wants to use pressure plates to connect machinery not disconnect
Logged
he greatest programming project of all took six days; on the seventh day the programmer rested. We''ve been trying to debug the *&^%$#@ thing ever since. Moral: design before you implement.

Abyssal Squid

  • Bay Watcher
    • View Profile
Re: Pressure plates triggering
« Reply #4 on: November 15, 2007, 09:34:00 am »

If you have an inverse floodgate (door or drawbridge), it's pretty simple to make NOT gates for pretty much anything.

code:
######
~D^F..
######

The pressure plate triggered by invaders or whatever is off somwhere else, and it closes the door and opens the floodgate, draining the pressure plate that controls the mechanism you want to connect, or whatever.

That said, a workaround is not a solution, and effect inversion should be one of the basic lever/plate options, although I'm fine with every other logical gate being something you have to construct for yourself.

Also, I think the default state of spikes connected to a switch should be retracted rather than extended, but that's just a matter of personal taste.

Logged

Anjey aka PM

  • Bay Watcher
    • View Profile
Re: Pressure plates triggering
« Reply #5 on: November 15, 2007, 09:50:00 am »

quote:
Originally posted by Stof:
I'd like myself to have slightly more control than just inverting the state. IE, chose one of:
- do nothing on press
- toggle state on press
- open on press
- close on press
and one of:
- do nothing on release
- toggle state on release
- open on release
- close on release[/QB]


vote for this! this is truly a nice thing

Also this should be set up not per pressure plate but per each linkage separately IMHO.

Logged
he greatest programming project of all took six days; on the seventh day the programmer rested. We''ve been trying to debug the *&^%$#@ thing ever since. Moral: design before you implement.