Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: building a clock-like display  (Read 730 times)

timesavatar

  • Bay Watcher
    • View Profile
building a clock-like display
« on: May 20, 2011, 06:39:26 am »

Is there any way to activate a pressure plate to light a up clock-like display and to make it stick and then have it so that hitting another pressure plate will clear that number, and activate the next number, something like this:

the display would start at 00, plate A sends A1 to the display, (and that stays somehow, with a lever activated or something), then plate B is activated, plate B sends a signal to clear A1 to 00, and then turn it to A2

So my problem is how to get a set of hatch covers to open and stay open after stepping on a pressure plate, and how to get the next pressure plate to clear and activate a new value on the display. At present I can only see it being possible with two plates in succession; one to clear the value, and the other the activate the next value. This also needs to be done in a fashion where any plate is interchangeable, where the above example is the same except where plate C would still clear A1 but instead activate A3.
Logged
Sin is a joke compared to Lavos. Sin just flopped around and blew a couple of towns. Lavos exterminated the entire face of the earth and tore apart the fabric of space and time by simply existing.
DvDangerous@youtube

imperium3

  • Bay Watcher
    • View Profile
Re: building a clock-like display
« Reply #1 on: May 20, 2011, 07:12:31 am »

I think you can do it but it would require a larger "library" of pressure plates (this would work best if the numbers can only change in a linear fashion ie always 1 -> 2 -> 3 -> 4 etc).

What you could do is have a pressure plate to change 0 to 1, 1 to 2, 2 to 3 etc directly. So you know exactly which number you are changing from/to each time, and thus exactly which hatches need to open or close. That may be fine for a clock but if you want a non-linear application then you would obviously need far more plates...

The other problem I just thought of though, is that don't pressure plates reset after a short time? So if you used a pressure plate to open a hatch, after a while the hatch would close of its own accord and mess with your display.

I suggest testing it on a 2x2 or 3x3 array of hatches, to figure out what works and what doesn't, before applying on a large scale.
Logged
Socks inspire the same sort of emotions in dwarfs that Helen of Troy inspired in the Achaean Greeks. Although it is said that Helen's face launched a thousand ships, socks have surely launched a million ultimately-fatal Store Owned Item tasks.

KojaK

  • Bay Watcher
  • KojaK cancels job: interrupted by Dwarf Fortress
    • View Profile
Re: building a clock-like display
« Reply #2 on: May 20, 2011, 07:25:48 am »

or you can use water logic. Use hatch covers that open and close, like you were suggesting, instead of pressure plates. Then have those hatch covers connected to pressure plates in 1x1 rooms. When you want to activate that plate, flood the room with water. When you want to deactivate, drain the room.

http://df.magmawiki.com/index.php/DF2010:Fluid_logic
Logged
Quote from: Airpi
A normal ballista does damage by piercing with overlarge arrows, a dwarven ballista does damage by crushing with entire trees.

They will run, naked, into the caverns and roll around in whatever nearby filth is available.  Watch for gory explosions.

timesavatar

  • Bay Watcher
    • View Profile
Re: building a clock-like display
« Reply #3 on: May 20, 2011, 08:55:45 am »

That may be fine for a clock but if you want a non-linear application then you would obviously need far more plates...

Yeah, that's what I'm going for, the display will be for a trap cube so that while the victim is running you can know what room they're in at any given time. The idea being to have the plate in front of the door so that as they walk in to the room, that rooms' number shows up on screen(and stays somehow, I am still trying to figure out how to do that, if anyone knows a way to do it, please don't be shy about it) and then when they leave and enter the next room the plate in room 2 will clear the screen, and then pop up the next number. The thing is though, I want to try to randomize what rooms they will go through so that it's not a set path they take, and that every room will be able to clear the current screen and show it's own room number (on one plate preferably).


EDIT - I've been thinking about this a bit more, and I thought of trying to get it so that each plate in the rooms would drop water on another plate, where the water would stay until stepping on the second switch in the room while exiting, which would then release the water. I was thinking of having 2 flood gates holding the water on the water plate, with the gate next to it being opened while 3+ water is on the water plate, and the second gate activating everytime they step on a plate in the rooms. If anyone can say right now that this isn't going to work please do so since I have to wait until tomorrow to test it.
« Last Edit: May 20, 2011, 10:39:58 am by timesavatar »
Logged
Sin is a joke compared to Lavos. Sin just flopped around and blew a couple of towns. Lavos exterminated the entire face of the earth and tore apart the fabric of space and time by simply existing.
DvDangerous@youtube

imperium3

  • Bay Watcher
    • View Profile
Re: building a clock-like display
« Reply #4 on: May 20, 2011, 10:49:01 am »

Ah right. So the prisoner goes through several rooms and they always show the ordering that he's following? So if he goes through roomes a->b->c, he sees 1->2->3 and if a->c->b then he still sees 1->2->3? Hmmm...

It might be doable if you connected each room pressure-plate to some kind of accumulator that tracks how many rooms he's entered. I'm not sure what would be best for that, perhaps water logic[1] Then (perhaps this could be a second pressure plate that must be crossed to enter the room, just for simplicity of design) the plate must "inform" the central system which room the prisoner is entering. This could be done using fluid logic. Once your logic system is provided with the information of where the prisoner is and which number it should show, it can display the right number.
The actual design of the logic unit is beyond my drawing skillz and patience, I think, but it would probably need to be fairly complex. It's eminently doable, I'm just not entirely sure how...


[1] The first idea I thought of here is a pump pouring water down a 1x2 shaft. Along the shaft are pressure plates to track how high the water level is. Each time the prisoner enters a room the pump is briefly switched on via a gear assembly (you may need a separate device to turn the pump off again fairly soon). Don't know if this will work, but it's an idea I had.
Logged
Socks inspire the same sort of emotions in dwarfs that Helen of Troy inspired in the Achaean Greeks. Although it is said that Helen's face launched a thousand ships, socks have surely launched a million ultimately-fatal Store Owned Item tasks.