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

isTrailingSwitch : Bool

True if this connection is pointing away from the merge/spread point of a switch.

Details
Flags ReadOnly RuntimeSync RuntimeParallel

Display Name

Is Trailing Switch

numSwitchPositions : Int

Returns the number of different switch poisitions this switch can have.

Details
Flags ReadOnly RuntimeSync RuntimeParallel

Display Name

Num Switch Positions

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

Parameters
Name Type Description

Index 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

Parameters
Name Type Description

Index index

Int

The index of the connected connection you want to get.

Return Values
Name Type Description

Connection 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

Return Values
Name Type Description

Connections 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

Return Values
Name Type Description

Signal 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

Return Values
Name Type Description

Next 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

Return Values
Name Type Description

Opposite 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

Return Values
Name Type Description

Station 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

Return Values
Name Type Description

Switch switchControl

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

Return Values
Name Type Description

Index 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

Return Values
Name Type Description

Track 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

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

getTrailingSignal () → signal : Trace<RailroadSignal>

Returns the signal this connection is trailing from.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Trailing Signal

Return Values
Name Type Description

Signal signal

Trace<RailroadSignal>

The signal this connection is trailing.

setSwitchPosition (index : Int)

Sets the position (connection index) to which the track switch points to.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Set Switch Position

Parameters
Name Type Description

Index index

Int

The connection index to which the switch should point to.