Railroad Vehicle
Parent |
The base class for any vehicle that drives on train tracks.
Properties
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 |
| Name | Type | Description |
|---|---|---|
Coupler |
Int |
The Coupler you want to get the car from. 0 = Front, 1 = Back |
| Name | Type | Description |
|---|---|---|
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 |
| Name | Type | Description |
|---|---|---|
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 |
| Name | Type | Description |
|---|---|---|
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 |
| Name | Type | Description |
|---|---|---|
Track |
Trace<RailroadTrack> |
The track the track pos points to. |
Offset |
Float |
The offset of the track pos. |
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 |
| Name | Type | Description |
|---|---|---|
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 |
| Name | Type | Description |
|---|---|---|
Coupler |
Int |
The Coupler you want to check. 0 = Front, 1 = Back |
| Name | Type | Description |
|---|---|---|
Coupled |
Bool |
True of the give coupler is coupled to another car. |