"attached-trigger" Container

From TrainzOnline
Revision as of 13:05, 5 February 2014 by Pcas1986 (Talk | contribs)

Jump to: navigation, search

The attached-trigger container is used by KIND SceneryWithTrack to identify a list of trigger subcontainers. The attached-trigger container has no standalone tags. Each trigger identifies its location (attachment point), detection radius and the name of the track. Triggers are commonly used in industries in conjunction with attached tracks. Each trigger subcontainer uses the following format. Each trigger derives its name from the subcontainer's tag name. These names are used from script.

Contents

Process subcontainer

Each attached-trigger subcontainer supports the following tags. Each tag is shown here with its default value.

att      (no default value, this must be an attachment point in the mesh)
radius   0
track    ""


att

Type: String
Desc: The attachment point in the asset mesh.

radius

Type: Value
Desc: The distance at which the trigger is activated in metres.

track

Type: String
Desc: A name of a track defined in an attached-track container.

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