Wye turnout rail tile
$object.turnoutwyerailtile:description$
Properties
id
Unique object identifier. Each object in Traintastic has a globally unique id that can be used in scripts (see world.get_object).
name
Turnout name.
position
Current turnout position, a Turnout position value. To change the turnout position call set_position.
reserved_position
$object.turnoutrailtile.reserved_position:description$
Methods
set_position(position)
Change turnout position.
Parameters:
position
Requested turnout position, a Turnout position value.
Return values
true if the position is changed, false if position value is invalid or turnout is locked e.g. due to a reserved path.
Events
on_changed
$object.turnoutwyerailtile.on_changed:description$
Handler signature
function (value, object, name, user_data)
Arguments
-
value- $object.object.on_changed.parameter.value:description$ -
object- $object.object.on_changed.parameter.object:description$ -
name- $object.object.on_changed.parameter.name:description$ -
user_data- optional user-provided value (see Events).