<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.trainzsimulator.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dap</id>
	<title>TrainzOnline - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.trainzsimulator.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dap"/>
	<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/wiki/Special:Contributions/Dap"/>
	<updated>2026-11-05T05:26:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CMTM/Link_Introduction&amp;diff=565</id>
		<title>CMTM/Link Introduction</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CMTM/Link_Introduction&amp;diff=565"/>
		<updated>2009-09-05T17:00:33Z</updated>

		<summary type="html">&lt;p&gt;Dap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Car Movement &amp;amp; Traffic Management System (CMTM System) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Introduction&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
The Car Movement &amp;amp; Traffic Management System (CMTM System) is designed to simulate prototype freight traffic patterns and operations in Trainz by providing each freight car on the route a series of destinations that represent freight car movements in prototype operations.  Implementing this system is labor intensive to get up and get running and is not for the faint of heart. Think of it as an automated car-card system on steroids.&lt;br /&gt;
&lt;br /&gt;
I developed this system because the built-in WayBill system in Trainz works nothing like the prototype and I like to operate as close to prototypical as possible. Trainz is a fantastic modeling tool for its price, but it is only a $40 software package with many limitations.  Consequently, there are some limitations to this system. The first is that you can not save a session and come back to it with the same destinations for the same cars. Another problem, but one that can be overcome, is that CMTM relies on certain data in each vehicles config.txt files to be correct. &lt;br /&gt;
&lt;br /&gt;
Be advised that many vehicles on the DLS have errors in their config.txt files. The work around is to use only those cars that have the information correct or to modify the config.txt files to make the data correct. The two primary Tags that require correction are the category-class code and the Company. The category-class code is a standardized system for referring to the various types of assets. A complete listing for freight cars can be found in Appendix C of this document.  (I was surprised by the number of vehicles on the DLS that do not have the correct category-class.)  The category-class for a freight car begins with an X, followed by one or two letters that determine the type of freight car. The CMTM system relies on these codes for proper identification. &lt;br /&gt;
&lt;br /&gt;
The second problem tag is the Company tag. The CMTM system relies on this tag to determine if a vehicle is a home road vehicle or a vehicle leased for home road use. This tag must be consistent in all vehicles for each owner company that is used for home road use and must agree with the data entered into the CMTM system. I like to use the call letters of the railroad, but you cannot use the “&amp;amp;” as Trainz does not recognize this as a valid letter. If you enter C&amp;amp;NW or CB&amp;amp;Q, Trainz only sees C or CB because “&amp;amp;” is not recognized as a valid letter and the text is terminated. &lt;br /&gt;
&lt;br /&gt;
The CMTM System assumes that your route has at least one portal and at least one industry to service. The portals represent either the continuation of your railroad (home road) or an interchange with another railroad (foreign road).  Your Trainz route can be just one town on a railroad with industries and portals to the rest of the world, or a complete railroad with multiple interchanges to foreign roads, or anything in between.  &lt;br /&gt;
&lt;br /&gt;
Industries used in this system do not have to be interactive. Any spot on any spur or side track can be an industry or destination for a freight car. It is recommended that some type of structure be placed at the location and given a name so the location can be readily recognized. This will also make all industries visible on the Trainz Mini-map. If you have an industry that uses open top cars, you may want to make it an interactive industry. Just make sure that your production rates are set appropriately so there is always product to load or unload. &lt;br /&gt;
&lt;br /&gt;
This system does not deal with &amp;quot;Commodities&amp;quot; or the built in &amp;quot;Way Bill&amp;quot; system. If you are using the CMTM System, the built-in &amp;quot;Commodities&amp;quot; and &amp;quot;Way Bill&amp;quot; features should be completely ignored.&lt;br /&gt;
CMTM stands for Car Movement and Traffic Management.  The Car Movement portion of this system is what directs cars to and from industries. The Traffic Management portion determines the over all flow of through traffic. Through traffic is usually portal to portal traffic, but not always straight thru on the same train. If you have three or more portals, through cars that arrive in a train from portal 1 may be destined for portal 2 or portal 3. You can control the flow of this traffic with the Traffic Management portion of this system.&lt;/div&gt;</summary>
		<author><name>Dap</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Operators&amp;diff=651</id>
		<title>Operators</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Operators&amp;diff=651"/>
		<updated>2009-04-20T13:43:13Z</updated>

		<summary type="html">&lt;p&gt;Dap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The operator sections set out below follow the language&#039;s preference rules. The earlier the operator appears in the list, the higher the precedence and the earlier the listed operators will be evaluated.__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Operators (1), Grouping &amp;amp; Indexing==&lt;br /&gt;
{{MethodHeader|( )}}&lt;br /&gt;
*Expression grouping. &lt;br /&gt;
*In common with most programming languages Trainzscript carries out arithmetical operations in the order defined by operator precedence rules.&lt;br /&gt;
*&#039;&#039;3 + 2 * 12 - 7&#039;&#039; would return 20, because multiplication is of higher precedence than addition and subtraction.&lt;br /&gt;
*You can force the compiler to change this sequence and make your intentions crystal clear by declaring this as &#039;&#039;((3 + 2) * 12) - 7&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|[ i ]}}&lt;br /&gt;
*Array and string indexing.  &lt;br /&gt;
*Arrays are zero based and &#039;&#039;arrayName[0]&#039;&#039; will represent the first element.  &lt;br /&gt;
*Similarly &#039;&#039;arrayName[arrayName.size() - 1]&#039;&#039; will represent the last element.  &lt;br /&gt;
*A call to a value outside the range &#039;&#039;[0 … size()-1]&#039;&#039; will generate an exception. &lt;br /&gt;
*This notation can also be used to return a single character from a string.&lt;br /&gt;
&lt;br /&gt;
 intArray[intArray.size()] = 5    // will add the new value of 5 to the end of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|[ i , j ]}}&lt;br /&gt;
*Array and String range index. &lt;br /&gt;
*The expression &#039;&#039;string[0,string.size()]&#039;&#039; will return the entire string.  &lt;br /&gt;
*The integers i and j are best thought of as &#039;cursor&#039; positions where 0 is before the first element and size() is after the last element. &lt;br /&gt;
*If i is omitted the range will start at the beginning of the array, &lt;br /&gt;
*If j is omitted the range will end after the end of the array. &lt;br /&gt;
*To return a single element both i and j are required. &lt;br /&gt;
*Given the declaration &#039;&#039;string s = &amp;quot;abcde&amp;quot;&#039;&#039;&lt;br /&gt;
 s[,3]  = &amp;quot;abc&amp;quot;&lt;br /&gt;
 s[2,3] = &amp;quot;c&amp;quot;&lt;br /&gt;
 s[2,]  = &amp;quot;cde&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 intArray[2,3] = null             // will delete the third element of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|[ i , ]}}&lt;br /&gt;
