Class World1

From TrainzOnline
Jump to: navigation, search


  • World1 is an extension of the original World class.
  • This class was originally made separate from World because in earlier versions of Trainz, it was not possible to modify a .gs file without breaking compatibility. Even though later versions don't have this problem, scenarios written for SP3 or UTC still expect to find certain methods in World1, so World1 is retained to maintain backward compatibility.


Contents

CreateTrain

public native Train CreateTrain(string consistName, string trackmarkName, bool direction)
Notes


SetDCCMode

public native void SetDCCMode(bool dccMode)
Parameters
  • dccMode = true for DCC mode, false for Cabin control.
Returned Value
  • None
Syntax
World1.SetDCCMode(true);
Notes
  • This method provides script access to the control mode which is normally set using the Startup Options rule.


SetDerailLevel

public native void SetDerailLevel(int level)
Parameters
  • level = Derail level in the range 0 to 2
Returned Value
  • None
Syntax
World1.SetDerailLevel(1);
Notes
  • This method provides script access to the derailment realism options which are normally set using the Startup Options rule.


Related Methods


Categories

Personal tools