Tail-lights container
From TrainzOnline
TS 12 SP1 finally has introduced a native function to use Taillights without needing a custom script.
As before (for script variants), the coronas have to be defined inside the effects container in the mesh-table.
To make those coronas work as tail-lights, a new container type named "tail-lights" has been introduced. This container has one child element per tail-light, in each child the matching effect name is referenced and the location of the tail-light is defined.
This function shows the backside-coronas of the last traincar in a train, if the last car is not equipped with taillights, no coronas are displayed.
Example
mesh-table {
default { mesh "traincar.im" auto-create 1 effects { frontred0 { kind "corona" att "a.frontred0" directional 1 object-size 0.2 texture-kuid <kuid:-3:10112> max-distance 1000 } frontred1 { kind "corona" att "a.frontred1" directional 1 object-size 0.2 texture-kuid <kuid:-3:10112> max-distance 1000 } frontwhite0 { kind "corona" att "a.frontwhite0" directional 1 object-size 0.25 texture-kuid <kuid:-3:10111> max-distance 1000 max-intensity 1.2 } frontwhite1 { kind "corona" att "a.frontwhite1" directional 1 object-size 0.25 texture-kuid <kuid:-3:10111> max-distance 1000 max-intensity 1.2 } frontwhite2 { kind "corona" att "a.frontwhite2" directional 1 object-size 0.25 texture-kuid <kuid:-3:10111> max-distance 1000 max-intensity 1.2 } backred0 { kind "corona" att "a.backred0" directional 1 object-size 0.2 texture-kuid <kuid:-3:10112> max-distance 1000 } backred1 { kind "corona" att "a.backred1" directional 1 object-size 0.2 texture-kuid <kuid:-3:10112> max-distance 1000 } backwhite0 { kind "corona" att "a.backwhite0" directional 1 object-size 0.25 texture-kuid <kuid:-3:10111> max-distance 1000 max-intensity 1.2 } backwhite1 { kind "corona" att "a.backwhite1" directional 1 object-size 0.25 texture-kuid <kuid:-3:10111> max-distance 1000 max-intensity 1.2 } backwhite2 { kind "corona" att "a.backwhite2" directional 1 object-size 0.25 texture-kuid <kuid:-3:10111> max-distance 1000 max-intensity 1.2 } }
}
tail-lights
{ front0 { effect "frontred0" light-is-on-front-end 1 } front1 { effect "frontred1" light-is-on-front-end 1 } back0 { effect "backred0" light-is-on-front-end 0 } back1 { effect "backred1" light-is-on-front-end 0
} }