*Indexes from i to the end of the string or array inclusively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|[ , j ]}}&lt;br /&gt;
*Indexes from the start of the string or array to element b inclusively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|.}}&lt;br /&gt;
*Dereference operator as in &#039;&#039;GetAsset().GetConfigSoup();&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|!}}&lt;br /&gt;
*Not Operator&lt;br /&gt;
 !true = false&lt;br /&gt;
 !vehicle = null&lt;br /&gt;
&lt;br /&gt;
==Operators (2), Incremental and Unary Operators==&lt;br /&gt;
{{MethodHeader|++}}&lt;br /&gt;
*Increments a numeric value by 1.&lt;br /&gt;
*Often used for control variables in loops:&lt;br /&gt;
 for(n = 0; n &amp;lt; list.size(); n++) {&lt;br /&gt;
    DoStuffWith(n);&lt;br /&gt;
 }&lt;br /&gt;
*Increments n by 1 on each pass through the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|--}}&lt;br /&gt;
*Decrements a numeric value by 1.&lt;br /&gt;
*Often used for control variables in loops:&lt;br /&gt;
 n = list.size() - 1;&lt;br /&gt;
 while(n &amp;gt;= 0) {&lt;br /&gt;
    DoStuffWith(n);&lt;br /&gt;
    n--;&lt;br /&gt;
 }&lt;br /&gt;
*Decrements n by 1 on each pass through the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|+}}&lt;br /&gt;
*Unary plus.&lt;br /&gt;
*Used to denote that a value is positive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|-}}&lt;br /&gt;
*Unary minus.&lt;br /&gt;
*Used to denote that a value is negative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Operators (3), Casts==&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;(bool)&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Boolean type cast.&lt;br /&gt;
 (bool) 0 = false&lt;br /&gt;
 (bool) 0.0 = false&lt;br /&gt;
 (bool) n = true     //where n is greater than zero&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;(int)&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Integer type cast.&lt;br /&gt;
 (int) 5.0 = 5&lt;br /&gt;
 (int) true = 1&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;(float)&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Float type cast.&lt;br /&gt;
 (float) 100 = 100.0&lt;br /&gt;
 (float) false = 0.0&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;(string)&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*String type cast.&lt;br /&gt;
 (string) 1 = &amp;quot;1&amp;quot;&lt;br /&gt;
 (string) 0.99 = &amp;quot;0.99&amp;quot;&lt;br /&gt;
 (string) false = &amp;quot;false&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|(&#039;&#039;reference&#039;&#039;)}}&lt;br /&gt;
*Class type cast.&lt;br /&gt;
 &amp;lt;font color=red&amp;gt;How is this used and how is it different from cast&amp;lt;Class&amp;gt;?&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;cast&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Dynamic cast.  &lt;br /&gt;
*Returns null if the reference cannot be converted to the class specified by className.  &lt;br /&gt;
*Note that ancestors of the specified class will be returned.&lt;br /&gt;
 Vehicle vehicle = cast&amp;lt;Vehicle&amp;gt;msg.src;&lt;br /&gt;
 &lt;br /&gt;
 MeshObject meshObject;&lt;br /&gt;
 GameObject gameObject = cast&amp;lt;GameObject&amp;gt;meshObject;  // returns meshObject if the object exists, null otherwise&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;size()&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Returns the number of members of an array or the length of a string.  &lt;br /&gt;
*In the case of an array this does not necessarily mean that all (or any) of the members actually contain values.&lt;br /&gt;
 given string s = &amp;quot;abcde&amp;quot;;&lt;br /&gt;
 s.size() = 5;&lt;br /&gt;
 &lt;br /&gt;
 int[] numbers = new int[5];       // creates an empty array of 5 integers&lt;br /&gt;
 numbers.size() = 5;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;copy()&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Creates a copy of an array or string. &lt;br /&gt;
*This is different from a simple assignment which points a variable to the same memory address as an existing variable.&lt;br /&gt;
*Array.copy() or string.copy() creates an additional copy of the data.&lt;br /&gt;
 int[] numbers = new int[5];&lt;br /&gt;
 int[] moreNumbers;&lt;br /&gt;
 &lt;br /&gt;
 moreNumbers.copy(numbers);  // duplicates numbers &lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;isclass()&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Used in the declaration of a new class identifier&lt;br /&gt;
 class MyScript isclass Vehicle {&lt;br /&gt;
   classMethods();&lt;br /&gt;
 };&lt;br /&gt;
*Used to test whether a given reference is to a specific class.&lt;br /&gt;
 given the declaration: &lt;br /&gt;
 TrackLoadInfo info = new TrackLoadInfo();&lt;br /&gt;
 &lt;br /&gt;
 info.isclass(TrackLoadInfo);               // returns true&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;new&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Creates a new instance of the specified type. &lt;br /&gt;
 int[] numbers = new int[4];                // creates an integer array containing 4 members. &lt;br /&gt;
 TrackLoadInfo info = new TrackLoadInfo();  // creates a new instance of the TrackLoadInfo class.&lt;br /&gt;
*new does not initialise the members.&lt;br /&gt;
*GameObject classes cannot be created using new.&lt;br /&gt;
&lt;br /&gt;
==Operators (4), Multiplication &amp;amp; Division==&lt;br /&gt;
{{MethodHeader|*}}&lt;br /&gt;
*Multiplication. &lt;br /&gt;
*If both terms are integers the result will be an integer.&lt;br /&gt;
*If either term is a float the result will be a float.&lt;br /&gt;
 2 * 5 = 10;&lt;br /&gt;
 2 * 5.0 = 10.0;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|/}}&lt;br /&gt;
*Division. &lt;br /&gt;
*If both terms are integers the result will be an integer, possibly with a remainder.&lt;br /&gt;
*If either term is a float the result will be a float.&lt;br /&gt;
 10 / 5 = 2;&lt;br /&gt;
 10 / 5.0 = 2.0;&lt;br /&gt;
 10 / 6 = 1;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|%}}&lt;br /&gt;
*Remainder or modulus operator.&lt;br /&gt;
*Returns the remainder from an integer division.&lt;br /&gt;
 5 % 2 = 1;&lt;br /&gt;
 105 % 50 = 5;&lt;br /&gt;
 105 % 100 = 5;&lt;br /&gt;
&lt;br /&gt;
==Operators (5), Addition &amp;amp; Subtraction==&lt;br /&gt;
{{MethodHeader|+}}&lt;br /&gt;
*Addition&lt;br /&gt;
*If both terms are integers the result will be an integer.&lt;br /&gt;
*If either term is a float the result will be a float.&lt;br /&gt;
 1 + 1 = 2;&lt;br /&gt;
 1 + 1.0 = 2.0;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|-}}&lt;br /&gt;
