Docs / Reference / Content formats
Traffic paths of objects ([path] / [path_2] in .sco)
12 lines (path_2: 14): start x, y, z in the object frame (x right, y forward, z up),
heading (degrees, clockwise, relative to the object), radius (0 straight, > 0 right turn),
length, gradient at the start and at the end (rise per metre: the height runs as their
integral along the path - checked on the stock objects, where 50 of 53 linked paths meet
the next one's start height that way, #1617), kind (0 street, 1 sidewalk, 2 rail), width, direction (0/1/2 as
above), turn indicator (0 none, 2 left, 3 right; used for the AI blinkers);
path_2 adds two
zero fields. Verified on Einm_Spandauer_Koelner_1990.sco: the arc (1.5,-7.75) h0 r6.248 l4.635 ends exactly at the start of the next path (3.142,-3.529) h42.5.
[use_traffic_light] n after a path binds it (the preceding path) to [traffic_light]
index n; [traffic_light] name + [phase] state seconds (0 red, 3 red+yellow, 6 green,
8 yellow, 9 all-red; the last 0 0 phase = red until the [traffic_lights_group] cycle
restarts).
[trafficlight] lamp objects are placed with map flag 1, the extra line = light
index, and [varparent] id = the crossing; their [visible] red|yellow|green 1 meshes follow.
[traffic_light_stop] light time ifAnf and [traffic_light_jump] light time ifAnf target
are points on that cycle clock. ifAnf 1 makes the condition "nobody is asking at light",
0 "somebody is asking".
A stop normally holds the clock just before its time, so the phase that ends there stays shown; if the clock is already at the stop (within 1e-6 s either side) it holds there.
A stop never holds in a red-and-yellow changeover: if the instant just before the stop is red-and-yellow, the clock holds at the stop's own time; a stop whose own time is red-and-yellow is passed. A jump whose condition holds at the same cycle time as a stop is taken first, and the stop is left behind.
Something wrong or missing? Fix it on GitHub or open an issue.