Script SC90 Train unspawn

If you liked this item, please rate it up on Steam Workshop page.

Author: adlet

Last revision: 26 Feb at 16:18 UTC

File size: 2.29 MB

On Steam Workshop

Description:

A powerful script that triggers train intervention (unspawn) to occur on or after train ends its line stop.

Two modes:

Set time mode:

• Unspawn at a fixed time of day, on all or stated days of the week. Use case:

° removing stuck off-shift train at a set time (eg in depot)

Departure mode:

• Unspawn X seconds after scheduled departure.
• For late trains: unspawn upon actual departure if later than scheduled.

• Use cases:

° simulated hitching (train reconfiguration) (with additional script)
° depot-less operation
° removing stuck off-shift train after a period (eg at line terminus)

IMPORTANT: Train only unspawned if still on the same track, except in Departure Mode, if delay is set to 0. (On terminal stations, if the train flips on departure, set the delay to 0).

Setup notes:

• Attach to a Line::Stop in the line editor.
• Check box to remove train at set time (otherwise after stop end time).
• Train will be removed only if still at this track (in either mode).
• Any passengers on board will be thrown off the train.

Depot-less operation:

• Use together with script SC93 Station spawn allow.
• Create a schedule with shifts with desired departure times.
• Designate stations where spawn is allowed (terminals only).
• Set up a schedule with shifts with desired departure times.
• Provide last station to trigger unspawn using this script.
• Trains will automatically spawn at terminal for the next departure.

Removing stuck off-shift trains at set time:

• Add script to the station (eg depot), set time when train should be out.
• If still at this track at that time, it will be intervened.

Removing stuck off-shift trains after a period:

• Add script to the station (eg terminus), set delay.
• If still at this track at that time, it will be intervened.
• No track check when delay is 0.