"Attached-track" container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Attached-track container moved to "Attached-track" container)
 
m (Link to vertices container)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Auto-generated spline track. Generated through attachment points located within the default mesh. Attached-tracks update automatically to the spline track connected to it in Surveyor. You may over-ride this auto-update feature by adding useadjoiningtracktype 0 (see below).
+
The '''Attached-track container''' is used by [[KIND SceneryWithTrack]] to identify a list of track subcontainers. Each track derives its name from the subcontainer's tag name. These names are used from script.
 +
Each track is auto-generated spline track through attachment points located within the default mesh.
 +
 
 +
* Attached-tracks update automatically to the spline track connected to it in Surveyor. You may over-ride this auto-update feature by adding useadjoiningtracktype 0 (see below).
 +
* Correct track end attachment orientation is essential. The Y axis must point ‘out’ at the correct angle. The Z axis must point ‘up’.
 +
 +
 +
==Track subcontainer==
 +
Each track subcontainer supports the following tags and subcontainers. Each tag is shown here with its default value.
 +
 
 +
track                  (no default value, this must be track kuid)
 +
useadjoiningtracktype  1
 +
vertices                {}
  
''Note: Correct track end attachment orientation is essential. The Y axis must point ‘out’ at the correct angle. The Z axis must point ‘up’.
 
  
The Attached Track Container has the following tags and containers:
 
 
===track===
 
===track===
Kuid of the track to be used.
+
:Type: Kuid
 +
:Desc: Kuid of the track or spline to be used.
 +
 
 
===useadjoiningtracktype===
 
===useadjoiningtracktype===
Indicates whether the track type should change to match that of the first track joined to the object.
+
:Type: Boolean
===vertex===
+
:Desc: If true (1) then the track type will change to match that of the first track joined to the object.
Attachment points at which to place track.
+
 
 +
===vertices===
 +
:Type: [[Vertices container]]
 +
:Desc: This is a list of attachment points that defines where the track will attach to the mesh, and the path of the track through the mesh. Each entry must have a unique name.
 +
 
 +
=Example Config.txt=
 +
Sample [[config.txt file]] for an industry asset, with the Standard Tags excluded for brevity:
 +
 
 +
{
 +
  kind industry
 +
  attached-track {
 +
    slc-spur {
 +
      vertices {
 +
        0                                  "a.track0a"
 +
        1                                  "a.track0b"
 +
        2                                  "a.track0c"
 +
        3                                  "a.track0d"
 +
        4                                  "a.track0e"
 +
      }
 +
      track                                <kuid:-25:893>
 +
      useadjoiningtracktype                1
 +
    }
 +
  }
 +
  attached-trigger {
 +
    unload-trigger {
 +
      att                                  "a.unload-trigger"
 +
      radius                                2.00
 +
      track                                "slc-spur"
 +
    }
 +
    load-trigger {
 +
      att                                  "a.load-trigger"
 +
      radius                                2.00
 +
      track                                "slc-spur"
 +
    }
 +
    gate-trigger {
 +
      radius                                10.00
 +
      att                                  "a.gate-trigger"
 +
      track                                "slc-spur"
 +
    }
 +
  }
 +
}
  
[[Category:Config Container]]
+
[[Category:Config Container|Attached-track:A]]

Latest revision as of 15:07, 16 February 2017

The Attached-track container is used by KIND SceneryWithTrack to identify a list of track subcontainers. Each track derives its name from the subcontainer's tag name. These names are used from script. Each track is auto-generated spline track through attachment points located within the default mesh.

  • Attached-tracks update automatically to the spline track connected to it in Surveyor. You may over-ride this auto-update feature by adding useadjoiningtracktype 0 (see below).
  • Correct track end attachment orientation is essential. The Y axis must point ‘out’ at the correct angle. The Z axis must point ‘up’.


Contents

[edit] Track subcontainer

Each track subcontainer supports the following tags and subcontainers. Each tag is shown here with its default value.

track                   (no default value, this must be track kuid)
useadjoiningtracktype   1
vertices                {}


[edit] track

Type: Kuid
Desc: Kuid of the track or spline to be used.

[edit] useadjoiningtracktype

Type: Boolean
Desc: If true (1) then the track type will change to match that of the first track joined to the object.

[edit] vertices

Type: Vertices container
Desc: This is a list of attachment points that defines where the track will attach to the mesh, and the path of the track through the mesh. Each entry must have a unique name.

[edit] Example Config.txt

Sample config.txt file for an industry asset, with the Standard Tags excluded for brevity:

{
 kind industry
 attached-track {
   slc-spur {
     vertices {
       0                                   "a.track0a"
       1                                   "a.track0b"
       2                                   "a.track0c"
       3                                   "a.track0d"
       4                                   "a.track0e"
     }
     track                                 <kuid:-25:893>
     useadjoiningtracktype                 1
   }
 }
 attached-trigger {
   unload-trigger {
     att                                   "a.unload-trigger"
     radius                                2.00
     track                                 "slc-spur"
   }
   load-trigger {
     att                                   "a.load-trigger"
     radius                                2.00
     track                                 "slc-spur"
   }
   gate-trigger {
     radius                                10.00
     att                                   "a.gate-trigger"
     track                                 "slc-spur"
   }
 }
}
Personal tools