Railroad Track Connection
Parent |
This is a actor component for railroad tracks that allows to connecto to other track connections and so to connection multiple tracks with each eather so you can build a train network.
Properties
connectorLocation : Struct<Vector>
The world location of the the connection.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Connector Location |
connectorNormal : Struct<Vector>
The normal vecotr of the connector.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Connector Normal |
isConnected : Bool
True if the connection has any connection to other connections.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Is Connected |
isFacingSwitch : Bool
True if this connection is pointing to the merge/spread point of the switch.
Details
| Flags | ReadOnly RuntimeSync RuntimeParallel |
|---|---|
Display Name |
Is Facing Switch |
Functions
forceSwitchPosition (index : Int)
Forces the switch position to a given location. Even autopilot will be forced to use this track. A negative number can be used to remove the forced track.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Force Switch Position |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The connection index to whcih the switch should be force to point to. Negative number to remove the lock. |
getConnection (index : Int) → connection : Trace<RailroadTrackConnection>
Returns the connected connection with the given index.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Connection |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The index of the connected connection you want to get. |
| Name | Type | Description |
|---|---|---|
Connection |
Trace<RailroadTrackConnection> |
The connected connection at the given index. |
getConnections () → connections : Array<Trace<RailroadTrackConnection>>
Returns a list of all connected connections.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Connections |
| Name | Type | Description |
|---|---|---|
Connections |
Array<Trace<RailroadTrackConnection>> |
A list of all connected connections. |
getFacingSignal () → signal : Trace<RailroadSignal>
Returns the signal this connection is facing to.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Facing Signal |
| Name | Type | Description |
|---|---|---|
Signal |
Trace<RailroadSignal> |
The signal this connection is facing. |
getNext () → next : Trace<RailroadTrackConnection>
Returns the next connection in the direction of the track. (used the correct path switched point to)
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Next |
| Name | Type | Description |
|---|---|---|
Next |
Trace<RailroadTrackConnection> |
The next connection in the direction of the track. |
getOpposite () → opposite : Trace<RailroadTrackConnection>
Returns the opposite connection of the track this connection is part of.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Opposite |
| Name | Type | Description |
|---|---|---|
Opposite |
Trace<RailroadTrackConnection> |
The opposite connection of the track this connection is part of. |
getStation () → station : Trace<RailroadStation>
Returns the station of which this connection is part of.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Station |
| Name | Type | Description |
|---|---|---|
Station |
Trace<RailroadStation> |
The station of which this connection is part of. |
getSwitchControl () → switchControl : Trace<RailroadSwitchControl>
Returns the switch control of this connection.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Switch Control |
| Name | Type | Description |
|---|---|---|
Switch |
Trace<RailroadSwitchControl> |
The switch control of this connection. |
getSwitchPosition () → index : Int
Returns the current switch position.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Switch Position |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The index of the connection connection the switch currently points to. |
getTrack () → track : Trace<RailroadTrack>
Returns the track of which this connection is part of.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Track |
| Name | Type | Description |
|---|---|---|
Track |
Trace<RailroadTrack> |
The track of which this connection is part of. |
getTrackPos () → (track : Trace<RailroadTrack>, offset : Float, forward : Float)
Returns the track pos at which this connection 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 |
getTrailingSignal () → signal : Trace<RailroadSignal>
Returns the signal this connection is trailing from.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Trailing Signal |
| Name | Type | Description |
|---|---|---|
Signal |
Trace<RailroadSignal> |
The signal this connection is trailing. |