Class Turntable

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m
m (Change link to library reference, not language reference)
 
Line 1: Line 1:
*[[TrainzScript Language Reference|API Hierarchy]]
+
*[[TrainzScript Library Reference|API Hierarchy]]
 
**[[Class GSObject|GSObject]] *
 
**[[Class GSObject|GSObject]] *
 
***[[Class GameObject|GameObject]]
 
***[[Class GameObject|GameObject]]

Latest revision as of 23:44, 28 December 2020


  • An interface to operate a Turntable or similar object.


Contents

[edit] Messages

  • Turntable assets support attached-triggers.
  • Adding an attached trigger table will enable SceneryWithTrack messages for each trigger.


[edit] CanMoveToNextStop

public native bool CanMoveToNextStop(void)
Parameters
  • None
Returned Value
  • True if there is a next stop to move to, false otherwise.
Syntax
bool endOfTravel = Table.CanMoveToNextStop();
Notes
  • This method only make sense for transfer tables and the like where the animation has a defined start and end position.
  • For circular turntables the method will always return true.


[edit] CanMoveToPrevStop

public native bool CanMoveToPrevStop(void)
Parameters
  • None
Returned Value
  • True if there is a previous stop to move to, false otherwise.
Syntax
bool startOfTravel = Table.CanMoveToNextStop();
Notes
  • This method only make sense for transfer tables and the like where the animation has a defined start and end position.
  • For circular turntables the method will always return true.


[edit] GetStopPosition

public native int GetStopPosition(void)
Parameters
  • None
Returned Value
  • The current position of the turntable.
Syntax
int position = Table.GetStopPositionStop();
Notes


[edit] IsMoving

public native bool IsMoving(void)
Parameters
  • None
Returned Value
  • True if the turntable is currently in motion, false otherwise.
Syntax
bool canSelectStop = Table.IsMoving();
Notes


[edit] MoveToNextStop

public native void MoveToNextStop(void)
Parameters
  • None
Returned Value
  • None
Syntax
Table.MoveToNextStop();
Notes
  • Moves the turntable to the next stop.


[edit] MoveToPrevStop

public native void MoveToPrevStop(void)
Parameters
  • None
Returned Value
  • None
Syntax
Table.MoveToPrevStop();
Notes
  • Moves the turntable to the previous stop.



[edit] MoveToStop

public native void MoveToStop(int index)
Parameters
  • index = Position to move to.
Returned Value
  • None
Syntax
Table.MoveToStop(2);
Notes
  • Moves the turntable to the indicated stop.


[edit] Categories

Personal tools