I have a train that has the following route:
1. Steel Pickup
[Wait until 5s of Inactivity]
2. Stick Pickup
[Wait until 5s of Inactivity]
3. Waiting Cell
[this is what I'm trying to figure out]
4. Steel and Sticks Dropoff
[Wait until Empty]
This train picks up sticks and steel for the production of rails, I have a circuit connected to the station that closes the station when rail storage becomes full. I want the train to detect when the station opens so it can leave the waiting cell to deliver the now needed materials.
Detect if Train Stop Open
Re: Detect if Train Stop Open
You need to alter the 4rth station so that instead of open close, you set the limit from 1 to 0.
1 sec inactivity on the 3rd station should be good then.
This works if you only have 1 station called "stick and steel dropoff".
The train will see it with limit : 0 and will wait at the previous station (the waiting one) until the limit is not 0 anymore.
Then when empty, the train will go pick up steel
then stick
then go wait 1 sec, but will see "0 limit" for the next station on schedule, so it will wait.
I assume you have set filer on wagon.
1 sec inactivity on the 3rd station should be good then.
This works if you only have 1 station called "stick and steel dropoff".
The train will see it with limit : 0 and will wait at the previous station (the waiting one) until the limit is not 0 anymore.
Then when empty, the train will go pick up steel
then stick
then go wait 1 sec, but will see "0 limit" for the next station on schedule, so it will wait.
I assume you have set filer on wagon.
Re: Detect if Train Stop Open
Thank you so much, it workedmmmPI wrote: Wed Oct 12, 2022 6:48 pm You need to alter the 4rth station so that instead of open close, you set the limit from 1 to 0.
1 sec inactivity on the 3rd station should be good then.
This works if you only have 1 station called "stick and steel dropoff".
The train will see it with limit : 0 and will wait at the previous station (the waiting one) until the limit is not 0 anymore.
Then when empty, the train will go pick up steel
then stick
then go wait 1 sec, but will see "0 limit" for the next station on schedule, so it will wait.
I assume you have set filer on wagon.
Re: Detect if Train Stop Open
glad it worked for your purpose
Another way to do would be to have the train in the waiting area waiting for a signal condition to depart for the dropoff. And then use a wire to transmit something like 1 green signal to trigger the train leave condition when things are missing in the dropoff. That require the dropoff and the waiting area to be connected via a potentially long wire but it could allow to "call" different train based on different missing things is you send different signals, like 1 green if you miss steel to make the steel train stop waiting and delivers instead, and 1 red if you need stick to make the stick train stop waiting