*Subtraction&lt;br /&gt;
*If both terms are integers the result will be an integer.&lt;br /&gt;
*If either term is a float the result will be a float.&lt;br /&gt;
 2 - 1 = 1;&lt;br /&gt;
 2 - 1.0 = 1.0;&lt;br /&gt;
&lt;br /&gt;
==Operators (6), Shifts==&lt;br /&gt;
{{MethodHeader|&amp;lt;&amp;lt;}}&lt;br /&gt;
*Shift Left&lt;br /&gt;
*Bitwise operator moves all of the binary values to the left by the number of places specified in the second term.&lt;br /&gt;
*Binary zero is appended.&lt;br /&gt;
*Provided there is no overflow the result is a doubling of the value for each shift. &lt;br /&gt;
 8 &amp;lt;&amp;lt; 1 = 16&lt;br /&gt;
 8 &amp;lt;&amp;lt; 2 = 32&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;gt;&amp;gt;}}&lt;br /&gt;
*Shift Right&lt;br /&gt;
*Bitwise operator moves all of the binary values one place to the right by the number of places specified in the second term.&lt;br /&gt;
*Binary zero is prepended and any displaced bits are discarded.&lt;br /&gt;
*The result is an integral halving of the value for each shift. &lt;br /&gt;
 8 &amp;gt;&amp;gt; 1 = 4&lt;br /&gt;
 9 &amp;gt;&amp;gt; 2 = 2&lt;br /&gt;
&lt;br /&gt;
==Operators (7), Comparisons==&lt;br /&gt;
{{MethodHeader|&amp;lt;}}&lt;br /&gt;
*Comparison operator which can be used on string, float, integer and bool values.&lt;br /&gt;
*Returns true if the first term is less than the second.&lt;br /&gt;
 1 &amp;lt; 2 = true;&lt;br /&gt;
 false &amp;lt; false = false;&lt;br /&gt;
 &amp;quot;abc&amp;quot; &amp;lt; &amp;quot;def&amp;quot; = true;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;&amp;amp;#061;}}&lt;br /&gt;
*Comparison operator which can be used on string, float, integer and bool values.&lt;br /&gt;
*Returns true if the first term is less than or equal to the second.&lt;br /&gt;
 1 &amp;lt;= 2 = true;&lt;br /&gt;
 false &amp;lt;= false = true;&lt;br /&gt;
 &amp;quot;abc&amp;quot; &amp;lt;= &amp;quot;def&amp;quot; = true;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;gt;}}&lt;br /&gt;
*Comparison operator which can be used on string, float, integer and bool values.&lt;br /&gt;
*Returns true if the first term is greater than the second.&lt;br /&gt;
 1 &amp;gt; 2 = false;&lt;br /&gt;
 true &amp;gt; false = true;&lt;br /&gt;
 &amp;quot;abc&amp;quot; &amp;gt; &amp;quot;def&amp;quot; = false;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;gt;&amp;amp;#061;}}&lt;br /&gt;
*Comparison operator which can be used on string, float, integer and bool values.&lt;br /&gt;
*Returns true if the first term is greater than or equal to the second.&lt;br /&gt;
 1 &amp;gt;= 2 = false;&lt;br /&gt;
 true &amp;gt;= true = true;&lt;br /&gt;
 &amp;quot;abc&amp;quot; &amp;gt;= &amp;quot;def&amp;quot; = false;&lt;br /&gt;
&lt;br /&gt;
==Operators (8), Equality==&lt;br /&gt;
{{MethodHeader|&amp;amp;#061;&amp;amp;#061;}}&lt;br /&gt;
*Comparison operator which can be used on string, float, integer and bool values and on object references.&lt;br /&gt;
*Returns true if the first and second terms are equal or if they evaluate to the same object.&lt;br /&gt;
 int a = 0;&lt;br /&gt;
 int b = 0;&lt;br /&gt;
 a == b;  // returns true&lt;br /&gt;
*Note that &#039;&#039;a = b&#039;&#039; is an assignment and will always return true. Mistyping &#039;&#039;&#039;&#039;&#039;=&#039;&#039;&#039;&#039;&#039; for &#039;&#039;&#039;&#039;&#039;==&#039;&#039;&#039;&#039;&#039; is one of the most common semantic errors in Trainzscript.&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|!&amp;amp;#061;}}&lt;br /&gt;
*Comparison operator which can be used on string, float, integer and bool values and on object references.&lt;br /&gt;
*Returns true if the first and second terms are not equal and do not evaluate to the same object.&lt;br /&gt;
 int a = 0;&lt;br /&gt;
 int b = 0;&lt;br /&gt;
 a != b;  // returns false&lt;br /&gt;
&lt;br /&gt;
==Operators (9), Bitwise Operators==&lt;br /&gt;
{{MethodHeader|&amp;amp;}}&lt;br /&gt;
*Bitwise AND&lt;br /&gt;
*Performs a bit by bit comparison of two integers and returns a new value.&lt;br /&gt;
*Each bit in the result is set if BOTH of the corresponding bits in the arguments are set&lt;br /&gt;
   0000 1111&lt;br /&gt;
 &amp;amp; 0001 0111&lt;br /&gt;
 = 0000 0111&lt;br /&gt;
&lt;br /&gt;
 15 &amp;amp; 23 = 7&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|^}}&lt;br /&gt;
*Bitwise XOR&lt;br /&gt;
*Performs a bit by bit comparison of two integers and returns a new value.&lt;br /&gt;
*Each bit in the result is set if EITHER BUT NOT BOTH of the corresponding bits in the arguments are set&lt;br /&gt;
   0000 1111&lt;br /&gt;
 ^ 0001 0111&lt;br /&gt;
 = 0001 1000&lt;br /&gt;
&lt;br /&gt;
 15 ^ 23 = 24&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;amp;#166;}}&lt;br /&gt;
*Bitwise OR&lt;br /&gt;
*Performs a bit by bit comparison of two integers and returns a new value.&lt;br /&gt;
*Each bit in the result is set if EITHER of the corresponding bits in the arguments are set&lt;br /&gt;
   0000 1111&lt;br /&gt;
 | 0001 0111&lt;br /&gt;
 = 0001 1111&lt;br /&gt;
&lt;br /&gt;
 15 | 23 = 31&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|~}}&lt;br /&gt;
