Railroad Vehicle

Parent

The base class for any vehicle that drives on train tracks.

Properties

isDocked : Bool

True if this vehicle is currently docked to a platform.

Details
Flags ReadOnly RuntimeSync RuntimeParallel

Display Name

Is Docked

isReversed : Bool

True if the vheicle is placed reversed on the track.

Details
Flags ReadOnly RuntimeSync RuntimeParallel

Display Name

Is Reversed

length : Float

The length of this vehicle on the track.

Details
Flags ReadOnly RuntimeSync RuntimeParallel

Display Name

Length

Functions

getCoupled (coupler : Int) → coupled : Trace<RailroadVehicle>

Allows to get the coupled vehicle at the given coupler.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Coupled

Parameters
Name Type Description

Coupler coupler

Int

The Coupler you want to get the car from. 0 = Front, 1 = Back

Return Values
Name Type Description

Coupled coupled

Trace<RailroadVehicle>

The coupled car of the given coupler is coupled to another car.

getMovement () → movement : Trace<RailroadVehicleMovement>

Returns the vehicle movement of this vehicle.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Movement

Return Values
Name Type Description

Movement movement

Trace<RailroadVehicleMovement>

The movement of this vehicle.

getTrackGraph () → track : Struct<TrackGraph>

Returns the track graph of which this vehicle is part of.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Track Graph

Return Values
Name Type Description

Track track

Struct<TrackGraph>

The track graph of which this vehicle is part of.

getTrackPos () → (track : Trace<RailroadTrack>, offset : Float, forward : Float)

Returns the track pos at which this vehicle is.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Track Pos

Return Values
Name Type Description

Track track

Trace<RailroadTrack>

The track the track pos points to.

Offset offset

Float

The offset of the track pos.

Forward forward

Float

The forward direction of the track pos. 1 = with the track direction, -1 = against the track direction

getTrain () → train : Trace<Train>

Returns the train of which this vehicle is part of.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Train

Return Values
Name Type Description

Train train

Trace<Train>

The train of which this vehicle is part of

isCoupled (coupler : Int) → coupled : Bool

Allows to check if the given coupler is coupled to another car.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Is Coupled

Parameters
Name Type Description

Coupler coupler

Int

The Coupler you want to check. 0 = Front, 1 = Back

Return Values
Name Type Description

Coupled coupled

Bool

True of the give coupler is coupled to another car.