Tail-lights container
From TrainzOnline
(Difference between revisions)
(→Example) |
(→Example) |
||
| Line 37: | Line 37: | ||
} | } | ||
| − | + | backred0 | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
{ | { | ||
kind "corona" | kind "corona" | ||
| Line 88: | Line 55: | ||
texture-kuid <kuid:-3:10112> | texture-kuid <kuid:-3:10112> | ||
max-distance 1000 | max-distance 1000 | ||
| − | } | + | } |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
} | } | ||
} | } | ||
Revision as of 23:30, 13 July 2016
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
}
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
}
}
}
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
}
}