*Bitwise Inverse Operator for integer values&lt;br /&gt;
*Takes the binary representation of the integer and inverts each bit.&lt;br /&gt;
*Useful in masking out values from bitfields (eg.  flags &amp;amp;= ~SOME_FLAG;  switches off the SOME_FLAG bit from &#039;flags&#039;)&lt;br /&gt;
 ~0011 1101 = 1100 0010&lt;br /&gt;
 ~1000 0100 = 0111 1011&lt;br /&gt;
&lt;br /&gt;
 ~0   = -1&lt;br /&gt;
 ~255 = -256&lt;br /&gt;
 ~5   = -6&lt;br /&gt;
&lt;br /&gt;
==Operators (10), Logical Operators==&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;and&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Logical AND&lt;br /&gt;
*Enables multiple boolean expressions to be combined.&lt;br /&gt;
 if (msg.minor == &amp;quot;Enter&amp;quot; and doorsOpen)&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|&amp;lt;h5&amp;gt;or&amp;lt;/h5&amp;gt;}}&lt;br /&gt;
*Logical OR&lt;br /&gt;
*Enables multiple boolean expressions to be combined.&lt;br /&gt;
 if (msg.minor == &amp;quot;Enter&amp;quot; or doorsOpen)&lt;br /&gt;
 if ((msg.minor == &amp;quot;Enter&amp;quot; and doorsOpen) or (msg.minor == &amp;quot;Leave&amp;quot; and !doorsOpen))&lt;br /&gt;
&lt;br /&gt;
==Operators (11), Assignment==&lt;br /&gt;
{{MethodHeader|&amp;amp;#061;}}&lt;br /&gt;
*Assignment Operator&lt;br /&gt;
 a = 1;&lt;br /&gt;
 Train train = World.GetTrainList()[0];&lt;br /&gt;
&lt;br /&gt;
Apparently there are 2 types in Trainz gamescript that don&#039;t support direct assignment of themselves: arrays and strings. When arrays and strings appear singlely on the right hand side in assignment statements only a reference to the original is created. So in effect only the original copy exists. The original name and the new name both reference the same object. To make an assignment to a new object that is a copy of the original you can use the copy() operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|,}}&lt;br /&gt;
*Expression or parameter separator.&lt;/div&gt;</summary>
		<author><name>Dap</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=289</id>
		<title>Class World</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=289"/>
		<updated>2009-03-08T02:38:21Z</updated>

		<summary type="html">&lt;p&gt;Dap: changed 36.0 to 3600.0 in TIME_HOUR=TIME_MINUTE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Langage Reference|API Hierarchy]]&lt;br /&gt;
**World&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*World is a static class used to access various aspects of the Trainz environment.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
*These constants are used to define various values and can be used as mnenomics.&lt;br /&gt;
*If accessed from scripts the values must be prefixed &#039;&#039;World.&#039;&#039;, for example:&lt;br /&gt;
 World.SetWeather(World.WEATHER_TYPE_LIGHT_SNOW,World.WEATHER_CHANGEABILITY_PERIODIC);&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Camera View Modes===&lt;br /&gt;
