<%@LANGUAGE="JAVASCRIPT"%> MSTS Bin - main
Help+

Lights switching
How set-up lights for new MSTS Bin features?
At first you have to define what lights you want and how they should be operated. You can use some new features for decreasing lights quantity.
Draw all lights what you want.


Yellow bordered are lights for rear cab and reversed direction of way.

Lights operation
Lights in MSTS are operated with 3-state trigger. It has 3 function, 1- off, 2 - dim lights, 3 - full lights (or bright). Trigger independent is 0-state. In Lights definition it is first condition "Headlight ()"

In MSTSBin you can use next add-in Headlight states "dim+bright". For this condition are lights on for both position of trigger, dim and bright. With this feature you can save some lights definitions.

Dim lights
For primary cab define wanted lights.
 
Define dim lights what should be on for first position of trigger - "dim".
Lights 1, 3, 5, 7, 11, 12 are "Type (0)" , it means sumulated light, light 9 is cone light for dim lights. It has shorter radius and angle could be narrowed.
Lights 11 a 12 should be on only for "dim" position of trigger and we'll use condition Headlight (2)
Lights 1, 3, 5 a 7 should be on for both positions "dim" and "bright", you can use condition MSTSBin specific Headlight (4)

Bright lights
Add lights for "bright" position of trigger
We define lights 11 a 12 because they are more bright. Simultaneously we define cone light 10 for bright lights with higher radius and angle. Next lights 6, 8 are red lights on tailing of loco. All this lights should be on for "bright" trigger position, we use condition Headlight (3)

And now we add conditions for loco placing in consist. This condition turn off lights if in front or behind loco are some cars.
For lights 1, 3, 9, 10, 11, 12, 13 and 14 we'll use condition "Unit (2)" - lights are on if loco is front of consist
For lights 6 and 8 we'll use condition "Unit (3)" - lights are on only if loco is rear car of consist.


Lights for rear cab (reversed direction of way)
Yellow bordered lights are lights for reversed direction. You can copy lights for normal way and move them to right positions. Because position of driver is changed we heve to tell MSTS that direction consist is drived to other way. For this we'll use new conditions Unit (4) and Unit (5). Unit (4) tell than loco is still in front of train but direction is reversed. It is the same as Unit (2) for front cab. Unit (5) mean, that loco is last in consist but direction is reversed. It is matching Unit (3) for front cab.
Recapitulation
Lights 15, 16, 17, 18 on back and lights 2 and 4 on front of loco.
Lights 17, 18, 2 and 4 "bright" with condition "Headlight (3)", lights 15 and 16 "dim" with condition "Headlight (2)".
Lights 15, 16, 17, 18 condition "Unit (5)"
Lights 2 and 4 condition "Unit (4)"

Lights table
For better orientation and controll you can design table of lights. You can add more parameters like position color, etc.

Lights definitions aren't dogma. It is only specimen how to ...
With table you can prevent any error.

For rear cab isn't needed define light cone lights, these are flipped automaticaly with cab switching.