Script SC60 Timed intersection (by adlet)

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

Author: adlet

Last revision: 1 May at 05:51 UTC

File size: 2.33 MB

On Steam Workshop

Description:

Time-based and on-demand city intersection streetlights.

Two versions of the sample test track (old 4-phase and new 6-phase) included in the distribution.

Key features:

• Supports up to six signal phases. Break between phases is 3 seconds minimum.
• During transition, signals are red if transition from red phase, and yellow otherwise.
• Each direction can be allowed in one or multiple phases.
• Turn directions may be configured to open together with direction straight or separately (use line tags).
• Optional phases: use negative duration (e.g., -20s) to skip phase if no trains approaching (at lookahead distance) or waiting.
• On-demand/Night mode (optional): system sleeps on phase 1, wakes on lookahead from other directions. Night mode can be used 24×7 to create an on-demand system. If phase 1 has no signals, it becomes all-red, turning green to approaching train(s).
• The system automatically turns on upon passing of the first tram, and turns off again if still in the night mode.
• The script can be used not only for tram to tram intersections but also to implement intersections with car-only roads.

Setup notes:

• The script requires two types of elements:
• Traffic Light Controller 6-phase – place anywhere (can be off track), connect phases to signals.
Each signal can be in multiple phases.
Configure phase durations (positive = required, negative = optional), transition duration. Phase 1 cannot be optional.
Configure day operation times and lookahead distance (used for optional phases and night mode).

• Traffic Light – attach to each signal. Configure phase tags and texture states.
Only active phases need to be configured. Texture 1 (red) is used for any other phases. Select the permitted direction tag in the signal.
IMPORTANT. Place a balise after each signal. Otherwise only one tram will be able to pass at a time.
IMPORTANT. Because of the path signal/balise combination, the system cannot function without scripts (collisions could occur).

Ceding left (right) turn:
• Place an additional unscripted signal on the turn track close to intersection with main track.
• Alternatively, can add script 01 to the yielding turn signal
• Minimize distance between main direction signal and balise.

If you experience collisions, please let me know.

This script is likely to evolve over time to add features.