----&lt;br /&gt;
*These values can be used either to choose the current camera viewing mode through World.SetCameraMode(), or to restrict certain camera modes from being accessed through methods such as World.SetCamera().&lt;br /&gt;
&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int CAMERA_INTERNAL = 1||Internal cabin camera view.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_EXTERNAL = 2||External train camera view&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_TRACKING = 4||External tracking camera view.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_ROAMING = 128||Roaming camera view.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Camera Flags===&lt;br /&gt;
----&lt;br /&gt;
*These flags are used in addition to the Camera Mode Flags to allow or disallow specific camera actions. &lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int CAMERA_SWITCH_VIEWS = 8||User permitted to swap between the camera views.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_SWITCH_VEHICLES = 16||User permitted to swap vehicles within the current train.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_SWITCH_TRAINS = 32||User permitted to swap to other trains which are in the consist menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_LOCKED = 64||User is NOT permitted to adjust camera (i.e. zoom, pan etc.).&lt;br /&gt;
|-&lt;br /&gt;
|public define int CAMERA_NORMAL = * ||Normal camera mode where everything is permitted.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|&amp;lt;sup&amp;gt;* NOTE: CAMERA_NORMAL = CAMERA_INTERNAL | CAMERA_EXTERNAL | CAMERA_TRACKING | CAMERA_SWITCH_VIEWS | CAMERA_SWITCH_VEHICLES | CAMERA_SWITCH_TRAINS&amp;lt;/sup&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Weather Type Constants===&lt;br /&gt;
----&lt;br /&gt;
*Define the current state of the weather in Trainz. &lt;br /&gt;
*A variety of weather conditions are supported and can be changed by using one of these values with the World.SetWeather() method. &lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int WEATHER_TYPE_CLEAR = 0||Clear weather, no clouds, rain or snow.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_CLOUDY = 1||Cloudy weather, no rain.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_DRIZZLE = 2||Drizzle, light rain.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_RAIN = 3||Rainy weather.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_STORMY = 4||Stormy weather that includes lightning and thunder.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_LIGHT_SNOW = 5||Snowing lightly.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_MEDIUM_SNOW = 6||Medium level snow fall.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_TYPE_HEAVY_SNOW = 7||Heavy snow fall.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Weather Changeability Constants===&lt;br /&gt;
----&lt;br /&gt;
*Define the changeability settings for the weather. &lt;br /&gt;
*Weather changeability refers to variability of weather conditions rather than to a specific weather type.&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int WEATHER_CHANGEABILITY_NONE = 0||Weather remains static.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_CHANGEABILITY_PERIODIC = 1||Periodic changes in weather.&lt;br /&gt;
|-&lt;br /&gt;
|public define int WEATHER_CHANGEABILITY_EXTREME = 2||Extreme and frequent changes in weather. &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Time Values===&lt;br /&gt;
----&lt;br /&gt;
*Time constants defined in seconds.&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define float TIME_SECOND = 1.0f||One second.&lt;br /&gt;
|-&lt;br /&gt;
|public define float TIME_MINUTE = TIME_SECOND * 60.0f||One minute, 60.0 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|public define float TIME_HOUR = TIME_MINUTE * 60.0f||One hour, 60.0 minutes, 3600.0 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|public define float TIME_DAY = TIME_HOUR * 24.0f||One day, 24 hours, 1440.0 minutes, 86400.0 seconds.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Time Rate Constants===&lt;br /&gt;
----&lt;br /&gt;
*Values that define the time rates relative to normal time. &lt;br /&gt;
*These constants can be used to set the time rate that Trainz runs out through the World.SetGameTimeRate() method. &lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int  TIME_RATE_1X = 0||Real time (i.e. time in Trainz passes at the same rate as in the real world)&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_2X = 1||Time passes at twice normal speed.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_4X = 2||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_8X = 3||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_16X = 4||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_32X = 5||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_60X = 6||&lt;br /&gt;
|-&lt;br /&gt;
| public define int TIME_RATE_120X = 7||&lt;br /&gt;
|-&lt;br /&gt;
| public define int TIME_RATE_240X = 8||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_360X = 9||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_480X = 10||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_720X = 11||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_960X = 12||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_1200X = 13||&lt;br /&gt;
|-&lt;br /&gt;
|public define int TIME_RATE_1440X = 14||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Trainz Modules===&lt;br /&gt;
----&lt;br /&gt;
*Trainz module mode constants. &lt;br /&gt;
*These values define the various module environments that Trainz can be in. &lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int  NO_MODULE = 0||Trainz not running in a module.&lt;br /&gt;
|-&lt;br /&gt;
|public define int SURVEYOR_MODULE = 1||Trainz is currently running in Surveyor.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DRIVER_MODULE = 2||Trainz is currently running in Driver.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
* [[TrainzScript Message Reference]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Camera Messages]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Interface Messages]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[ModuleInit Message]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==AddDriverCharacter==&lt;br /&gt;
{{MethodHeader|public native DriverCharacter AddDriverCharacter(Asset driverCharacterAsset)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;driverCharacterAsset&#039;&#039;&#039; = Asset containing character to be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Reference to the DriverCharacter if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 DriverCharacter Casey = World.AddDriverCharacter(CaseyJones);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==AddDriverCommand==&lt;br /&gt;
{{MethodHeader|public native DriverCommand AddDriverCommand(Asset driverCommandAsset)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;driverCommandAsset&#039;&#039;&#039; = Asset containing command to be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Reference to the DriverCommand if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 DriverCommand GoFaster = World.AddDriverCommand(accelerate);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CreateBehavior==&lt;br /&gt;
{{MethodHeader|public native ScenarioBehavior CreateBehavior(KUID kuid, Soup initialProperties)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = KUID of scenario.&lt;br /&gt;
&#039;&#039;&#039;initialProperties&#039;&#039;&#039; = Soup object containing initial properties for scenario.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Reference to the ScenarioBehavior created if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ScenarioBehavior scenario = World.CreateBehavior(scenarioAsset, scenarioSoup);&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned ScenarioBehavior object may be ended by releasing all references to it (resetting all references to null).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CreateTrain==&lt;br /&gt;
{{MethodHeader|public native Train CreateTrain(KUID[ ] consist, string trackmarkName, bool direction)&amp;lt;br&amp;gt;public native Train CreateTrain(KUID[ ] consist, TrackMark trackmark, bool direction)&amp;lt;br&amp;gt;public native Train CreateTrain(KUID[ ] consist, Buildable buildable, string trackName, float position, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;consist&#039;&#039;&#039; = An array of vehicle KUIDs used to describe the required Train object.&lt;br /&gt;
*&#039;&#039;&#039;trackmarkName&#039;&#039;&#039; = Name of Trackmark at which the consist is to be formed.&lt;br /&gt;
*&#039;&#039;&#039;buildable&#039;&#039;&#039; = Buildable on which the consist is to be formed.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = Name of track within Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;position&#039;&#039;&#039; = Distance at which the Train is to be placed relative to the start of the track.&lt;br /&gt;
*&#039;&#039;&#039;trackmark&#039;&#039;&#039; = Reference to Trackmark at which the consist is to be formed.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Orientation of Train relative to direction of track or trackmark.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Reference to the Train created if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = World.CreateTrain(consist, buildable, &amp;quot;Track 1&amp;quot;, 10.0, true);&lt;br /&gt;
;Notes&lt;br /&gt;
*These methods create a train from a list of vehicles in a consist array.&lt;br /&gt;
*Depending on the variant of the method used, the train can be created at a Trackmark, specified by name or reference, or at a Buildable or Industry object.&lt;br /&gt;
*It is the responsibility of the script programmer to ensure that sufficient track exists at the given location to allow the train to be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==DeleteTrain==&lt;br /&gt;
{{MethodHeader|public native void DeleteTrain(Train train)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = train to be deleted from map.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.DeleteTrain(flyingScotsman);&lt;br /&gt;
;Notes&lt;br /&gt;
*Once a train has been deleted, care should be taken to avoid using its reference.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==DeleteVehicle==&lt;br /&gt;
{{MethodHeader|public native void DeleteVehicle(Vehicle vehicle)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = vehicle to be deleted from its train.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.DeleteVehicle(vehicles[vehicles.size()-1]);&lt;br /&gt;
;Notes&lt;br /&gt;
*Use Train.GetVehicles() to obtain an array of vehicles for a given train.&lt;br /&gt;
*Use Vehicle.GetMyTrain() to obtain a train reference for a given vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FindAsset==&lt;br /&gt;
{{MethodHeader|public native Asset FindAsset(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = KUID of Asset to return.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Given a valid KUID parameter, this method return an Asset reference if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Asset asset = World.FindAsset(kuid);&lt;br /&gt;
;Notes&lt;br /&gt;
*See also Asset.FindAsset()&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FindDriverCommand==&lt;br /&gt;
{{MethodHeader|public native DriverCommand FindDriverCommand(Asset driverCommandAsset)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;driverCommandAsset&#039;&#039;&#039; = Asset containing command to be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Reference to the DriverCommand if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 DriverCommand GoFaster = World.FindDriverCommand(accelerate);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetAssetList==&lt;br /&gt;
{{MethodHeader|public native Asset[ ] GetAssetList(string kind)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kind&#039;&#039;&#039; = String representing the Kind of asset to return.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A list of all assets of the given &#039;&#039;kind&#039;&#039;&lt;br /&gt;
;Syntax&lt;br /&gt;
 Asset[] Libraries = World.GetAssetList(&amp;quot;Library&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*All installed assets of the given &#039;&#039;kind&#039;&#039; are returned, irrespective of whether or not they are in use on the current map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetBadWeatherFog==&lt;br /&gt;
{{MethodHeader|public native float GetBadWeatherFog(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Bad weather fog distance as a float in the range 0.0..1.0.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float dist = World.GetBadWeatherFog();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetBehaviors==&lt;br /&gt;
{{MethodHeader|public native ScenarioBehavior[ ] GetBehaviors(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A list of top-level behaviors or rules on the currently loaded route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ScenarioBehavior[] rules = World.GetBehaviors();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetCameraPositionX==&lt;br /&gt;
{{MethodHeader|public native float GetCameraPositionX(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*X Coordinate of the current camera position.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float X = World.GetCameraPositionX();&lt;br /&gt;
*Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetCameraPositionY==&lt;br /&gt;
{{MethodHeader|public native float GetCameraPositionY(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Y Coordinate of the current camera position.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float Y = World.GetCameraPositionY();&lt;br /&gt;
*Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetCameraPositionZ==&lt;br /&gt;
{{MethodHeader|public native float GetCameraPositionZ(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Z Coordinate of the current camera position.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float Z = World.GetCameraPositionZ();&lt;br /&gt;
*Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetCurrentModule==&lt;br /&gt;
{{MethodHeader|public native int GetCurrentModule(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An integer representing the current Trainz module.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int module = World,GetCurrentModule();&lt;br /&gt;
;Notes&lt;br /&gt;
* See [[#Trainz Modules|Trainz Modules]] for details of the constants associated with this method. &lt;br /&gt;
* See [[ModuleInit Message]] for further details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetDriverCharacterList==&lt;br /&gt;
{{MethodHeader|public native DriverCharacter[ ] GetDriverCharacterList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of DriverCharacter objects installed in the current world.&lt;br /&gt;
;Syntax&lt;br /&gt;
 DriverCharacter[] drivers = World.GetDriverCharacterList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetDriverCommandList==&lt;br /&gt;
{{MethodHeader|public native DriverCommand[ ] GetDriverCommandList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of DriverCommand objects installed in the current world.&lt;br /&gt;
;Syntax&lt;br /&gt;
 DriverCommand[] commands = World.GetDriverCommandList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetGameTime==&lt;br /&gt;
{{MethodHeader|public native float GetGameTime(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned value&lt;br /&gt;
*Current game time.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float Now = World.GetGameTime();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned time is normalised to a value between 0.0 and 1.0&lt;br /&gt;
*0.0 = midday.&lt;br /&gt;
*0.5 = midnight&lt;br /&gt;
*Use the [[#Time_Values|Time Value]] constants to convert the normalised values to human readable times.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetGoodWeatherFog==&lt;br /&gt;
{{MethodHeader|public native float GetGoodWeatherFog(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Good weather fog distance as a float in the range 0.0..1.0.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float dist = World.GetGoodWeatherFog();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetGroundDrawDistance==&lt;br /&gt;
{{MethodHeader|public native float GetGroundDrawDistance(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Ground draw distance in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float dist = World.GetGroundDrawDistance();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetIndustryList==&lt;br /&gt;
{{MethodHeader|public native GameObject[ ] GetIndustryList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the Industry objects for the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 GameObject[] Industries = World.GetIndustryList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetJunctionList==&lt;br /&gt;
{{MethodHeader|public native Junction[ ] GetJunctionList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the trackside junction objects for the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Junction[] junctions = World.GetJunctionList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Junction objects attached to fixed track junctions are not currently returned by this method.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetLibrary==&lt;br /&gt;
{{MethodHeader|public native Library GetLibrary(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = KUID of script library asset to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the script library asset if successful, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Library codelib = World.GetLibrary(LibraryKUID);&lt;br /&gt;
;Notes&lt;br /&gt;
*The [[Class Library|Library]] asset is initialised when this method is first called in a session.&lt;br /&gt;
*Since only one instance can exist, subsequent calls return a reference to the existing Library object.&lt;br /&gt;
*See [[Class Library|Library]] for notes on how to use this method.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetSceneryDrawDistance==&lt;br /&gt;
{{MethodHeader|public native float GetSceneryDrawDistance(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Scenery draw distance in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float dist = World.GetSceneryDrawDistance();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetSeconds==&lt;br /&gt;
{{MethodHeader|public native float GetSeconds(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of a floating point number incrementing once per second in real time.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float start = World.GetSeconds();&lt;br /&gt;
 // do stuff&lt;br /&gt;
 float finish = World.GetSeconds();&lt;br /&gt;
 float period = finish - start;&lt;br /&gt;
;Notes&lt;br /&gt;
*Each call will return a float value containing the current value of an internal counter.&lt;br /&gt;
*Subtracting a later value from a value saved at an earlier call will enable the delay between the two calls to be established.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetSignalList==&lt;br /&gt;
{{MethodHeader|public native Signal[ ] GetSignalList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the signal objects for the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Signal[] signals = World.GetSignalList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetStringTable==&lt;br /&gt;
{{MethodHeader|public native StringTable GetStringTable(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The StringTable for the current session.&lt;br /&gt;
;Syntax&lt;br /&gt;
 StringTable data = World.GetStringTable();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetSurveyorSavedConsist==&lt;br /&gt;
{{MethodHeader|public native Soup GetSurveyorSavedConsistList(string name)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*&#039;&#039;&#039;name&#039;&#039;&#039; = Name of the consist to retireiev.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a Soup definition of the named consist if it exists, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Soup consist = World.GetSurveyorSavedConsist(&amp;quot;Brighton Belle&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Remember that the returned data is in a Soup format, which is not the same thing as a Train. &lt;br /&gt;
*TrainUtil.CreateTrainFormSoup() can be used to create a train from the returned Soup.&lt;br /&gt;
*This method only works in Surveyor.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetSurveyorSavedConsistList==&lt;br /&gt;
{{MethodHeader|public native string[ ] GetSurveyorSavedConsistList()}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of names of all the saved consist objects in Surveyor.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string[] consists = World.GetSurveyorSavedConsistList();&lt;br /&gt;
;Notes&lt;br /&gt;
*This method only works in Surveyor.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTrackmarkList==&lt;br /&gt;
{{MethodHeader|public native TrackMark[ ] GetTrackmarkList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the trackmark objects for the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Trackmark[] trackmarks = World.GetTrackmarkList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTrainList==&lt;br /&gt;
{{MethodHeader|public native Train[ ] GetTrainList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the trains for the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train[] trains = World.GetTrainList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTrainzBuild==&lt;br /&gt;
{{MethodHeader|public native int GetTrainzBuild(void)}}&lt;br /&gt;
;Parameters;&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Gets the current build number of Trainz. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int build = World.GetTrainzBuild();&lt;br /&gt;
;Notes&lt;br /&gt;
*The value returned corresponds to the build number you can see in the bottom-right side of the main Trainz menu screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTrainzVersion==&lt;br /&gt;
{{MethodHeader|public native float GetTrainzVersion(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The TRS version number.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float version = World.GetTrainzVersion();&lt;br /&gt;
;Notes&lt;br /&gt;
*The value returned corresponds to the version number you can see in the bottom-right side of the main Trainz menu screen. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTriggerList==&lt;br /&gt;
{{MethodHeader|public native Trigger[ ] GetTriggerList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the trigger objects for the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Trigger[] triggers = World.GetTriggerList();&lt;br /&gt;
;Notes&lt;br /&gt;
*This method does not return scenery triggers, ie those attached to SceneryWithTrack objects and their descendants.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetVehicleList==&lt;br /&gt;
{{MethodHeader|public native Vehicle[ ] GetVehicleList(void)}}&lt;br /&gt;
;Parameters &lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of references to all of the vehicles in the current route.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Vehicle[] vehicles = World.GetVehicleList();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetWeatherChangeability==&lt;br /&gt;
{{MethodHeader|public native int GetWeatherChangeability(void)}}&lt;br /&gt;
;Parameter&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Weather_Changeability_Constants|Weather Changeability Constants]] denoting the variability of weather conditions.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int variability = World.GetWeatherChangeability();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetWeatherType==&lt;br /&gt;
{{MethodHeader|public native int GetWeatherType(void)}}&lt;br /&gt;
;Parameter&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Weather_Type_Constants|Weather Type Constants]] denoting the current weather conditions.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int weather = World.GetWeatherType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==LoadMap==&lt;br /&gt;
{{MethodHeader|public native bool LoadMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = KUID of map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (World.LoadMap(mapKUID) Interface.Print(&amp;quot;Map loaded OK&amp;quot;);&lt;br /&gt;
 else Interface.Print(&amp;quot;Map load failed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Play2DSound==&lt;br /&gt;
{{MethodHeader|public float Play2DSound(Asset asset, string wave)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = Asset where the sound file is located.&lt;br /&gt;
*&#039;&#039;&#039;wave&#039;&#039;&#039; = Name of the &#039;&#039;*.wav&#039;&#039; file to be played, a relative path can be included.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of the sound file in seconds.&lt;br /&gt;
;Syntax&lt;br /&gt;
 // Play the sound and continues script execution.&lt;br /&gt;
    World.Play2DSound(soundAsset,&amp;quot;sounds/allaboard.wav&amp;quot;);        &lt;br /&gt;
 // Wait until sound has completed before continuing.&lt;br /&gt;
    Sleep(World.Play2DSound(soundAsset,&amp;quot;sounds/allaboard.wav&amp;quot;)); &lt;br /&gt;
;Notes&lt;br /&gt;
*Plays a &#039;&#039;.wav&amp;quot; sound file from the given asset&#039;s folder.&lt;br /&gt;
*The sound is non directional and can be mono or stereo. &lt;br /&gt;
*This method does not return after the sound has finished playing, it returns with the length of the sound as soon as it is called. &lt;br /&gt;
*This means your code will keep on executing while Trainz is playing the sound.&lt;br /&gt;
*If you want to wait for the sound to complete playing before moving on, wrap the Play2DSound() call up in a Sleep() call.&lt;br /&gt;
*Remember that Sleep() can&#039;t always be used.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PlaySound==&lt;br /&gt;
{{MethodHeader|public native float PlaySound&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(Asset asset, string wave, float vol, float near, float far, GameObject target, string pt)&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(Asset asset, string wave, float vol, float near, float far, GameObject target, string pt, bool loop)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = Asset where the sound file is located.&lt;br /&gt;
*&#039;&#039;&#039;wave&#039;&#039;&#039; = Name of the &#039;&#039;*.wav&#039;&#039; file to be played, a relative path can be included.&lt;br /&gt;
*&#039;&#039;&#039;vol&#039;&#039;&#039; = Volume level to play the sound at&lt;br /&gt;
*&#039;&#039;&#039;near&#039;&#039;&#039; = Distance from the target asset at which the sound will be played at maximum volume.&lt;br /&gt;
*&#039;&#039;&#039;far&#039;&#039;&#039; = Distance from the target asset at which the sound will become inaudible.&lt;br /&gt;
*&#039;&#039;&#039;target&#039;&#039;&#039; = GameObject to which the sound will be attached if a 3d sound is required, null for 2D.&lt;br /&gt;
*&#039;&#039;&#039;pt&#039;&#039;&#039; = Name of attachment point in the target object if a 3d sound is required, null for 2D.&lt;br /&gt;
*&#039;&#039;&#039;loop&#039;&#039;&#039; = (Optional) If true the sound will loop continuously.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of the sound file in seconds.&lt;br /&gt;
;Syntax&lt;br /&gt;
 // Play the sound and continues script execution.&lt;br /&gt;
    World.PlaySound(soundAsset,&amp;quot;sounds/allaboard.wav&amp;quot;,1000.0,10.0,100.0,Station,&amp;quot;a.loudspeaker&amp;quot;);        &lt;br /&gt;
 // Wait until sound has completed before continuing.&lt;br /&gt;
    Sleep(World.PlaySound(soundAsset,&amp;quot;sounds/allaboard.wav&amp;quot;,1000.0,10.0,100.0,Station,&amp;quot;a.loudspeaker&amp;quot;)); &lt;br /&gt;
;Notes&lt;br /&gt;
*Plays a &#039;&#039;.wav&#039;&#039; sound file from the given asset&#039;s folder.&lt;br /&gt;
*If the sound is to be directional a mono sound file is required. &lt;br /&gt;
*This method does not return after the sound has finished playing, it returns with the length of the sound as soon as it is called. &lt;br /&gt;
*This means your code will keep on executing while Trainz is playing the sound.&lt;br /&gt;
*If you want to wait for the sound to complete playing before moving on, wrap the PlaySound() call up in a Sleep() call.&lt;br /&gt;
*Remember that Sleep() can&#039;t always be used.&lt;br /&gt;
*The sound volume will be at a maximum for a camera position at or less than the value of the &#039;&#039;near&#039;&#039; parameter and will reduce with distance until the hearing position reaches &#039;&#039;far&#039;&#039;, when the sound will be inaudible.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RemoveDriverCharacter==&lt;br /&gt;
{{MethodHeader|public native void RemoveDriverCharacter(DriverCharacter driver)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;driver&#039;&#039;&#039; = DriverCharacter to remove.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.RemoveDriverCharacter(dave);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RemoveDriverCommand==&lt;br /&gt;
{{MethodHeader|public native void RemoveDriverCommand(DriverCommand command)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;command&#039;&#039;&#039; = DriverCommand to remove.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.RemoveDriverCommand(driverCommand);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetBadWeatherFog==&lt;br /&gt;
{{MethodHeader|public native void SetBadWeatherFog(float distance)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;distance&#039;&#039;&#039; = Bad weather fog distance to set.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetBadWeatherFog(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetCamera==&lt;br /&gt;
{{MethodHeader|public native bool SetCamera(MapObject focus)&amp;lt;br&amp;gt;public native void SetCamera(Junction focus)&amp;lt;br&amp;gt;public native void SetCamera(Vehicle focus, int cameraMode)&amp;lt;br&amp;gt;public native void SetCamera(Train focus, int cameraMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;focus&#039;&#039;&#039; = Object on which the camera is to be focused.&lt;br /&gt;
*&#039;&#039;cameraMode&#039;&#039;&#039; = One of the [[#Camera_View_Modes|Camera View Mode]] constants defining the view which should be assigned to the camera.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The first variant returns a boolean to indicate success or failure.&lt;br /&gt;
*Remaining variants do not return a value&lt;br /&gt;
&#039;Syntax&lt;br /&gt;
 World.SetCamera(train.GetVehicles[0],World.CAMERA_TRACKING); // sets the camera to track the first vehicle in the train.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetCameraAngle==&lt;br /&gt;
{{MethodHeader|public void SetCameraAngle(int yaw, int pitch, float radius)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;yaw&#039;&#039;&#039; = Camera rotation in degrees, 90 is a direct front view.&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = Camera angle relative to the horizon, 0 is horizontal, 90 points vertically upwards.&lt;br /&gt;
*&#039;&#039;&#039;radius&#039;&#039;&#039; = Distance in metres to the object in focus.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetCameraAngle(90,0,25); // Sets the camera to a direct frontal view at 25 metres from the currently focused object.&lt;br /&gt;
;Notes&lt;br /&gt;
*&#039;&#039;Radius&#039;&#039; is measured from the object origin point (0,0,0).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetCameraFlags==&lt;br /&gt;
{{MethodHeader|public native void SetCameraFlags(int flags)}}&lt;br /&gt;
;Parameter&lt;br /&gt;
*&#039;&#039;&#039;flags&#039;&#039;&#039;  integer value defining what the user is permitted to do with the game camera.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 // User is permitted to select External or Tracking views only.&lt;br /&gt;
    World.SetCameraFlags(World.CAMERA_EXTERNAL | World.CAMERA_TRACKING);&lt;br /&gt;
;Notes&lt;br /&gt;
*Use any combination of [[#Camera_Flags|Camera Flags]] and [[#Camera_View_Modes|Camera View Modes]] to set the parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetCameraMode==&lt;br /&gt;
{{MethodHeader|public void SetCameraMode(int mode)}}&lt;br /&gt;
;Parameter&lt;br /&gt;
*&#039;&#039;&#039;mode&#039;&#039;&#039; = Camera mode to select.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetCameraMode(World.CAMERA_TRACKING);&lt;br /&gt;
;Notes&lt;br /&gt;
*Use one of the [[#Camera_View_Modes|Camera View Modes]] to set the parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetGameTime==&lt;br /&gt;
{{MethodHeader|public void SetGameTime(float time)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;time&#039;&#039;&#039; = new gane time to set.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetGameTime(0.5);  // sets time to midnight&lt;br /&gt;
;Notes&lt;br /&gt;
*Game time is normalised to a value between 0.0 and 1.0&lt;br /&gt;
*0.0 = midday.&lt;br /&gt;
*0.5 = midnight&lt;br /&gt;
*Use the [[#Time_Values|Time Value]] constants to convert human readable times to normalised values. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetGameTimeRate==&lt;br /&gt;
{{MethodHeader|public native void SetGameTimeRate(float rate)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;rate&#039;&#039;&#039; = New time rate to set.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetGameTimeRate(World.TIME_RATE_8X); // sets game time to advance by 8 minutes per minute of real world time.&lt;br /&gt;
;Notes&lt;br /&gt;
*Use one of the [[#Time_Rate_Constants|Time Rate Constants]] to define the parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetGoodWeatherFog==&lt;br /&gt;
{{MethodHeader|public native void SetGoodWeatherFog(float distance)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;distance&#039;&#039;&#039; = Good weather fog distance to set.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetGoodWeatherFog(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetGroundDrawDistance==&lt;br /&gt;
{{MethodHeader|public native void SetGroundDrawDistance(float distance)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;distance&#039;&#039;&#039; = Ground draw distance in metres.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetGroundDrawDistance(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Compatibility warning: Use of this function is not recommended, it may become non-functional in future Trainz versions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetSceneryDrawDistance==&lt;br /&gt;
{{MethodHeader|public native void SetSceneryDrawDistance(float distance)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;distance&#039;&#039;&#039; = Scenery draw distance in metres.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetSceneryDrawDistance(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Compatibility warning: Use of this function is not recommended, it may become non-functional in future Trainz versions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetTargetObserver==&lt;br /&gt;
{{MethodHeader|public void SetTargetObserver(GameObject observer)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;observer&#039;&#039;&#039; = ?&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 ?&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;One of the great unsolved mysteries of Trainz&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetWeather==&lt;br /&gt;
{{MethodHeader|public native void SetWeather(int type, int changeability)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;type&#039;&#039;&#039; = Weather conditions as defined by one of the [[#Weather_Type_Constants|Weather Type Constants]].&lt;br /&gt;
*&#039;&#039;&#039;change&#039;&#039;&#039; = Weather variation as defined by one of the [[#Weather_Changeability_Constants|Weather Changeability Constants]].&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.SetWeather(World.WEATHER_TYPE_HEAVY_SNOW,World.WEATHER_CHANGEABILITY_EXTREME); // April in Paris.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UserSetCamera==&lt;br /&gt;
{{MethodHeader|public native bool UserSetCamera(GameObject target)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;target&#039;&#039;&#039; = GameObject to set focus to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.UserSetCamera(Router,GetGameObject(&amp;quot;Junction 5&amp;quot;));&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UserSetCameraMode==&lt;br /&gt;
{{MethodHeader|public native void UserSetCameraMode(int mode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mode&#039;&#039;&#039; = One of the [[#Camera_View_Modes|Camera View Modes]]&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 World.UserSetCameraMode(World.CAMERA_ROAMING);  // switches to roaming view if permitted.&lt;br /&gt;
;Notes&lt;br /&gt;
*This method respects the current [[#Camera_Flags|Camera Flag]] settings, disallowing any change which the flags do not permit.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Dap</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Content&amp;diff=303</id>
		<title>Content</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Content&amp;diff=303"/>
		<updated>2009-01-12T05:01:58Z</updated>

		<summary type="html">&lt;p&gt;Dap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page aims to list and describe all content available for [[TS2009]].&lt;br /&gt;
&lt;br /&gt;
Content detail pages should have a &#039;Content/&#039; prefix and are linked by inclusion in one of the following categories. Each individual content page should include a description of the content including real-life photos, compatibility and usage information, a link to the content creator&#039;s wiki page and a download station helper link. It is recommended that content detail pages do not include off-site links, as Trainz users will not be able to follow these. &lt;br /&gt;
&lt;br /&gt;
* [[:Category:Rolling Stock]]&lt;br /&gt;
* [[:Category:Scenery]]&lt;br /&gt;
* [[:Category:Routes]]&lt;br /&gt;
* [[:Category:Scripts]]&lt;br /&gt;
* [[:Category:Track]]&lt;br /&gt;
* [[:Category:Operations]]&lt;/div&gt;</summary>
		<author><name>Dap</name></author>
	</entry>
</feed>