Web Update 19.10.2024

Attached Points – Attached

You are here:
Estimated reading time: 2 min

If different files need to be attached to the main model, the attached command will attach different models either embedded or shared using kuid.

kind "attachment"
name ""
att ""
surveyor-only 0
default-mesh <NULLKUID>
use-default-lighting 0

att: The connection point to which this network is to be connected.

 

Name The name of the connection point in the network in the network table.
Compulsory. The mount point must exist.

 

surveyor-only: Indicates whether this attachment should only appear in Surveyor (eg location guide) or should appear in both Surveyor and Driver.

 

Enter Boolean 0 = effect appears in Surveyor and Driver, 1 = effect appears only in Surveyor.
Optional. Default 0

 

use-default-lighting: A value indicating whether to use the default lighting for the connected network.

attached-splines

attached-splines
{
  0
  {
    lateral-offset 0.0
    use-same-direction 1
    spline-kuid <NULL>
    visual-only 0
    follows-spline-gradient 1
    start-gap 0
    end-gap 0
  }
  atd...
}

lateral-offset: This decimal tag defines the number of meters that the child file will be offset laterally from its base position. The base is at position 0.0 with positive offsets to the right and negative offsets to the left.

 

use-sa-direction: If set (1), this optional tag causes the child file to point in the same direction as the base. If unchecked (0), it will be rotated backwards (180° rotation) to the base.

 

visual-only: If set (1), this optional tag causes the child model to exist only when rendering is active. This also removes all functional aspects of the child model. If unchecked (0), the child model is fully created along with the parent. Manual editing of the child model is disabled in Surveyor, but in all other respects the child responds as if it had been placed manually.

 

follows-spline-gradient: If set to (1), this optional tag causes the child model to follow the gradient instead of letting the child determine whether to follow the gradient or ground height. This is useful when the child model is an asset that would normally follow ground elevation (such as a regular track), but where the attachment location to the base does not follow ground elevation (such as on a bridge).

 

start-gap: Defines the distance in meters between the start of the spline and the start of the model geometry, measured along the spline path. The default value is 0 m, which means that the geometry starts with a spline. Positive numbers put the geometry into a spline. Negative numbers are not allowed. If the ‘startgap’ and ‘endgap’ offsets cause the length of the geometry to drop to zero, no spline geometry will be drawn, but all end pieces will be drawn. This tag is only valid for “visual only” and should not be present otherwise. End caps (if present) will also be inserted by the specified distance.

 

end-gap: Defines the distance in meters between the end of the model geometry and the end of the spline, measured along the spline path. The default value is 0 m, which means that the geometry ends with a spline. Positive numbers put the geometry into a spline. Negative numbers are not allowed. If the ‘startgap’ and ‘endgap’ offsets cause the length of the geometry to drop to zero, no spline geometry will be drawn, but all end pieces will be drawn. This tag is only valid for “visual only” and should not be present otherwise. End caps (if present) will also be inserted by the specified distance.

Example

mesh-table
{
  default-lod0
  {
    mesh                                "blanovka.trainzmesh"
    auto-create                         1
    lod-level                           0
  }

  default-lod1
  {
    mesh                                "blanovka-lod.trainzmesh"
    auto-create                         1
    lod-level                           1
  }
}

attached-track
{
  line0
  {
    track                               <kuid:383363:101598>
    useadjoiningtracktype               0

    vertices
    {
      0                                 "a.point1"
      1                                 "a.point2"
    }
  }

  line1
  {
    track                               <kuid:383363:101598>
    useadjoiningtracktype               0

    vertices
    {
      0                                 "a.point3"
      1                                 "a.point4"
    }
  }
}
Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 12
Alpinetrainz
Logo
Shopping cart