751
DF Gameplay Questions / Re: Pressure Plate Behavior?
« on: January 24, 2017, 10:35:05 pm »
If I understand correct, I think that means:
1. the mine cart stops on the pressure plate and is heavy enough (probably worth checking). An open signal is sent to the bridge.
2. 100 tics later the bridge closes (assuming is is hooked up correctly -- also worth checking).
3. After the cart stops on the pressure plate it waits for X tics. Someone pushes it. It leaves the pressure plate Y tics later. It arrives at the bridge Z tics later.
4. As long as X + Y + Z > 100 tics, the bridge should be closed and the cart can cross it
5. As in #3, the cart leaves the pressure plate in X + Y tics. As long as the pressure plate is empty (and no other cart arrives!!! also worth checking), 99 tics later the signal is sent to close the bridge.
6. If a cart arrives within 99 tics of the previous one leaving, no signal will be sent to close the bridge and no second signal will be sent to open the bridge (which seems like the desired behaviour to me).
7. The bridge will close 100 tics after receiving the closing signal (X + Y + 99 + 100 if you are counting).
8. If Z (the time it takes the cart to arrive at the bridge) > 199, the cart will fall in the hole, because the bridge is closed again. Keeping #4 in mind, imagine that someone happens to be around to push the cart and pushes it 10 tics after it arrives. Let's say it only takes 1 tic to leave the pressure plate, that means that X+Y = 11. So Z (the time it takes to arrive at -- well cross really -- the bridge) must be between 98 and 199 ticks. Too early and the bridge won't have closed. Too late and the bridge will open again. So you have to measure precisely. Oddly, the longer it takes someone to push the cart, the more leeway you have, but you can never exceed 199 ticks to cross the bridge.
9. If a second cart arrives more than 99 tics after the first cart leaves, then a new close signal will be send to the bridge. However, if the bridge is currently opening (within the 100 tics of the open signal being sent), then the close signal will be ignored by the bridge. For example, let's say that a second cart arrives at X + Y + 99 + 10 tics. The pressure plate will send a close signal to the bridge, but the bridge is occupied for the next 90 tics and it will never arrive. If someone pushes *this* cart, it will fall in the hole. This means that new cars must either arrive within 99 tics of the previous one having left, OR more than 100 tics after the previous one left.
I *think* that's all the edge cases, but I might have missed some. Looks like you can do it, but it will be slightly tricky to avoid problems.
1. the mine cart stops on the pressure plate and is heavy enough (probably worth checking). An open signal is sent to the bridge.
2. 100 tics later the bridge closes (assuming is is hooked up correctly -- also worth checking).
3. After the cart stops on the pressure plate it waits for X tics. Someone pushes it. It leaves the pressure plate Y tics later. It arrives at the bridge Z tics later.
4. As long as X + Y + Z > 100 tics, the bridge should be closed and the cart can cross it
5. As in #3, the cart leaves the pressure plate in X + Y tics. As long as the pressure plate is empty (and no other cart arrives!!! also worth checking), 99 tics later the signal is sent to close the bridge.
6. If a cart arrives within 99 tics of the previous one leaving, no signal will be sent to close the bridge and no second signal will be sent to open the bridge (which seems like the desired behaviour to me).
7. The bridge will close 100 tics after receiving the closing signal (X + Y + 99 + 100 if you are counting).
8. If Z (the time it takes the cart to arrive at the bridge) > 199, the cart will fall in the hole, because the bridge is closed again. Keeping #4 in mind, imagine that someone happens to be around to push the cart and pushes it 10 tics after it arrives. Let's say it only takes 1 tic to leave the pressure plate, that means that X+Y = 11. So Z (the time it takes to arrive at -- well cross really -- the bridge) must be between 98 and 199 ticks. Too early and the bridge won't have closed. Too late and the bridge will open again. So you have to measure precisely. Oddly, the longer it takes someone to push the cart, the more leeway you have, but you can never exceed 199 ticks to cross the bridge.
9. If a second cart arrives more than 99 tics after the first cart leaves, then a new close signal will be send to the bridge. However, if the bridge is currently opening (within the 100 tics of the open signal being sent), then the close signal will be ignored by the bridge. For example, let's say that a second cart arrives at X + Y + 99 + 10 tics. The pressure plate will send a close signal to the bridge, but the bridge is occupied for the next 90 tics and it will never arrive. If someone pushes *this* cart, it will fall in the hole. This means that new cars must either arrive within 99 tics of the previous one having left, OR more than 100 tics after the previous one left.
I *think* that's all the edge cases, but I might have missed some. Looks like you can do it, but it will be slightly tricky to avoid problems.