Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Squirt Gun design : Trigger and response delays  (Read 488 times)

blue emu

  • Bay Watcher
  • GroFAZ
    • View Profile
Squirt Gun design : Trigger and response delays
« on: June 07, 2013, 07:04:02 pm »

Is there any delay when a pressure plate is used to open or close a Floor Hatch?

I am trying to modify the Squirt Gun design to prevent jams from occurring when two carts pass through the contraption so close together that the second one rams the first one from behind, before it can drop into the channel and clear the path.

I hope to place a pressure plate just in front of the hatch leading up from the auto-loader, which will close the hatch as soon as a cart passes through it. A second pressure plate can be placed several tiles further on, to re-open the hatch for the next cart.

Will this idea work?
Logged
Never pet a burning dog.

Oaktree

  • Bay Watcher
    • View Profile
Re: Squirt Gun design : Trigger and response delays
« Reply #1 on: June 07, 2013, 11:27:46 pm »

Should open it immediately.  And closes again 99 or 100 ticks later depending on construction order.  Same with doors.  I think bridges are the only device that has an activation delay when triggered by a pad or lever.
Logged
Armorer McUrist cancels forge steel mailshirt, interrupted by minecart

Till

  • Escaped Lunatic
    • View Profile
Re: Squirt Gun design : Trigger and response delays
« Reply #2 on: June 08, 2013, 12:01:13 am »

floodgates have a delay too.
Logged

vanatteveldt

  • Bay Watcher
    • View Profile
Re: Squirt Gun design : Trigger and response delays
« Reply #3 on: June 08, 2013, 02:00:37 am »

I guess you can create a delay by having the pressure plate open a bridge which allows water to active a second plate that closes the bridge and does what you needed?
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Squirt Gun design : Trigger and response delays
« Reply #4 on: June 08, 2013, 06:52:07 am »

I guess you can create a delay by having the pressure plate open a bridge which allows water to active a second plate that closes the bridge and does what you needed?

Nah, it does not work like that: You cannot use a secondary plate to give a CLOSE signal, it will just issue another ON, to which the bridge won't respond as it's already OPEN. At best nothing happens, at worst you'll mess up the whole system with conflicting signals. And you'd need high pressure water to get fast response time. And bridges are sloooooow. Minecarts are much faster for this purpose.
The only exception to this ON/OFF behavior is the gear, which will SWITCH on any incoming signal. So you can build a roller that switches on from a signal from a pressure plate, and off from another. BUT it will switch again 100 ticks later when the plates reset...

What may be possible is to use a plate that opens a 'delaying loop' after the first car passed. Something like this.

Code: [Select]
WWWWWWWWW
WWWWWTTTW
WWWWWTWDW
WWWWWTPTW
WWWWWTWDW
RRRRRTPTW
WWWWWWWTW

W=wall T=track R=/roller/imp.ramp D=door, P=pressure plate

Minecarts enter from the bottom right, and accelerate to the left. When the first car triggers the first pressure plate it opens the first door  so the second car takes the loop before following. I added a second loop on top, so this is good for delaying 3 minecarts actually. Sorry, can't color code the parts. :( Also, this design needs 100 ticks to reset (pressure plate default), meaning that if the first cart makes it back to the start any faster then the door won't close, so you'll mess up the timing. You could experiment with the length of the loops to fine-tune it. 

But it's much easier to achieve proper timing with the dropping/stacking method: you drop your carts from z+2 high into a chute with a roller at the bottom. The minecarts will be stacked on top each other, and drop down one by one 8 ticks apart as long as the roller is running, which has been tested to be enough to stop jams. AFAIK that's the easiset/fastest method of filling waterguns with minecarts.
« Last Edit: June 08, 2013, 09:24:35 am by fricy »
Logged