Tail-lights container
(Reformatted Config txt example and added missing curly brace. Before it was unclear in the code if 'tail-lights' was a peer of 'mesh-table' or a sub-container.) |
(→Example) |
||
Line 29: | Line 29: | ||
This example shows the mesh-table container and tail-light container for a traincar that has two tail lights at each end. | This example shows the mesh-table container and tail-light container for a traincar that has two tail lights at each end. | ||
− | mesh-table | + | 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 | + | 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 | |
− | + | } | |
− | } | + | } |
Latest revision as of 10:11, 24 April 2020
The tail-lights container is a list of tail-light subcontainers and is used by KIND Traincar assets. It determines which of the corona effects for the traincar mesh are to be considered tail lights.
Tail lights are lit for the trailing end of a train vehicle that is the last vehicle in a consist. Tail lights that are not at the trailing end are not lit. If the traincar is not part of a consist then the lights are not lit.
The container is made up of a number of tail light subcontainers which include the effect name and a Boolean value indicating whether the effect is to be treated as a front-end light or a rear-end light. A rear-end tail light is lit when the rear end of the traincar is the trailing end of the consist. A front-end tail light is lit when the front of the traincar is at the trailing end of the consist (ie, the traincar is reversed within the consist).
Each effect listed in the container must be defined as a Corona Effect in the mesh table, with the appropriate tags for the corona KUID, size, etc. The tail-lights container has one tail-light subcontainer for each tail-light. The label used for each subcontainer is arbitrary, but must be unique. The container does not support any tags.
This container replaces a task that required a script in earlier versions of Trainz. If converting an asset from a version that uses a script, note that the effect used for the light is likely a texture replacement effect - this needs to be changed in the mesh table to a corona effect.
Contents |
[edit] tail-light subcontainer
[edit] effect
- Type: String
- Compulsory: Yes
- Default: Nothing
- Desc: The name of the effect in the mesh-table that is to be used as this tail light.
[edit] light-is-on-front-end
- Type: Boolean
- Compulsory: No
- Default: 0 (False)
- Desc: Identifies this tail light as being a front light(True) or a rear light(False) of the traincar. This setting controls which lights are lit based on the traincar facing within the consist. Note that this is not the physical location of the light, although typically front lights would be at the front of the traincar and rear lights wold be at the rear.
[edit] Example
This example shows the mesh-table container and tail-light container for a traincar that has two tail lights at each end.
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 } }