Class World1

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Categories)
 
m
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
*[[TrainzScript Langage Reference|API Hierarchy]]
+
*[[TrainzScript Language Reference|API Hierarchy]]
 
**World1
 
**World1
 
<br>
 
<br>

Latest revision as of 02:43, 10 February 2010


  • 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

[edit] CreateTrain

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


[edit] 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.


[edit] 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.


[edit] Related Methods


[edit] Categories

Personal tools