<?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=Tram+%28legacy+26267%29</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=Tram+%28legacy+26267%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/wiki/Special:Contributions/Tram_(legacy_26267)"/>
	<updated>2026-11-06T00:30:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3246</id>
		<title>Script Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3246"/>
		<updated>2011-12-19T10:29:00Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is where the [[scripting]] community gets to post all their API feature requests. Request any additions that you think will enhance the game. Things to keep in mind:&lt;br /&gt;
* We are unlikely to add a feature which breaks any existing content.&lt;br /&gt;
* Script is for control purposes, and is not intended to enable significant modifications to the underlying game engine. We are very unlikely to introduce a feature where the obvious uses are going to result in significant performance penalties.&lt;br /&gt;
* We are far more likely to add features which are directly blocking something that the community is working on. If you have something cool, and need just a few minor additions then please detail what you&#039;re working on (ideally, on another wiki page linked from both here and your [[Content Creation Groups]] page) and why you need the additions.&lt;br /&gt;
* [[MiniBrowser]] requests should go on the separate [[MiniBrowser Feature Requests]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requests==&lt;br /&gt;
Requests are placed in this section by the community, for discussion and possible inclusion.&lt;br /&gt;
&lt;br /&gt;
* Add a method that will let you identify the industry at which a vehicle is located. If an industry track section can also carry the industry identifier, it would be most helpful.&lt;br /&gt;
&lt;br /&gt;
* Add a handle to allow a custom bell animation to be played when the bell is played on a locomotive (Vehicle.StartBell() and Vehicle.StopBell(), perhaps?).  Justification: Script can currently listen for the bell message, but since the message is a toggle, it is easy to get out of synch with the true state of the bell. For example, when coupling a locomotive whose bell is ringing to a locomotive whose bell is not ringing, the end result depends on which locomotive is currently in focus. - Curtis&lt;br /&gt;
&lt;br /&gt;
* Be able to interact with the outside world: ability to create a basic Socket or some form of a StreamReader/Writer to write to files or send messages via the network. -Roman&lt;br /&gt;
&lt;br /&gt;
* Scale the visible bulk load animation on a traincar such that it takes Vehicle.GetLoadTime() to complete.  For example, if Vehicle.GetLoadTime() returns 5 seconds, the bulk animation would take 5 seconds to transition from the full state to the empty state.  This would be useful for industries that take more than one second to load / unload a car, as the visible load animation could be synced more closely with the industry animation. -Curtis&lt;br /&gt;
&lt;br /&gt;
* SetMeshPosition(&amp;quot;meshname&amp;quot;, x,y,z) absolute positioning of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;This exists ~Andi&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Not necessarily - we support relative positioning, not absolute. This may or may not achieve what he wants.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* GetMeshPosition(&amp;quot;meshname&amp;quot;, &amp;quot;x&amp;quot;)[&amp;quot;Y&amp;quot;][&amp;quot;Z&amp;quot;] receive the absolute position of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;Since you have used SetMeshPosition() to move the mesh, this is unneccessary&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Absolute position can be set in Surveyor. Relative position can be set in the [[config.txt file]]. I wouldn&#039;t say that this is completely unnecessary.&#039;&#039; ~chris&lt;br /&gt;
::: Thanks a lot for MapObject.GetMapObjectPosition() and MapObject.GetMapObjectOrientation() ~tram&lt;br /&gt;
&lt;br /&gt;
* Extension to the function World.GetAssetList(string kind, bool OnlyIfUsedInCurrentMap) -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to play an avi and wait for it to finsh (no user interaction allowed) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Ability to load a menu asset directly from the command line ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* The ability to modify scenery trigger radii on the fly in script. This is really aimed at crossings so that train detection can be varied in line with track speed limits.  -Andi06&lt;br /&gt;
&lt;br /&gt;
* A method of refreshing the Property Browser to take account of any change in the target object&#039;s name during a property editing session. (Objects which have &#039;autoname 1&#039; in config will often be renamed by the user.  In some circumstances I am using the object name to set other properties. Typically an object might be created as &#039;Double Slip 1&#039; and might refer to its constituent nodes as &#039;Double Slip 1,Track 1&#039;.  This is to enable other objects to refer to it in a user friendly way.  On a name change the Property Browser continues to use the old name until the browser has been closed and reopened.  This is counter intuitive) -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability for a script to be able to read/change loco/rolling stock parameters (ie to simulate one loco losing air etc etc etc) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Need to be able to detect if the user has turn off logging ie -nolog as people forget that they have done it and we log diagnostics if there is a problem. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* SetFXCoronaTexture() A means of resetting to config.txt defaults.&lt;br /&gt;
&lt;br /&gt;
* At the moment we are using F8 as out deadman switch. Would like two key bindings &#039;User1&#039; &#039;User2&#039; that sends a message the same style as F8 does (with User1 &amp;amp; User2 as the minor) so that we can do the deadman and a hud control. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Be able to play mp3 as well as wav. ~Jenolan&lt;br /&gt;
: &#039;&#039;I&#039;ve been able to do this where the asset doing the playing is a script library, I had Acker Bilk coming over a station tannoy at one point.  Not sure why it doesn&#039;t seem to work elsewhere. -Andi&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Interface.MessageBox(Caption,Text), calling up a small browser with a close button would be helpful, especially for novices. Interface.Print() is a monumental PITA because it prints out upside down, doesn&#039;t hold enough lines, and only works in Driver. For sure its possible to write your own version of this but browsers aren&#039;t all that easy to get your head around and its a very basic facility that should be built in. -Andi&lt;br /&gt;
&lt;br /&gt;
* A standard config.txt tag &#039;junction-type normal/singleslip/doubleslip&#039; etc together with a spec for construction and behaviour might be helpful. I already have a complete schema for this. -Andi&lt;br /&gt;
: &#039;&#039;Uncertain what you&#039;re expecting to achieve here? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Is it possible to make a mesh available which matches the existing graphic direction indicators, it appears to be some sort of directional corona or variant. If not could a new marker mesh be developed that could be used with both types? The existing one has nasty alpha effects in any case. -Andi&lt;br /&gt;
&lt;br /&gt;
* Minimap Support, don&#039;t care personally but some will. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to dynamically change the length of a piece of rolling stock as part of the load / unload process; to support logging disconnects (see http://www.trainzone.co.nz/logging.htm for examples)- Curtis&lt;br /&gt;
: &#039;&#039;This is an interesting concept, but sounds difficult to implement. I can&#039;t think of any way of adjusting the length unless it was the end item of a consist, since adjustment at any other time would require displacing the remainder of the consist. Could you expand on your ideas please.&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;The entire car, including lmfront &amp;amp; lmback, would be part of the loading / unloading animation. When loading, it would probably be necessary to displace the consist by moving one of the ends - perhaps the end with the locomotive? Potential issue: if when loading, the increase in consist length causes the end of the consist to run off the end of the track or collide with another train.  When unloading, you could break the consist at either or both lmfront / lmback - whichever move as part of the unloading animation.&#039;&#039; - Curtis&lt;br /&gt;
: &#039;&#039;May be simpler to just break the consist at both lmfront and lmback; centering the car in-between the two halves. -Curtis&lt;br /&gt;
&lt;br /&gt;
*Allow SetFXNameText(effect,text) to accept an empty string in the second parameter - Reason: It&#039;s really irritating having to write workarounds for this. ~Andi&lt;br /&gt;
&lt;br /&gt;
*Turntables: Write access to the &amp;quot;angle&amp;quot; tag array in script.  Now that TrackSearch will allow me to find out what is attached to a Turntable it would be nice to extend my turntable kit to disallow non existent connections. ~Andi&lt;br /&gt;
&lt;br /&gt;
*SetMeshScale(X,Y,Z) and corresponding config tags. Positive or negative values would implement mesh mirroring at the same time. As an example of potential a placement option for trees might allow random scale factors (within reasonable limits) and random rotation.  Each tree placed would then vary in size, shape and rotation getting much more variation from the same mesh asset. ~Andi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Update to product loading / unloading functionality to allow incremental loads and unloads.&lt;br /&gt;
:Potential usages:  &lt;br /&gt;
:- Animation that plays once per item being loaded; such as a forklift carrying a crate to a boxcar, or a crane lifting a log to a flatcar.&lt;br /&gt;
:- Allow dynamic load times of bulk loads (small cars load faster than large cars), with the animated load rising / lowering synchronously.&lt;br /&gt;
&lt;br /&gt;
:Potential implementation:&lt;br /&gt;
:Extend vehicle.LoadProduct(report,units) where units = integer number of queue to be loaded each increment.  0 would be everything, defaulting to current LoadProduct() behavior, and add additional calls BeginIncrementalLoad(), EndIncrementalLoad(), BeginIncrementalUnload(), and EndIncrementalUnload().&lt;br /&gt;
&lt;br /&gt;
:During a load operation that loads 3 increments (units=1, target queue on the car = 3), the flow would look like:&lt;br /&gt;
 BeginLoad() // open car doors; station doors&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad() //  start loading animation, start sounds; pfx; add any delays&lt;br /&gt;
 TransferProductFrom() // maximumToTransfer = units&lt;br /&gt;
 EndIncrementalLoad() // animate forklift returning to station / end sounds / pfx / other cleanup&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 EndLoad() // close car &amp;amp; station doors&lt;br /&gt;
&lt;br /&gt;
* Ability to add a vehicle to an existing consist like Vehicle.Reposition( Train, MyCouple, OtherCouple ) this would save needing a work track mark to add vehicles which would be very helpful ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Extension to AddHandler to allow this syntax: AddHandler(target,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;MessageHandler&amp;quot;), passing all messages to the specified handler, for justification see discussion page. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to store any information along with the layout and not the session (i.e. &#039;&#039;PropertyObject.SetLayoutProperties&#039;&#039; and &#039;&#039;PropertyObject.GetLayoutProperties&#039;&#039;, taking/returning &#039;&#039;Soup&#039;&#039; objects respectively). Rationale: the non-existence is a major drawback with configurable signals - [[User:Klausm|Klausm]]&lt;br /&gt;
&lt;br /&gt;
* Ability for an asset to be able to change and save it&#039;s local soup (ie stringtable) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Access to asset location, height, rotation in script.  This came up twice - once when I wanted to keep traffic lights upright when the containing asset is rolled, and once when I wanted to add simple real time ground shadows to assets. -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to arbitrarily add an attachment point to an item. To allow things like FRED/BOG sundry animations and so on ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Not really script. A generic clickable mesh object, its an easy hack using a fixedtrack junction but it would nice to have an official version - click on the engine shed to open the doors, click on the signal box to open a track browser etc etc. Mappable click regions too if its not too much to ask :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* On a similar note is there any chance you might amend the Exception dialogue to specify the object, (or even the Asset) which is causing the exception :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* Extension/Alternative to World.GetJunctionList to return fixed track junction objects or nodes, I can script this easily for objects using my library but this would not be the case for all junctions. -Andi&lt;br /&gt;
&lt;br /&gt;
* World.Play2DSound(Asset,filename) allows sound files to be saved in a &#039;sound library&#039; asset and avoids duplication.  Can we have a similar facility for images to be used in html assets.  A lot of the dependencies that I use are images and icons.  I&#039;m consciously trying to avoid this now - its the source of much pain - but to do this for the Junction Kit for instance I would have to have copies of all necessary images in all of the placeable assets (there are more than 50) If I could simply keep one copy in the script library it would save much bandwidth, diskspace and support. -Andi06&lt;br /&gt;
&lt;br /&gt;
* genesteal : methods applied to current train, may be class world.gs:&lt;br /&gt;
- Train.GetNextSignal() : return next Signal same direction, distance and signal state.&lt;br /&gt;
- Train.GetNextExSignal() : the same for extended states&lt;br /&gt;
- Train.GetNextTrackside () : return next trackside same direction, distance, speedlimit if exists.&lt;br /&gt;
- Train.GetNextJunction () : return next junction, distance and direction.&lt;br /&gt;
&lt;br /&gt;
* genesteal : cab features.&lt;br /&gt;
- methods for ligth controls in cabin : Control.SetFlash (float frequency).Make the control visible/invisible on the intervall frequency. may be Meshobjects.gs for more general purpose. The same for texture swapping in texture replacement.&lt;br /&gt;
- New conrol cab &amp;quot;button&amp;quot; with vertical translation limit : method set and get value as usual, method for &amp;quot;while depressed&amp;quot; behavior: Setdepressed ( method to run).&lt;br /&gt;
&lt;br /&gt;
- Speedlimiter method : Set a speedlimit replacing the max speed possible on cab mode.(engine)&lt;br /&gt;
&lt;br /&gt;
- Set engine methods : &lt;br /&gt;
Locomotive.SwapEngine(kuid); replace engine by another for a locomotive. feature existing on actual loco to set a traction service if the loco have to drive freight or passengers consists. This method can replace speedlimit above and may be more accurate : speedlimit and power will be set together as prototypical setting before a journey. &lt;br /&gt;
- Locomotive.EngineStop(): stops the enginesound  and play a stop.wav, located in enginesound folder.&lt;br /&gt;
- Locomotive.EngineStart() : starts enginesound like this : play  a start.wav located in enginesound folder, then idle 0.wav.&lt;br /&gt;
&lt;br /&gt;
* Allow function Vehicle.SetTractionMultiplier(float) to set multiplier to 0. ~Mike&lt;br /&gt;
: UPD: sorry, misunderstood functionality of this function. But could there be a method to disable traction on locos?&lt;br /&gt;
&lt;br /&gt;
* Ability to change (or only to reduce) the presure in auxilary reservoir of a vehicle. This provides a way to create different types of tripte valves for long-length trains (~70  vehicles), where using Train.SetVelocity() is unrealistic&lt;br /&gt;
&lt;br /&gt;
* Pass ALL keystroke information to the cab/cabin script. Currently only a subset of the keys usable are passed to the script methods meaning the cab script cannot react to all the users control requests and the range of controls is not extensible. -eldavo&lt;br /&gt;
: &#039;&#039;Please provide more information on what you want here. Which keys are you missing out on that you actually need?&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;At this time Trainz does not passes via Cabin.UserPressKey(string) large number of keyboard shortcuts defined in file Settings/keyboard.txt. This makes difficult to override default cabin implementation and defining custom functions to keys.&#039;&#039; -Mike&lt;br /&gt;
:: &#039;&#039;As above, please provide specifics. We will not be simply passing through all keyboard information because this breaks localisation support. We may be able to help with specific requests.&#039;&#039; ~chris&lt;br /&gt;
:::&#039;&#039;Marked as rejected due to lack of updates.&#039;&#039; ~chris&lt;br /&gt;
:::: &#039;&#039;train_cabin_brake_release, train_cabin_brake_lap, train_cabin_indbrake_toggle, train_cabin_dyn_toggle, etc. combinations are not passed through UserPressKey. I request to pass all strings defined in keyboard.txt file through cabin script. Also, it would be nice to have messages about pressed keys with minor string like UserPressKey parameter.&#039;&#039; ~Mike&lt;br /&gt;
&lt;br /&gt;
* How about adding to the trigger events. A new message sent when a train starts moving within the trigger would be especially usefull for animating doors and other objects which need to change if there is a change from stopped to moving. Another variation of working doors is if the trigger could monitor the trains bell. In real railroad operations a train tipically signals that it is about to move by turning on the bell and tooting the horn. So the train in a trigger sending the trigger &#039;bell on&#039; or &#039;bell off&#039; could be usefule because it would give the user some control over the animation. ~bigdave7533&lt;br /&gt;
&lt;br /&gt;
* Make in addition to Vehice.GetTrackGradient() also float Vehice.GetTrackCurveRadius() whitch return 0 for straight sections of track (instead of infinity). ~tram&lt;br /&gt;
* Make a way to determinate, if a vehicle is removed from the map (for example, using portals). Now external link returns non-zero value, but any function called results in an error. ~tram&lt;br /&gt;
* Make a function to determinate, if a MapObject is closer to the camera, than specified distance.  ~tram&lt;br /&gt;
* Make a function for smooth control of &amp;quot;soundscript&amp;quot;&#039;s sound volume. For example like void MapObject.SetSoundScriptVolume(string soundTrigger, float NewVolume, float Duration).  ~tram&lt;br /&gt;
&lt;br /&gt;
==Complete==&lt;br /&gt;
* Simple destructor routine, or some other method of receiving notification of the deletion of scripted objects during a Surveyor session. (In the absence of World.GetJunctionBaseList() my new junction objects are maintaining a list of fixedtrack junctions via library calls in the Init() method of each object.  Apart from using the list myself, it is intended to be returned on demand to any script making the appropriate LibraryCall.  Since I have no way of telling that an object has been deleted, I need to rescan the entire list before returning it to ensure that each object still exists, this seems a touch inefficient when it could be easily kept up to date without a complete parse) -Andi&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* The ability for [[TrackSearch]] to return the trigger or track reference found for SceneryWithTrack descendants, including turntables and the ability to initiate a search from a specified trigger or track in SceneryWithTrack descendants.  A million reasons for this including trains being able to detect which track of an industry they can see in a proposed &#039;Call-At All Stations&#039; rule. -Andi06&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Compatibility of the [[TrackSearch]] with the animated fixed junctions. When I first got TRS2006 in my hands, I tried out my TrackView rule, but quickly discovered that it was impossible to find out the track topology (forgot the exact details, though) - [[User:Klausm|Klausm]]&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Extensions to TrackSearch()/GSTrackSearch() covered elsewhere to be sufficient to allow the topography of multi node junctions to be fully discovered. -Andi&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
*If we are going to use radians now (SetMeshOrientation()) could we please have PI?&lt;br /&gt;
:&#039;&#039;Math.PI&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Ability to configure permit structure to allow multi node junctions to coexist with the AI, whilst denying conflicting paths, as discussed above. -Andi&lt;br /&gt;
:&#039;&#039;Added named mutex support for attached junctions. See [[KIND SceneryWithTrack]].&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Fix World.GetAssetList(&amp;quot;texture-group&amp;quot;), this has been broken since TRS2004. -Andi06&lt;br /&gt;
:&#039;&#039;Now returns all assets with category-class &#039;JO&#039;. This seems to contain all &#039;texture-group&#039; type assets - though there maybe some unexpected extras.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to detect the use of &#039;Pause&#039; easily (a message would do) to stop cheating in shunting puzzles ~Jenolan&lt;br /&gt;
:&#039;&#039;New messages &amp;quot;World&amp;quot;, &amp;quot;Paused&amp;quot; and &amp;quot;World&amp;quot;, &amp;quot;Unpaused&amp;quot; now exist and should be broadcast at the appropriate times.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* World.GetCurrentTrain() Not essential obviously but it would save a lot of work. -Andi06&lt;br /&gt;
:&#039;&#039;Now exists.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to optionally detect mouseclick/ Keys [J] &amp;amp; [^J] without switching the junction. This can be hacked by making node 0 an invisible junction, but this will result in other objects querying the junction structure not getting the answer they expect (or not one they can understand). This is needed to allow objects with more than one junction node to cycle through their options in response to the user. -Andi&lt;br /&gt;
:&#039;&#039;I believe this is now possible via script overrides on the map object in question.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* A method of subclassing or outright using a script from another asset (ie. a script which is written once and reused heavily, allowing any fixes to be released as a single asset update.) - chris&lt;br /&gt;
:&#039;&#039;TS2009 now has the ability to cross-include scripts from another asset.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Dreamland, a new message: &#039;&#039;Junction,AboutToToggle&#039;&#039; -Andi&lt;br /&gt;
: &#039;&#039;How do you expect to act on this? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
::&#039;I believe this concept has been fulfilled via the UserRequestToggle overrides.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Rejected==&lt;br /&gt;
If there&#039;s a request that we&#039;re clearly not going to entertain at the current time, we&#039;ll move it to here. This includes both flat rejections and also requests which sound good but won&#039;t be done for the next version of Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Rejected Script Feature Requests]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Feature Request]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3245</id>
		<title>Script Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3245"/>
		<updated>2011-12-19T10:21:14Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is where the [[scripting]] community gets to post all their API feature requests. Request any additions that you think will enhance the game. Things to keep in mind:&lt;br /&gt;
* We are unlikely to add a feature which breaks any existing content.&lt;br /&gt;
* Script is for control purposes, and is not intended to enable significant modifications to the underlying game engine. We are very unlikely to introduce a feature where the obvious uses are going to result in significant performance penalties.&lt;br /&gt;
* We are far more likely to add features which are directly blocking something that the community is working on. If you have something cool, and need just a few minor additions then please detail what you&#039;re working on (ideally, on another wiki page linked from both here and your [[Content Creation Groups]] page) and why you need the additions.&lt;br /&gt;
* [[MiniBrowser]] requests should go on the separate [[MiniBrowser Feature Requests]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requests==&lt;br /&gt;
Requests are placed in this section by the community, for discussion and possible inclusion.&lt;br /&gt;
&lt;br /&gt;
* Add a method that will let you identify the industry at which a vehicle is located. If an industry track section can also carry the industry identifier, it would be most helpful.&lt;br /&gt;
&lt;br /&gt;
* Add a handle to allow a custom bell animation to be played when the bell is played on a locomotive (Vehicle.StartBell() and Vehicle.StopBell(), perhaps?).  Justification: Script can currently listen for the bell message, but since the message is a toggle, it is easy to get out of synch with the true state of the bell. For example, when coupling a locomotive whose bell is ringing to a locomotive whose bell is not ringing, the end result depends on which locomotive is currently in focus. - Curtis&lt;br /&gt;
&lt;br /&gt;
* Be able to interact with the outside world: ability to create a basic Socket or some form of a StreamReader/Writer to write to files or send messages via the network. -Roman&lt;br /&gt;
&lt;br /&gt;
* Scale the visible bulk load animation on a traincar such that it takes Vehicle.GetLoadTime() to complete.  For example, if Vehicle.GetLoadTime() returns 5 seconds, the bulk animation would take 5 seconds to transition from the full state to the empty state.  This would be useful for industries that take more than one second to load / unload a car, as the visible load animation could be synced more closely with the industry animation. -Curtis&lt;br /&gt;
&lt;br /&gt;
* SetMeshPosition(&amp;quot;meshname&amp;quot;, x,y,z) absolute positioning of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;This exists ~Andi&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Not necessarily - we support relative positioning, not absolute. This may or may not achieve what he wants.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* GetMeshPosition(&amp;quot;meshname&amp;quot;, &amp;quot;x&amp;quot;)[&amp;quot;Y&amp;quot;][&amp;quot;Z&amp;quot;] receive the absolute position of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;Since you have used SetMeshPosition() to move the mesh, this is unneccessary&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Absolute position can be set in Surveyor. Relative position can be set in the [[config.txt file]]. I wouldn&#039;t say that this is completely unnecessary.&#039;&#039; ~chris&lt;br /&gt;
::: And how to get this &amp;quot;absolute position&amp;quot;? ~tram&lt;br /&gt;
&lt;br /&gt;
* Extension to the function World.GetAssetList(string kind, bool OnlyIfUsedInCurrentMap) -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to play an avi and wait for it to finsh (no user interaction allowed) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Ability to load a menu asset directly from the command line ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* The ability to modify scenery trigger radii on the fly in script. This is really aimed at crossings so that train detection can be varied in line with track speed limits.  -Andi06&lt;br /&gt;
&lt;br /&gt;
* A method of refreshing the Property Browser to take account of any change in the target object&#039;s name during a property editing session. (Objects which have &#039;autoname 1&#039; in config will often be renamed by the user.  In some circumstances I am using the object name to set other properties. Typically an object might be created as &#039;Double Slip 1&#039; and might refer to its constituent nodes as &#039;Double Slip 1,Track 1&#039;.  This is to enable other objects to refer to it in a user friendly way.  On a name change the Property Browser continues to use the old name until the browser has been closed and reopened.  This is counter intuitive) -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability for a script to be able to read/change loco/rolling stock parameters (ie to simulate one loco losing air etc etc etc) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Need to be able to detect if the user has turn off logging ie -nolog as people forget that they have done it and we log diagnostics if there is a problem. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* SetFXCoronaTexture() A means of resetting to config.txt defaults.&lt;br /&gt;
&lt;br /&gt;
* At the moment we are using F8 as out deadman switch. Would like two key bindings &#039;User1&#039; &#039;User2&#039; that sends a message the same style as F8 does (with User1 &amp;amp; User2 as the minor) so that we can do the deadman and a hud control. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Be able to play mp3 as well as wav. ~Jenolan&lt;br /&gt;
: &#039;&#039;I&#039;ve been able to do this where the asset doing the playing is a script library, I had Acker Bilk coming over a station tannoy at one point.  Not sure why it doesn&#039;t seem to work elsewhere. -Andi&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Interface.MessageBox(Caption,Text), calling up a small browser with a close button would be helpful, especially for novices. Interface.Print() is a monumental PITA because it prints out upside down, doesn&#039;t hold enough lines, and only works in Driver. For sure its possible to write your own version of this but browsers aren&#039;t all that easy to get your head around and its a very basic facility that should be built in. -Andi&lt;br /&gt;
&lt;br /&gt;
* A standard config.txt tag &#039;junction-type normal/singleslip/doubleslip&#039; etc together with a spec for construction and behaviour might be helpful. I already have a complete schema for this. -Andi&lt;br /&gt;
: &#039;&#039;Uncertain what you&#039;re expecting to achieve here? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Is it possible to make a mesh available which matches the existing graphic direction indicators, it appears to be some sort of directional corona or variant. If not could a new marker mesh be developed that could be used with both types? The existing one has nasty alpha effects in any case. -Andi&lt;br /&gt;
&lt;br /&gt;
* Minimap Support, don&#039;t care personally but some will. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to dynamically change the length of a piece of rolling stock as part of the load / unload process; to support logging disconnects (see http://www.trainzone.co.nz/logging.htm for examples)- Curtis&lt;br /&gt;
: &#039;&#039;This is an interesting concept, but sounds difficult to implement. I can&#039;t think of any way of adjusting the length unless it was the end item of a consist, since adjustment at any other time would require displacing the remainder of the consist. Could you expand on your ideas please.&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;The entire car, including lmfront &amp;amp; lmback, would be part of the loading / unloading animation. When loading, it would probably be necessary to displace the consist by moving one of the ends - perhaps the end with the locomotive? Potential issue: if when loading, the increase in consist length causes the end of the consist to run off the end of the track or collide with another train.  When unloading, you could break the consist at either or both lmfront / lmback - whichever move as part of the unloading animation.&#039;&#039; - Curtis&lt;br /&gt;
: &#039;&#039;May be simpler to just break the consist at both lmfront and lmback; centering the car in-between the two halves. -Curtis&lt;br /&gt;
&lt;br /&gt;
*Allow SetFXNameText(effect,text) to accept an empty string in the second parameter - Reason: It&#039;s really irritating having to write workarounds for this. ~Andi&lt;br /&gt;
&lt;br /&gt;
*Turntables: Write access to the &amp;quot;angle&amp;quot; tag array in script.  Now that TrackSearch will allow me to find out what is attached to a Turntable it would be nice to extend my turntable kit to disallow non existent connections. ~Andi&lt;br /&gt;
&lt;br /&gt;
*SetMeshScale(X,Y,Z) and corresponding config tags. Positive or negative values would implement mesh mirroring at the same time. As an example of potential a placement option for trees might allow random scale factors (within reasonable limits) and random rotation.  Each tree placed would then vary in size, shape and rotation getting much more variation from the same mesh asset. ~Andi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Update to product loading / unloading functionality to allow incremental loads and unloads.&lt;br /&gt;
:Potential usages:  &lt;br /&gt;
:- Animation that plays once per item being loaded; such as a forklift carrying a crate to a boxcar, or a crane lifting a log to a flatcar.&lt;br /&gt;
:- Allow dynamic load times of bulk loads (small cars load faster than large cars), with the animated load rising / lowering synchronously.&lt;br /&gt;
&lt;br /&gt;
:Potential implementation:&lt;br /&gt;
:Extend vehicle.LoadProduct(report,units) where units = integer number of queue to be loaded each increment.  0 would be everything, defaulting to current LoadProduct() behavior, and add additional calls BeginIncrementalLoad(), EndIncrementalLoad(), BeginIncrementalUnload(), and EndIncrementalUnload().&lt;br /&gt;
&lt;br /&gt;
:During a load operation that loads 3 increments (units=1, target queue on the car = 3), the flow would look like:&lt;br /&gt;
 BeginLoad() // open car doors; station doors&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad() //  start loading animation, start sounds; pfx; add any delays&lt;br /&gt;
 TransferProductFrom() // maximumToTransfer = units&lt;br /&gt;
 EndIncrementalLoad() // animate forklift returning to station / end sounds / pfx / other cleanup&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 EndLoad() // close car &amp;amp; station doors&lt;br /&gt;
&lt;br /&gt;
* Ability to add a vehicle to an existing consist like Vehicle.Reposition( Train, MyCouple, OtherCouple ) this would save needing a work track mark to add vehicles which would be very helpful ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Extension to AddHandler to allow this syntax: AddHandler(target,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;MessageHandler&amp;quot;), passing all messages to the specified handler, for justification see discussion page. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to store any information along with the layout and not the session (i.e. &#039;&#039;PropertyObject.SetLayoutProperties&#039;&#039; and &#039;&#039;PropertyObject.GetLayoutProperties&#039;&#039;, taking/returning &#039;&#039;Soup&#039;&#039; objects respectively). Rationale: the non-existence is a major drawback with configurable signals - [[User:Klausm|Klausm]]&lt;br /&gt;
&lt;br /&gt;
* Ability for an asset to be able to change and save it&#039;s local soup (ie stringtable) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Access to asset location, height, rotation in script.  This came up twice - once when I wanted to keep traffic lights upright when the containing asset is rolled, and once when I wanted to add simple real time ground shadows to assets. -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to arbitrarily add an attachment point to an item. To allow things like FRED/BOG sundry animations and so on ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Not really script. A generic clickable mesh object, its an easy hack using a fixedtrack junction but it would nice to have an official version - click on the engine shed to open the doors, click on the signal box to open a track browser etc etc. Mappable click regions too if its not too much to ask :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* On a similar note is there any chance you might amend the Exception dialogue to specify the object, (or even the Asset) which is causing the exception :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* Extension/Alternative to World.GetJunctionList to return fixed track junction objects or nodes, I can script this easily for objects using my library but this would not be the case for all junctions. -Andi&lt;br /&gt;
&lt;br /&gt;
* World.Play2DSound(Asset,filename) allows sound files to be saved in a &#039;sound library&#039; asset and avoids duplication.  Can we have a similar facility for images to be used in html assets.  A lot of the dependencies that I use are images and icons.  I&#039;m consciously trying to avoid this now - its the source of much pain - but to do this for the Junction Kit for instance I would have to have copies of all necessary images in all of the placeable assets (there are more than 50) If I could simply keep one copy in the script library it would save much bandwidth, diskspace and support. -Andi06&lt;br /&gt;
&lt;br /&gt;
* genesteal : methods applied to current train, may be class world.gs:&lt;br /&gt;
- Train.GetNextSignal() : return next Signal same direction, distance and signal state.&lt;br /&gt;
- Train.GetNextExSignal() : the same for extended states&lt;br /&gt;
- Train.GetNextTrackside () : return next trackside same direction, distance, speedlimit if exists.&lt;br /&gt;
- Train.GetNextJunction () : return next junction, distance and direction.&lt;br /&gt;
&lt;br /&gt;
* genesteal : cab features.&lt;br /&gt;
- methods for ligth controls in cabin : Control.SetFlash (float frequency).Make the control visible/invisible on the intervall frequency. may be Meshobjects.gs for more general purpose. The same for texture swapping in texture replacement.&lt;br /&gt;
- New conrol cab &amp;quot;button&amp;quot; with vertical translation limit : method set and get value as usual, method for &amp;quot;while depressed&amp;quot; behavior: Setdepressed ( method to run).&lt;br /&gt;
&lt;br /&gt;
- Speedlimiter method : Set a speedlimit replacing the max speed possible on cab mode.(engine)&lt;br /&gt;
&lt;br /&gt;
- Set engine methods : &lt;br /&gt;
Locomotive.SwapEngine(kuid); replace engine by another for a locomotive. feature existing on actual loco to set a traction service if the loco have to drive freight or passengers consists. This method can replace speedlimit above and may be more accurate : speedlimit and power will be set together as prototypical setting before a journey. &lt;br /&gt;
- Locomotive.EngineStop(): stops the enginesound  and play a stop.wav, located in enginesound folder.&lt;br /&gt;
- Locomotive.EngineStart() : starts enginesound like this : play  a start.wav located in enginesound folder, then idle 0.wav.&lt;br /&gt;
&lt;br /&gt;
* Allow function Vehicle.SetTractionMultiplier(float) to set multiplier to 0. ~Mike&lt;br /&gt;
: UPD: sorry, misunderstood functionality of this function. But could there be a method to disable traction on locos?&lt;br /&gt;
&lt;br /&gt;
* Ability to change (or only to reduce) the presure in auxilary reservoir of a vehicle. This provides a way to create different types of tripte valves for long-length trains (~70  vehicles), where using Train.SetVelocity() is unrealistic&lt;br /&gt;
&lt;br /&gt;
* Pass ALL keystroke information to the cab/cabin script. Currently only a subset of the keys usable are passed to the script methods meaning the cab script cannot react to all the users control requests and the range of controls is not extensible. -eldavo&lt;br /&gt;
: &#039;&#039;Please provide more information on what you want here. Which keys are you missing out on that you actually need?&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;At this time Trainz does not passes via Cabin.UserPressKey(string) large number of keyboard shortcuts defined in file Settings/keyboard.txt. This makes difficult to override default cabin implementation and defining custom functions to keys.&#039;&#039; -Mike&lt;br /&gt;
:: &#039;&#039;As above, please provide specifics. We will not be simply passing through all keyboard information because this breaks localisation support. We may be able to help with specific requests.&#039;&#039; ~chris&lt;br /&gt;
:::&#039;&#039;Marked as rejected due to lack of updates.&#039;&#039; ~chris&lt;br /&gt;
:::: &#039;&#039;train_cabin_brake_release, train_cabin_brake_lap, train_cabin_indbrake_toggle, train_cabin_dyn_toggle, etc. combinations are not passed through UserPressKey. I request to pass all strings defined in keyboard.txt file through cabin script. Also, it would be nice to have messages about pressed keys with minor string like UserPressKey parameter.&#039;&#039; ~Mike&lt;br /&gt;
&lt;br /&gt;
* How about adding to the trigger events. A new message sent when a train starts moving within the trigger would be especially usefull for animating doors and other objects which need to change if there is a change from stopped to moving. Another variation of working doors is if the trigger could monitor the trains bell. In real railroad operations a train tipically signals that it is about to move by turning on the bell and tooting the horn. So the train in a trigger sending the trigger &#039;bell on&#039; or &#039;bell off&#039; could be usefule because it would give the user some control over the animation. ~bigdave7533&lt;br /&gt;
&lt;br /&gt;
* Make in addition to Vehice.GetTrackGradient() also float Vehice.GetTrackCurveRadius() whitch return 0 for straight sections of track (instead of infinity). ~tram&lt;br /&gt;
* Make a way to determinate, if a vehicle is removed from the map (for example, using portals). Now external link returns non-zero value, but any function called results in an error. ~tram&lt;br /&gt;
* Make a function to determinate, if a MapObject is closer to the camera, than specified distance.  ~tram&lt;br /&gt;
* Make a function for smooth control of &amp;quot;soundscript&amp;quot;&#039;s sound volume. For example like void MapObject.SetSoundScriptVolume(string soundTrigger, float NewVolume, float Duration).  ~tram&lt;br /&gt;
&lt;br /&gt;
==Complete==&lt;br /&gt;
* Simple destructor routine, or some other method of receiving notification of the deletion of scripted objects during a Surveyor session. (In the absence of World.GetJunctionBaseList() my new junction objects are maintaining a list of fixedtrack junctions via library calls in the Init() method of each object.  Apart from using the list myself, it is intended to be returned on demand to any script making the appropriate LibraryCall.  Since I have no way of telling that an object has been deleted, I need to rescan the entire list before returning it to ensure that each object still exists, this seems a touch inefficient when it could be easily kept up to date without a complete parse) -Andi&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* The ability for [[TrackSearch]] to return the trigger or track reference found for SceneryWithTrack descendants, including turntables and the ability to initiate a search from a specified trigger or track in SceneryWithTrack descendants.  A million reasons for this including trains being able to detect which track of an industry they can see in a proposed &#039;Call-At All Stations&#039; rule. -Andi06&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Compatibility of the [[TrackSearch]] with the animated fixed junctions. When I first got TRS2006 in my hands, I tried out my TrackView rule, but quickly discovered that it was impossible to find out the track topology (forgot the exact details, though) - [[User:Klausm|Klausm]]&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Extensions to TrackSearch()/GSTrackSearch() covered elsewhere to be sufficient to allow the topography of multi node junctions to be fully discovered. -Andi&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
*If we are going to use radians now (SetMeshOrientation()) could we please have PI?&lt;br /&gt;
:&#039;&#039;Math.PI&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Ability to configure permit structure to allow multi node junctions to coexist with the AI, whilst denying conflicting paths, as discussed above. -Andi&lt;br /&gt;
:&#039;&#039;Added named mutex support for attached junctions. See [[KIND SceneryWithTrack]].&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Fix World.GetAssetList(&amp;quot;texture-group&amp;quot;), this has been broken since TRS2004. -Andi06&lt;br /&gt;
:&#039;&#039;Now returns all assets with category-class &#039;JO&#039;. This seems to contain all &#039;texture-group&#039; type assets - though there maybe some unexpected extras.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to detect the use of &#039;Pause&#039; easily (a message would do) to stop cheating in shunting puzzles ~Jenolan&lt;br /&gt;
:&#039;&#039;New messages &amp;quot;World&amp;quot;, &amp;quot;Paused&amp;quot; and &amp;quot;World&amp;quot;, &amp;quot;Unpaused&amp;quot; now exist and should be broadcast at the appropriate times.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* World.GetCurrentTrain() Not essential obviously but it would save a lot of work. -Andi06&lt;br /&gt;
:&#039;&#039;Now exists.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to optionally detect mouseclick/ Keys [J] &amp;amp; [^J] without switching the junction. This can be hacked by making node 0 an invisible junction, but this will result in other objects querying the junction structure not getting the answer they expect (or not one they can understand). This is needed to allow objects with more than one junction node to cycle through their options in response to the user. -Andi&lt;br /&gt;
:&#039;&#039;I believe this is now possible via script overrides on the map object in question.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* A method of subclassing or outright using a script from another asset (ie. a script which is written once and reused heavily, allowing any fixes to be released as a single asset update.) - chris&lt;br /&gt;
:&#039;&#039;TS2009 now has the ability to cross-include scripts from another asset.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Dreamland, a new message: &#039;&#039;Junction,AboutToToggle&#039;&#039; -Andi&lt;br /&gt;
: &#039;&#039;How do you expect to act on this? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
::&#039;I believe this concept has been fulfilled via the UserRequestToggle overrides.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Rejected==&lt;br /&gt;
If there&#039;s a request that we&#039;re clearly not going to entertain at the current time, we&#039;ll move it to here. This includes both flat rejections and also requests which sound good but won&#039;t be done for the next version of Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Rejected Script Feature Requests]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Feature Request]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3244</id>
		<title>Script Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3244"/>
		<updated>2011-12-19T10:20:57Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is where the [[scripting]] community gets to post all their API feature requests. Request any additions that you think will enhance the game. Things to keep in mind:&lt;br /&gt;
* We are unlikely to add a feature which breaks any existing content.&lt;br /&gt;
* Script is for control purposes, and is not intended to enable significant modifications to the underlying game engine. We are very unlikely to introduce a feature where the obvious uses are going to result in significant performance penalties.&lt;br /&gt;
* We are far more likely to add features which are directly blocking something that the community is working on. If you have something cool, and need just a few minor additions then please detail what you&#039;re working on (ideally, on another wiki page linked from both here and your [[Content Creation Groups]] page) and why you need the additions.&lt;br /&gt;
* [[MiniBrowser]] requests should go on the separate [[MiniBrowser Feature Requests]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requests==&lt;br /&gt;
Requests are placed in this section by the community, for discussion and possible inclusion.&lt;br /&gt;
&lt;br /&gt;
* Add a method that will let you identify the industry at which a vehicle is located. If an industry track section can also carry the industry identifier, it would be most helpful.&lt;br /&gt;
&lt;br /&gt;
* Add a handle to allow a custom bell animation to be played when the bell is played on a locomotive (Vehicle.StartBell() and Vehicle.StopBell(), perhaps?).  Justification: Script can currently listen for the bell message, but since the message is a toggle, it is easy to get out of synch with the true state of the bell. For example, when coupling a locomotive whose bell is ringing to a locomotive whose bell is not ringing, the end result depends on which locomotive is currently in focus. - Curtis&lt;br /&gt;
&lt;br /&gt;
* Be able to interact with the outside world: ability to create a basic Socket or some form of a StreamReader/Writer to write to files or send messages via the network. -Roman&lt;br /&gt;
&lt;br /&gt;
* Scale the visible bulk load animation on a traincar such that it takes Vehicle.GetLoadTime() to complete.  For example, if Vehicle.GetLoadTime() returns 5 seconds, the bulk animation would take 5 seconds to transition from the full state to the empty state.  This would be useful for industries that take more than one second to load / unload a car, as the visible load animation could be synced more closely with the industry animation. -Curtis&lt;br /&gt;
&lt;br /&gt;
* SetMeshPosition(&amp;quot;meshname&amp;quot;, x,y,z) absolute positioning of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;This exists ~Andi&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Not necessarily - we support relative positioning, not absolute. This may or may not achieve what he wants.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* GetMeshPosition(&amp;quot;meshname&amp;quot;, &amp;quot;x&amp;quot;)[&amp;quot;Y&amp;quot;][&amp;quot;Z&amp;quot;] receive the absolute position of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;Since you have used SetMeshPosition() to move the mesh, this is unneccessary&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Absolute position can be set in Surveyor. Relative position can be set in the [[config.txt file]]. I wouldn&#039;t say that this is completely unnecessary.&#039;&#039; ~chris&lt;br /&gt;
::: And how to get this &amp;quot;absolute position&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
* Extension to the function World.GetAssetList(string kind, bool OnlyIfUsedInCurrentMap) -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to play an avi and wait for it to finsh (no user interaction allowed) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Ability to load a menu asset directly from the command line ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* The ability to modify scenery trigger radii on the fly in script. This is really aimed at crossings so that train detection can be varied in line with track speed limits.  -Andi06&lt;br /&gt;
&lt;br /&gt;
* A method of refreshing the Property Browser to take account of any change in the target object&#039;s name during a property editing session. (Objects which have &#039;autoname 1&#039; in config will often be renamed by the user.  In some circumstances I am using the object name to set other properties. Typically an object might be created as &#039;Double Slip 1&#039; and might refer to its constituent nodes as &#039;Double Slip 1,Track 1&#039;.  This is to enable other objects to refer to it in a user friendly way.  On a name change the Property Browser continues to use the old name until the browser has been closed and reopened.  This is counter intuitive) -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability for a script to be able to read/change loco/rolling stock parameters (ie to simulate one loco losing air etc etc etc) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Need to be able to detect if the user has turn off logging ie -nolog as people forget that they have done it and we log diagnostics if there is a problem. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* SetFXCoronaTexture() A means of resetting to config.txt defaults.&lt;br /&gt;
&lt;br /&gt;
* At the moment we are using F8 as out deadman switch. Would like two key bindings &#039;User1&#039; &#039;User2&#039; that sends a message the same style as F8 does (with User1 &amp;amp; User2 as the minor) so that we can do the deadman and a hud control. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Be able to play mp3 as well as wav. ~Jenolan&lt;br /&gt;
: &#039;&#039;I&#039;ve been able to do this where the asset doing the playing is a script library, I had Acker Bilk coming over a station tannoy at one point.  Not sure why it doesn&#039;t seem to work elsewhere. -Andi&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Interface.MessageBox(Caption,Text), calling up a small browser with a close button would be helpful, especially for novices. Interface.Print() is a monumental PITA because it prints out upside down, doesn&#039;t hold enough lines, and only works in Driver. For sure its possible to write your own version of this but browsers aren&#039;t all that easy to get your head around and its a very basic facility that should be built in. -Andi&lt;br /&gt;
&lt;br /&gt;
* A standard config.txt tag &#039;junction-type normal/singleslip/doubleslip&#039; etc together with a spec for construction and behaviour might be helpful. I already have a complete schema for this. -Andi&lt;br /&gt;
: &#039;&#039;Uncertain what you&#039;re expecting to achieve here? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Is it possible to make a mesh available which matches the existing graphic direction indicators, it appears to be some sort of directional corona or variant. If not could a new marker mesh be developed that could be used with both types? The existing one has nasty alpha effects in any case. -Andi&lt;br /&gt;
&lt;br /&gt;
* Minimap Support, don&#039;t care personally but some will. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to dynamically change the length of a piece of rolling stock as part of the load / unload process; to support logging disconnects (see http://www.trainzone.co.nz/logging.htm for examples)- Curtis&lt;br /&gt;
: &#039;&#039;This is an interesting concept, but sounds difficult to implement. I can&#039;t think of any way of adjusting the length unless it was the end item of a consist, since adjustment at any other time would require displacing the remainder of the consist. Could you expand on your ideas please.&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;The entire car, including lmfront &amp;amp; lmback, would be part of the loading / unloading animation. When loading, it would probably be necessary to displace the consist by moving one of the ends - perhaps the end with the locomotive? Potential issue: if when loading, the increase in consist length causes the end of the consist to run off the end of the track or collide with another train.  When unloading, you could break the consist at either or both lmfront / lmback - whichever move as part of the unloading animation.&#039;&#039; - Curtis&lt;br /&gt;
: &#039;&#039;May be simpler to just break the consist at both lmfront and lmback; centering the car in-between the two halves. -Curtis&lt;br /&gt;
&lt;br /&gt;
*Allow SetFXNameText(effect,text) to accept an empty string in the second parameter - Reason: It&#039;s really irritating having to write workarounds for this. ~Andi&lt;br /&gt;
&lt;br /&gt;
*Turntables: Write access to the &amp;quot;angle&amp;quot; tag array in script.  Now that TrackSearch will allow me to find out what is attached to a Turntable it would be nice to extend my turntable kit to disallow non existent connections. ~Andi&lt;br /&gt;
&lt;br /&gt;
*SetMeshScale(X,Y,Z) and corresponding config tags. Positive or negative values would implement mesh mirroring at the same time. As an example of potential a placement option for trees might allow random scale factors (within reasonable limits) and random rotation.  Each tree placed would then vary in size, shape and rotation getting much more variation from the same mesh asset. ~Andi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Update to product loading / unloading functionality to allow incremental loads and unloads.&lt;br /&gt;
:Potential usages:  &lt;br /&gt;
:- Animation that plays once per item being loaded; such as a forklift carrying a crate to a boxcar, or a crane lifting a log to a flatcar.&lt;br /&gt;
:- Allow dynamic load times of bulk loads (small cars load faster than large cars), with the animated load rising / lowering synchronously.&lt;br /&gt;
&lt;br /&gt;
:Potential implementation:&lt;br /&gt;
:Extend vehicle.LoadProduct(report,units) where units = integer number of queue to be loaded each increment.  0 would be everything, defaulting to current LoadProduct() behavior, and add additional calls BeginIncrementalLoad(), EndIncrementalLoad(), BeginIncrementalUnload(), and EndIncrementalUnload().&lt;br /&gt;
&lt;br /&gt;
:During a load operation that loads 3 increments (units=1, target queue on the car = 3), the flow would look like:&lt;br /&gt;
 BeginLoad() // open car doors; station doors&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad() //  start loading animation, start sounds; pfx; add any delays&lt;br /&gt;
 TransferProductFrom() // maximumToTransfer = units&lt;br /&gt;
 EndIncrementalLoad() // animate forklift returning to station / end sounds / pfx / other cleanup&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 EndLoad() // close car &amp;amp; station doors&lt;br /&gt;
&lt;br /&gt;
* Ability to add a vehicle to an existing consist like Vehicle.Reposition( Train, MyCouple, OtherCouple ) this would save needing a work track mark to add vehicles which would be very helpful ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Extension to AddHandler to allow this syntax: AddHandler(target,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;MessageHandler&amp;quot;), passing all messages to the specified handler, for justification see discussion page. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to store any information along with the layout and not the session (i.e. &#039;&#039;PropertyObject.SetLayoutProperties&#039;&#039; and &#039;&#039;PropertyObject.GetLayoutProperties&#039;&#039;, taking/returning &#039;&#039;Soup&#039;&#039; objects respectively). Rationale: the non-existence is a major drawback with configurable signals - [[User:Klausm|Klausm]]&lt;br /&gt;
&lt;br /&gt;
* Ability for an asset to be able to change and save it&#039;s local soup (ie stringtable) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Access to asset location, height, rotation in script.  This came up twice - once when I wanted to keep traffic lights upright when the containing asset is rolled, and once when I wanted to add simple real time ground shadows to assets. -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to arbitrarily add an attachment point to an item. To allow things like FRED/BOG sundry animations and so on ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Not really script. A generic clickable mesh object, its an easy hack using a fixedtrack junction but it would nice to have an official version - click on the engine shed to open the doors, click on the signal box to open a track browser etc etc. Mappable click regions too if its not too much to ask :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* On a similar note is there any chance you might amend the Exception dialogue to specify the object, (or even the Asset) which is causing the exception :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* Extension/Alternative to World.GetJunctionList to return fixed track junction objects or nodes, I can script this easily for objects using my library but this would not be the case for all junctions. -Andi&lt;br /&gt;
&lt;br /&gt;
* World.Play2DSound(Asset,filename) allows sound files to be saved in a &#039;sound library&#039; asset and avoids duplication.  Can we have a similar facility for images to be used in html assets.  A lot of the dependencies that I use are images and icons.  I&#039;m consciously trying to avoid this now - its the source of much pain - but to do this for the Junction Kit for instance I would have to have copies of all necessary images in all of the placeable assets (there are more than 50) If I could simply keep one copy in the script library it would save much bandwidth, diskspace and support. -Andi06&lt;br /&gt;
&lt;br /&gt;
* genesteal : methods applied to current train, may be class world.gs:&lt;br /&gt;
- Train.GetNextSignal() : return next Signal same direction, distance and signal state.&lt;br /&gt;
- Train.GetNextExSignal() : the same for extended states&lt;br /&gt;
- Train.GetNextTrackside () : return next trackside same direction, distance, speedlimit if exists.&lt;br /&gt;
- Train.GetNextJunction () : return next junction, distance and direction.&lt;br /&gt;
&lt;br /&gt;
* genesteal : cab features.&lt;br /&gt;
- methods for ligth controls in cabin : Control.SetFlash (float frequency).Make the control visible/invisible on the intervall frequency. may be Meshobjects.gs for more general purpose. The same for texture swapping in texture replacement.&lt;br /&gt;
- New conrol cab &amp;quot;button&amp;quot; with vertical translation limit : method set and get value as usual, method for &amp;quot;while depressed&amp;quot; behavior: Setdepressed ( method to run).&lt;br /&gt;
&lt;br /&gt;
- Speedlimiter method : Set a speedlimit replacing the max speed possible on cab mode.(engine)&lt;br /&gt;
&lt;br /&gt;
- Set engine methods : &lt;br /&gt;
Locomotive.SwapEngine(kuid); replace engine by another for a locomotive. feature existing on actual loco to set a traction service if the loco have to drive freight or passengers consists. This method can replace speedlimit above and may be more accurate : speedlimit and power will be set together as prototypical setting before a journey. &lt;br /&gt;
- Locomotive.EngineStop(): stops the enginesound  and play a stop.wav, located in enginesound folder.&lt;br /&gt;
- Locomotive.EngineStart() : starts enginesound like this : play  a start.wav located in enginesound folder, then idle 0.wav.&lt;br /&gt;
&lt;br /&gt;
* Allow function Vehicle.SetTractionMultiplier(float) to set multiplier to 0. ~Mike&lt;br /&gt;
: UPD: sorry, misunderstood functionality of this function. But could there be a method to disable traction on locos?&lt;br /&gt;
&lt;br /&gt;
* Ability to change (or only to reduce) the presure in auxilary reservoir of a vehicle. This provides a way to create different types of tripte valves for long-length trains (~70  vehicles), where using Train.SetVelocity() is unrealistic&lt;br /&gt;
&lt;br /&gt;
* Pass ALL keystroke information to the cab/cabin script. Currently only a subset of the keys usable are passed to the script methods meaning the cab script cannot react to all the users control requests and the range of controls is not extensible. -eldavo&lt;br /&gt;
: &#039;&#039;Please provide more information on what you want here. Which keys are you missing out on that you actually need?&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;At this time Trainz does not passes via Cabin.UserPressKey(string) large number of keyboard shortcuts defined in file Settings/keyboard.txt. This makes difficult to override default cabin implementation and defining custom functions to keys.&#039;&#039; -Mike&lt;br /&gt;
:: &#039;&#039;As above, please provide specifics. We will not be simply passing through all keyboard information because this breaks localisation support. We may be able to help with specific requests.&#039;&#039; ~chris&lt;br /&gt;
:::&#039;&#039;Marked as rejected due to lack of updates.&#039;&#039; ~chris&lt;br /&gt;
:::: &#039;&#039;train_cabin_brake_release, train_cabin_brake_lap, train_cabin_indbrake_toggle, train_cabin_dyn_toggle, etc. combinations are not passed through UserPressKey. I request to pass all strings defined in keyboard.txt file through cabin script. Also, it would be nice to have messages about pressed keys with minor string like UserPressKey parameter.&#039;&#039; ~Mike&lt;br /&gt;
&lt;br /&gt;
* How about adding to the trigger events. A new message sent when a train starts moving within the trigger would be especially usefull for animating doors and other objects which need to change if there is a change from stopped to moving. Another variation of working doors is if the trigger could monitor the trains bell. In real railroad operations a train tipically signals that it is about to move by turning on the bell and tooting the horn. So the train in a trigger sending the trigger &#039;bell on&#039; or &#039;bell off&#039; could be usefule because it would give the user some control over the animation. ~bigdave7533&lt;br /&gt;
&lt;br /&gt;
* Make in addition to Vehice.GetTrackGradient() also float Vehice.GetTrackCurveRadius() whitch return 0 for straight sections of track (instead of infinity). ~tram&lt;br /&gt;
* Make a way to determinate, if a vehicle is removed from the map (for example, using portals). Now external link returns non-zero value, but any function called results in an error. ~tram&lt;br /&gt;
* Make a function to determinate, if a MapObject is closer to the camera, than specified distance.  ~tram&lt;br /&gt;
* Make a function for smooth control of &amp;quot;soundscript&amp;quot;&#039;s sound volume. For example like void MapObject.SetSoundScriptVolume(string soundTrigger, float NewVolume, float Duration).  ~tram&lt;br /&gt;
&lt;br /&gt;
==Complete==&lt;br /&gt;
* Simple destructor routine, or some other method of receiving notification of the deletion of scripted objects during a Surveyor session. (In the absence of World.GetJunctionBaseList() my new junction objects are maintaining a list of fixedtrack junctions via library calls in the Init() method of each object.  Apart from using the list myself, it is intended to be returned on demand to any script making the appropriate LibraryCall.  Since I have no way of telling that an object has been deleted, I need to rescan the entire list before returning it to ensure that each object still exists, this seems a touch inefficient when it could be easily kept up to date without a complete parse) -Andi&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* The ability for [[TrackSearch]] to return the trigger or track reference found for SceneryWithTrack descendants, including turntables and the ability to initiate a search from a specified trigger or track in SceneryWithTrack descendants.  A million reasons for this including trains being able to detect which track of an industry they can see in a proposed &#039;Call-At All Stations&#039; rule. -Andi06&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Compatibility of the [[TrackSearch]] with the animated fixed junctions. When I first got TRS2006 in my hands, I tried out my TrackView rule, but quickly discovered that it was impossible to find out the track topology (forgot the exact details, though) - [[User:Klausm|Klausm]]&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Extensions to TrackSearch()/GSTrackSearch() covered elsewhere to be sufficient to allow the topography of multi node junctions to be fully discovered. -Andi&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
*If we are going to use radians now (SetMeshOrientation()) could we please have PI?&lt;br /&gt;
:&#039;&#039;Math.PI&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Ability to configure permit structure to allow multi node junctions to coexist with the AI, whilst denying conflicting paths, as discussed above. -Andi&lt;br /&gt;
:&#039;&#039;Added named mutex support for attached junctions. See [[KIND SceneryWithTrack]].&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Fix World.GetAssetList(&amp;quot;texture-group&amp;quot;), this has been broken since TRS2004. -Andi06&lt;br /&gt;
:&#039;&#039;Now returns all assets with category-class &#039;JO&#039;. This seems to contain all &#039;texture-group&#039; type assets - though there maybe some unexpected extras.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to detect the use of &#039;Pause&#039; easily (a message would do) to stop cheating in shunting puzzles ~Jenolan&lt;br /&gt;
:&#039;&#039;New messages &amp;quot;World&amp;quot;, &amp;quot;Paused&amp;quot; and &amp;quot;World&amp;quot;, &amp;quot;Unpaused&amp;quot; now exist and should be broadcast at the appropriate times.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* World.GetCurrentTrain() Not essential obviously but it would save a lot of work. -Andi06&lt;br /&gt;
:&#039;&#039;Now exists.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to optionally detect mouseclick/ Keys [J] &amp;amp; [^J] without switching the junction. This can be hacked by making node 0 an invisible junction, but this will result in other objects querying the junction structure not getting the answer they expect (or not one they can understand). This is needed to allow objects with more than one junction node to cycle through their options in response to the user. -Andi&lt;br /&gt;
:&#039;&#039;I believe this is now possible via script overrides on the map object in question.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* A method of subclassing or outright using a script from another asset (ie. a script which is written once and reused heavily, allowing any fixes to be released as a single asset update.) - chris&lt;br /&gt;
:&#039;&#039;TS2009 now has the ability to cross-include scripts from another asset.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Dreamland, a new message: &#039;&#039;Junction,AboutToToggle&#039;&#039; -Andi&lt;br /&gt;
: &#039;&#039;How do you expect to act on this? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
::&#039;I believe this concept has been fulfilled via the UserRequestToggle overrides.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Rejected==&lt;br /&gt;
If there&#039;s a request that we&#039;re clearly not going to entertain at the current time, we&#039;ll move it to here. This includes both flat rejections and also requests which sound good but won&#039;t be done for the next version of Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Rejected Script Feature Requests]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Feature Request]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3243</id>
		<title>Script Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Script_Feature_Requests&amp;diff=3243"/>
		<updated>2011-12-19T00:46:52Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is where the [[scripting]] community gets to post all their API feature requests. Request any additions that you think will enhance the game. Things to keep in mind:&lt;br /&gt;
* We are unlikely to add a feature which breaks any existing content.&lt;br /&gt;
* Script is for control purposes, and is not intended to enable significant modifications to the underlying game engine. We are very unlikely to introduce a feature where the obvious uses are going to result in significant performance penalties.&lt;br /&gt;
* We are far more likely to add features which are directly blocking something that the community is working on. If you have something cool, and need just a few minor additions then please detail what you&#039;re working on (ideally, on another wiki page linked from both here and your [[Content Creation Groups]] page) and why you need the additions.&lt;br /&gt;
* [[MiniBrowser]] requests should go on the separate [[MiniBrowser Feature Requests]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requests==&lt;br /&gt;
Requests are placed in this section by the community, for discussion and possible inclusion.&lt;br /&gt;
&lt;br /&gt;
* Add a method that will let you identify the industry at which a vehicle is located. If an industry track section can also carry the industry identifier, it would be most helpful.&lt;br /&gt;
&lt;br /&gt;
* Add a handle to allow a custom bell animation to be played when the bell is played on a locomotive (Vehicle.StartBell() and Vehicle.StopBell(), perhaps?).  Justification: Script can currently listen for the bell message, but since the message is a toggle, it is easy to get out of synch with the true state of the bell. For example, when coupling a locomotive whose bell is ringing to a locomotive whose bell is not ringing, the end result depends on which locomotive is currently in focus. - Curtis&lt;br /&gt;
&lt;br /&gt;
* Be able to interact with the outside world: ability to create a basic Socket or some form of a StreamReader/Writer to write to files or send messages via the network. -Roman&lt;br /&gt;
&lt;br /&gt;
* Scale the visible bulk load animation on a traincar such that it takes Vehicle.GetLoadTime() to complete.  For example, if Vehicle.GetLoadTime() returns 5 seconds, the bulk animation would take 5 seconds to transition from the full state to the empty state.  This would be useful for industries that take more than one second to load / unload a car, as the visible load animation could be synced more closely with the industry animation. -Curtis&lt;br /&gt;
&lt;br /&gt;
* SetMeshPosition(&amp;quot;meshname&amp;quot;, x,y,z) absolute positioning of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;This exists ~Andi&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Not necessarily - we support relative positioning, not absolute. This may or may not achieve what he wants.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* GetMeshPosition(&amp;quot;meshname&amp;quot;, &amp;quot;x&amp;quot;)[&amp;quot;Y&amp;quot;][&amp;quot;Z&amp;quot;] receive the absolute position of a Mesh or Object. -Caby&lt;br /&gt;
: &amp;lt;font color=red&amp;gt;Since you have used SetMeshPosition() to move the mesh, this is unneccessary&amp;lt;/font&amp;gt;&lt;br /&gt;
:: &#039;&#039;Absolute position can be set in Surveyor. Relative position can be set in the [[config.txt file]]. I wouldn&#039;t say that this is completely unnecessary.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Extension to the function World.GetAssetList(string kind, bool OnlyIfUsedInCurrentMap) -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to play an avi and wait for it to finsh (no user interaction allowed) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Ability to load a menu asset directly from the command line ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* The ability to modify scenery trigger radii on the fly in script. This is really aimed at crossings so that train detection can be varied in line with track speed limits.  -Andi06&lt;br /&gt;
&lt;br /&gt;
* A method of refreshing the Property Browser to take account of any change in the target object&#039;s name during a property editing session. (Objects which have &#039;autoname 1&#039; in config will often be renamed by the user.  In some circumstances I am using the object name to set other properties. Typically an object might be created as &#039;Double Slip 1&#039; and might refer to its constituent nodes as &#039;Double Slip 1,Track 1&#039;.  This is to enable other objects to refer to it in a user friendly way.  On a name change the Property Browser continues to use the old name until the browser has been closed and reopened.  This is counter intuitive) -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability for a script to be able to read/change loco/rolling stock parameters (ie to simulate one loco losing air etc etc etc) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Need to be able to detect if the user has turn off logging ie -nolog as people forget that they have done it and we log diagnostics if there is a problem. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* SetFXCoronaTexture() A means of resetting to config.txt defaults.&lt;br /&gt;
&lt;br /&gt;
* At the moment we are using F8 as out deadman switch. Would like two key bindings &#039;User1&#039; &#039;User2&#039; that sends a message the same style as F8 does (with User1 &amp;amp; User2 as the minor) so that we can do the deadman and a hud control. ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Be able to play mp3 as well as wav. ~Jenolan&lt;br /&gt;
: &#039;&#039;I&#039;ve been able to do this where the asset doing the playing is a script library, I had Acker Bilk coming over a station tannoy at one point.  Not sure why it doesn&#039;t seem to work elsewhere. -Andi&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Interface.MessageBox(Caption,Text), calling up a small browser with a close button would be helpful, especially for novices. Interface.Print() is a monumental PITA because it prints out upside down, doesn&#039;t hold enough lines, and only works in Driver. For sure its possible to write your own version of this but browsers aren&#039;t all that easy to get your head around and its a very basic facility that should be built in. -Andi&lt;br /&gt;
&lt;br /&gt;
* A standard config.txt tag &#039;junction-type normal/singleslip/doubleslip&#039; etc together with a spec for construction and behaviour might be helpful. I already have a complete schema for this. -Andi&lt;br /&gt;
: &#039;&#039;Uncertain what you&#039;re expecting to achieve here? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Is it possible to make a mesh available which matches the existing graphic direction indicators, it appears to be some sort of directional corona or variant. If not could a new marker mesh be developed that could be used with both types? The existing one has nasty alpha effects in any case. -Andi&lt;br /&gt;
&lt;br /&gt;
* Minimap Support, don&#039;t care personally but some will. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to dynamically change the length of a piece of rolling stock as part of the load / unload process; to support logging disconnects (see http://www.trainzone.co.nz/logging.htm for examples)- Curtis&lt;br /&gt;
: &#039;&#039;This is an interesting concept, but sounds difficult to implement. I can&#039;t think of any way of adjusting the length unless it was the end item of a consist, since adjustment at any other time would require displacing the remainder of the consist. Could you expand on your ideas please.&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;The entire car, including lmfront &amp;amp; lmback, would be part of the loading / unloading animation. When loading, it would probably be necessary to displace the consist by moving one of the ends - perhaps the end with the locomotive? Potential issue: if when loading, the increase in consist length causes the end of the consist to run off the end of the track or collide with another train.  When unloading, you could break the consist at either or both lmfront / lmback - whichever move as part of the unloading animation.&#039;&#039; - Curtis&lt;br /&gt;
: &#039;&#039;May be simpler to just break the consist at both lmfront and lmback; centering the car in-between the two halves. -Curtis&lt;br /&gt;
&lt;br /&gt;
*Allow SetFXNameText(effect,text) to accept an empty string in the second parameter - Reason: It&#039;s really irritating having to write workarounds for this. ~Andi&lt;br /&gt;
&lt;br /&gt;
*Turntables: Write access to the &amp;quot;angle&amp;quot; tag array in script.  Now that TrackSearch will allow me to find out what is attached to a Turntable it would be nice to extend my turntable kit to disallow non existent connections. ~Andi&lt;br /&gt;
&lt;br /&gt;
*SetMeshScale(X,Y,Z) and corresponding config tags. Positive or negative values would implement mesh mirroring at the same time. As an example of potential a placement option for trees might allow random scale factors (within reasonable limits) and random rotation.  Each tree placed would then vary in size, shape and rotation getting much more variation from the same mesh asset. ~Andi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Update to product loading / unloading functionality to allow incremental loads and unloads.&lt;br /&gt;
:Potential usages:  &lt;br /&gt;
:- Animation that plays once per item being loaded; such as a forklift carrying a crate to a boxcar, or a crane lifting a log to a flatcar.&lt;br /&gt;
:- Allow dynamic load times of bulk loads (small cars load faster than large cars), with the animated load rising / lowering synchronously.&lt;br /&gt;
&lt;br /&gt;
:Potential implementation:&lt;br /&gt;
:Extend vehicle.LoadProduct(report,units) where units = integer number of queue to be loaded each increment.  0 would be everything, defaulting to current LoadProduct() behavior, and add additional calls BeginIncrementalLoad(), EndIncrementalLoad(), BeginIncrementalUnload(), and EndIncrementalUnload().&lt;br /&gt;
&lt;br /&gt;
:During a load operation that loads 3 increments (units=1, target queue on the car = 3), the flow would look like:&lt;br /&gt;
 BeginLoad() // open car doors; station doors&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad() //  start loading animation, start sounds; pfx; add any delays&lt;br /&gt;
 TransferProductFrom() // maximumToTransfer = units&lt;br /&gt;
 EndIncrementalLoad() // animate forklift returning to station / end sounds / pfx / other cleanup&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 BeginIncrementalLoad()&lt;br /&gt;
 TransferProductFrom()&lt;br /&gt;
 EndIncrementalLoad()&lt;br /&gt;
 &lt;br /&gt;
 EndLoad() // close car &amp;amp; station doors&lt;br /&gt;
&lt;br /&gt;
* Ability to add a vehicle to an existing consist like Vehicle.Reposition( Train, MyCouple, OtherCouple ) this would save needing a work track mark to add vehicles which would be very helpful ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Extension to AddHandler to allow this syntax: AddHandler(target,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;MessageHandler&amp;quot;), passing all messages to the specified handler, for justification see discussion page. -Andi&lt;br /&gt;
&lt;br /&gt;
* Ability to store any information along with the layout and not the session (i.e. &#039;&#039;PropertyObject.SetLayoutProperties&#039;&#039; and &#039;&#039;PropertyObject.GetLayoutProperties&#039;&#039;, taking/returning &#039;&#039;Soup&#039;&#039; objects respectively). Rationale: the non-existence is a major drawback with configurable signals - [[User:Klausm|Klausm]]&lt;br /&gt;
&lt;br /&gt;
* Ability for an asset to be able to change and save it&#039;s local soup (ie stringtable) ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Access to asset location, height, rotation in script.  This came up twice - once when I wanted to keep traffic lights upright when the containing asset is rolled, and once when I wanted to add simple real time ground shadows to assets. -Andi06&lt;br /&gt;
&lt;br /&gt;
* Ability to arbitrarily add an attachment point to an item. To allow things like FRED/BOG sundry animations and so on ~Jenolan&lt;br /&gt;
&lt;br /&gt;
* Not really script. A generic clickable mesh object, its an easy hack using a fixedtrack junction but it would nice to have an official version - click on the engine shed to open the doors, click on the signal box to open a track browser etc etc. Mappable click regions too if its not too much to ask :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* On a similar note is there any chance you might amend the Exception dialogue to specify the object, (or even the Asset) which is causing the exception :-) -Andi&lt;br /&gt;
&lt;br /&gt;
* Extension/Alternative to World.GetJunctionList to return fixed track junction objects or nodes, I can script this easily for objects using my library but this would not be the case for all junctions. -Andi&lt;br /&gt;
&lt;br /&gt;
* World.Play2DSound(Asset,filename) allows sound files to be saved in a &#039;sound library&#039; asset and avoids duplication.  Can we have a similar facility for images to be used in html assets.  A lot of the dependencies that I use are images and icons.  I&#039;m consciously trying to avoid this now - its the source of much pain - but to do this for the Junction Kit for instance I would have to have copies of all necessary images in all of the placeable assets (there are more than 50) If I could simply keep one copy in the script library it would save much bandwidth, diskspace and support. -Andi06&lt;br /&gt;
&lt;br /&gt;
* genesteal : methods applied to current train, may be class world.gs:&lt;br /&gt;
- Train.GetNextSignal() : return next Signal same direction, distance and signal state.&lt;br /&gt;
- Train.GetNextExSignal() : the same for extended states&lt;br /&gt;
- Train.GetNextTrackside () : return next trackside same direction, distance, speedlimit if exists.&lt;br /&gt;
- Train.GetNextJunction () : return next junction, distance and direction.&lt;br /&gt;
&lt;br /&gt;
* genesteal : cab features.&lt;br /&gt;
- methods for ligth controls in cabin : Control.SetFlash (float frequency).Make the control visible/invisible on the intervall frequency. may be Meshobjects.gs for more general purpose. The same for texture swapping in texture replacement.&lt;br /&gt;
- New conrol cab &amp;quot;button&amp;quot; with vertical translation limit : method set and get value as usual, method for &amp;quot;while depressed&amp;quot; behavior: Setdepressed ( method to run).&lt;br /&gt;
&lt;br /&gt;
- Speedlimiter method : Set a speedlimit replacing the max speed possible on cab mode.(engine)&lt;br /&gt;
&lt;br /&gt;
- Set engine methods : &lt;br /&gt;
Locomotive.SwapEngine(kuid); replace engine by another for a locomotive. feature existing on actual loco to set a traction service if the loco have to drive freight or passengers consists. This method can replace speedlimit above and may be more accurate : speedlimit and power will be set together as prototypical setting before a journey. &lt;br /&gt;
- Locomotive.EngineStop(): stops the enginesound  and play a stop.wav, located in enginesound folder.&lt;br /&gt;
- Locomotive.EngineStart() : starts enginesound like this : play  a start.wav located in enginesound folder, then idle 0.wav.&lt;br /&gt;
&lt;br /&gt;
* Allow function Vehicle.SetTractionMultiplier(float) to set multiplier to 0. ~Mike&lt;br /&gt;
: UPD: sorry, misunderstood functionality of this function. But could there be a method to disable traction on locos?&lt;br /&gt;
&lt;br /&gt;
* Ability to change (or only to reduce) the presure in auxilary reservoir of a vehicle. This provides a way to create different types of tripte valves for long-length trains (~70  vehicles), where using Train.SetVelocity() is unrealistic&lt;br /&gt;
&lt;br /&gt;
* Pass ALL keystroke information to the cab/cabin script. Currently only a subset of the keys usable are passed to the script methods meaning the cab script cannot react to all the users control requests and the range of controls is not extensible. -eldavo&lt;br /&gt;
: &#039;&#039;Please provide more information on what you want here. Which keys are you missing out on that you actually need?&#039;&#039; -chris&lt;br /&gt;
: &#039;&#039;At this time Trainz does not passes via Cabin.UserPressKey(string) large number of keyboard shortcuts defined in file Settings/keyboard.txt. This makes difficult to override default cabin implementation and defining custom functions to keys.&#039;&#039; -Mike&lt;br /&gt;
:: &#039;&#039;As above, please provide specifics. We will not be simply passing through all keyboard information because this breaks localisation support. We may be able to help with specific requests.&#039;&#039; ~chris&lt;br /&gt;
:::&#039;&#039;Marked as rejected due to lack of updates.&#039;&#039; ~chris&lt;br /&gt;
:::: &#039;&#039;train_cabin_brake_release, train_cabin_brake_lap, train_cabin_indbrake_toggle, train_cabin_dyn_toggle, etc. combinations are not passed through UserPressKey. I request to pass all strings defined in keyboard.txt file through cabin script. Also, it would be nice to have messages about pressed keys with minor string like UserPressKey parameter.&#039;&#039; ~Mike&lt;br /&gt;
&lt;br /&gt;
* How about adding to the trigger events. A new message sent when a train starts moving within the trigger would be especially usefull for animating doors and other objects which need to change if there is a change from stopped to moving. Another variation of working doors is if the trigger could monitor the trains bell. In real railroad operations a train tipically signals that it is about to move by turning on the bell and tooting the horn. So the train in a trigger sending the trigger &#039;bell on&#039; or &#039;bell off&#039; could be usefule because it would give the user some control over the animation. ~bigdave7533&lt;br /&gt;
&lt;br /&gt;
* Make in addition to Vehice.GetTrackGradient() also float Vehice.GetTrackCurveRadius() whitch return 0 for straight sections of track (instead of infinity). ~tram&lt;br /&gt;
* Make a way to determinate, if a vehicle is removed from the map (for example, using portals). Now external link returns non-zero value, but any function called results in an error. ~tram&lt;br /&gt;
* Make a function to determinate, if a MapObject is closer to the camera, than specified distance.  ~tram&lt;br /&gt;
* Make a function for smooth control of &amp;quot;soundscript&amp;quot;&#039;s sound volume. For example like void MapObject.SetSoundScriptVolume(string soundTrigger, float NewVolume, float Duration).  ~tram&lt;br /&gt;
&lt;br /&gt;
==Complete==&lt;br /&gt;
* Simple destructor routine, or some other method of receiving notification of the deletion of scripted objects during a Surveyor session. (In the absence of World.GetJunctionBaseList() my new junction objects are maintaining a list of fixedtrack junctions via library calls in the Init() method of each object.  Apart from using the list myself, it is intended to be returned on demand to any script making the appropriate LibraryCall.  Since I have no way of telling that an object has been deleted, I need to rescan the entire list before returning it to ensure that each object still exists, this seems a touch inefficient when it could be easily kept up to date without a complete parse) -Andi&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* The ability for [[TrackSearch]] to return the trigger or track reference found for SceneryWithTrack descendants, including turntables and the ability to initiate a search from a specified trigger or track in SceneryWithTrack descendants.  A million reasons for this including trains being able to detect which track of an industry they can see in a proposed &#039;Call-At All Stations&#039; rule. -Andi06&lt;br /&gt;
:&#039;&#039;Now a function of the [[TrackSearch]] system.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Compatibility of the [[TrackSearch]] with the animated fixed junctions. When I first got TRS2006 in my hands, I tried out my TrackView rule, but quickly discovered that it was impossible to find out the track topology (forgot the exact details, though) - [[User:Klausm|Klausm]]&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Extensions to TrackSearch()/GSTrackSearch() covered elsewhere to be sufficient to allow the topography of multi node junctions to be fully discovered. -Andi&lt;br /&gt;
:&#039;&#039;[[TrackSearch]] system is now considerably more robust.&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
*If we are going to use radians now (SetMeshOrientation()) could we please have PI?&lt;br /&gt;
:&#039;&#039;Math.PI&#039;&#039; -chris&lt;br /&gt;
&lt;br /&gt;
* Ability to configure permit structure to allow multi node junctions to coexist with the AI, whilst denying conflicting paths, as discussed above. -Andi&lt;br /&gt;
:&#039;&#039;Added named mutex support for attached junctions. See [[KIND SceneryWithTrack]].&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Fix World.GetAssetList(&amp;quot;texture-group&amp;quot;), this has been broken since TRS2004. -Andi06&lt;br /&gt;
:&#039;&#039;Now returns all assets with category-class &#039;JO&#039;. This seems to contain all &#039;texture-group&#039; type assets - though there maybe some unexpected extras.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to detect the use of &#039;Pause&#039; easily (a message would do) to stop cheating in shunting puzzles ~Jenolan&lt;br /&gt;
:&#039;&#039;New messages &amp;quot;World&amp;quot;, &amp;quot;Paused&amp;quot; and &amp;quot;World&amp;quot;, &amp;quot;Unpaused&amp;quot; now exist and should be broadcast at the appropriate times.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* World.GetCurrentTrain() Not essential obviously but it would save a lot of work. -Andi06&lt;br /&gt;
:&#039;&#039;Now exists.&#039;&#039; -James&lt;br /&gt;
&lt;br /&gt;
* Ability to optionally detect mouseclick/ Keys [J] &amp;amp; [^J] without switching the junction. This can be hacked by making node 0 an invisible junction, but this will result in other objects querying the junction structure not getting the answer they expect (or not one they can understand). This is needed to allow objects with more than one junction node to cycle through their options in response to the user. -Andi&lt;br /&gt;
:&#039;&#039;I believe this is now possible via script overrides on the map object in question.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* A method of subclassing or outright using a script from another asset (ie. a script which is written once and reused heavily, allowing any fixes to be released as a single asset update.) - chris&lt;br /&gt;
:&#039;&#039;TS2009 now has the ability to cross-include scripts from another asset.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
* Dreamland, a new message: &#039;&#039;Junction,AboutToToggle&#039;&#039; -Andi&lt;br /&gt;
: &#039;&#039;How do you expect to act on this? -chris&#039;&#039;&lt;br /&gt;
: &#039;&#039;see Animated Fixed Junctions Thread&#039;&#039;&lt;br /&gt;
::&#039;I believe this concept has been fulfilled via the UserRequestToggle overrides.&#039;&#039; ~chris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Rejected==&lt;br /&gt;
If there&#039;s a request that we&#039;re clearly not going to entertain at the current time, we&#039;ll move it to here. This includes both flat rejections and also requests which sound good but won&#039;t be done for the next version of Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Rejected Script Feature Requests]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Feature Request]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3242</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3242"/>
		<updated>2011-12-17T22:50:03Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Resistance calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm + 29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3241</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3241"/>
		<updated>2011-12-17T22:49:30Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* air-drag-coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3240</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3240"/>
		<updated>2011-12-17T22:49:08Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* surface-area */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3239</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3239"/>
		<updated>2011-12-17T22:48:18Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* air-drag-coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3238</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3238"/>
		<updated>2011-12-17T22:48:02Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* moving-friction-coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3237</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3237"/>
		<updated>2011-12-17T22:47:45Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* surface-area */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3236</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3236"/>
		<updated>2011-12-17T22:47:30Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* axle-count */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3235</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3235"/>
		<updated>2011-12-17T22:47:07Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* axle-count */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling [[http://online.ts2009.com/mediaWiki/index.php5/%22Motor%22_container#Resistance_calculations resistance calculations]].&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3234</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3234"/>
		<updated>2011-12-17T10:07:56Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Resistance calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
These calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3233</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3233"/>
		<updated>2011-12-17T10:03:28Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Resistance calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
This calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3232</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3232"/>
		<updated>2011-12-17T10:03:17Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Resistance calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
This calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&amp;lt;br&amp;gt;&lt;br /&gt;
V = speed - mph&amp;lt;br&amp;gt;&lt;br /&gt;
m = weight of the vehicle (tons)&amp;lt;br&amp;gt;&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3231</id>
		<title>&quot;Motor&quot; container</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22Motor%22_container&amp;diff=3231"/>
		<updated>2011-12-17T10:02:45Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Example motor container */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Motor container is a top-level [[config.txt file]] entry used by [[KIND Engine|Enginespec]] and [[KIND Steam-engine|Steam Enginespec]] assets.&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
&lt;br /&gt;
The Motor container supports the following tags. Each tag is show here with its default value.&lt;br /&gt;
&lt;br /&gt;
 motor&lt;br /&gt;
 {&lt;br /&gt;
     resistance 1.7&lt;br /&gt;
     adhesion 5.0&lt;br /&gt;
     maxvoltage 600.0&lt;br /&gt;
     maxspeed 33.3&lt;br /&gt;
     brakeratio 55000&lt;br /&gt;
     max-accel 3500&lt;br /&gt;
     max-decel 9000&lt;br /&gt;
     throttle-notches 8&lt;br /&gt;
     axle-count 6&lt;br /&gt;
     surface-area 80.0&lt;br /&gt;
     moving-friction-coefficient 0.03&lt;br /&gt;
     air-drag-coefficient 0.00017&lt;br /&gt;
     full-throttle-speed 33.0&lt;br /&gt;
     driving-wheel-weight-ratio 1.0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====resistance====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====adhesion====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &#039;&#039;Not used&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====maxvoltage====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Voltage to &#039;&#039;traction motors&#039;&#039;. This is used to scale the ammeter displayed in the cab. (Power is volts times amps - increasing the voltage means reducing the ammeter...)&lt;br /&gt;
&lt;br /&gt;
====maxspeed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Maximum speed in DCC mode.&lt;br /&gt;
&lt;br /&gt;
====brakeratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====max-accel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Accelerative force available in DCC mode. Note - this is a force, not a rate of acceleration. The rate of acceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====max-decel====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Decelerative force available in DCC mode. Note - this is a force, not a rate of deceleration. The rate of deceleration will depend on the mass of the train as well.&lt;br /&gt;
&lt;br /&gt;
====throttle-notches====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of throttle notches&lt;br /&gt;
&lt;br /&gt;
====axle-count====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Number of axles on this vehicle. Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====surface-area====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: frontal surface area (sq ft) of vehicle. Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====moving-friction-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in rolling resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====air-drag-coefficient====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Used in air resistance calculations.&lt;br /&gt;
&lt;br /&gt;
====full-throttle-speed====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: &lt;br /&gt;
&lt;br /&gt;
====driving-wheel-weight-ratio====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Ratio (between 0.0 and 1.0) of the weight of this vehicle bearing down on driven wheels. Used by steam locos only.&lt;br /&gt;
&lt;br /&gt;
==Example motor container==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;br /&gt;
&lt;br /&gt;
==Resistance calculations==&lt;br /&gt;
&lt;br /&gt;
This calculations occur according to Davis formula:&lt;br /&gt;
&lt;br /&gt;
R = (1.3ˑm+29ˑaxle-count) + moving-friction-coefficientˑmˑV + air-drag-coefficientˑsurface-areaˑV^2 + 20ˑmˑG&lt;br /&gt;
&lt;br /&gt;
R = total resistance in lb. including grade resistance&lt;br /&gt;
V = speed - mph&lt;br /&gt;
m = weight of the vehicle (tons)&lt;br /&gt;
G = % grade (upgrade +, downgrade -)&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Physics&amp;diff=1871</id>
		<title>Physics</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Physics&amp;diff=1871"/>
		<updated>2011-05-13T11:05:35Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Coupler Breakage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font color=red&amp;gt;&#039;&#039;This page needs to be formatted into a decent information source, with commentary on what is simulated, what is not simulated, and what the suspected bugs are if any. -chris&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Coupler Breakage==&lt;br /&gt;
&lt;br /&gt;
The coupler breakage feature was a great idea in Trainz Railroad Simulator 2006 for the realist but it has problems with its script that doesn&#039;t allow a different calculation for stretch,expansion and buff,compression forces. Trying to include the &amp;quot;coupler-compression&amp;quot; in the script would do nothing. A train just moving down a track should not break a coupler aka &amp;quot;knuckle&amp;quot;. The buff,compression force on a standard &amp;quot;Janney&amp;quot; knuckle is huge and the car is likely to be crushed or jackknifed before the coupler breaks. Under normal freight train conditions the slack is stretched, like a chain, through the whole train and when the train tops a hill and the last car(s) start accelerating and it can actually get going faster than the locomotive but only until the slack is bunched all the way to the loco, when the slack hits the loco it accelerates to the trains speed and then the slack is bunched. This happens not all at once but car by car starting with the last one and acts like dominoes. The tensile strength of a knuckle is around 390000 lbs ~1735kN static shock load can reach 520000 lbs or more. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;I&#039;m uncertain on what your point is here. Trainz calculates the compression and expansion forces running through the couplers, and flags them as broken if these forces exceed the specified limits. You can tweak the limits to whatever you think is appropriate. Slack and compression of the entire consist is modelled appropriately to achieve this result. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
chris, the point is couplers don&#039;t break in compression, cars are crushed or most likely jackknife aka derail. I know from experience that on a 13000 ton coal train, that when the train brakes are used even in an emergency application that the couplers don&#039;t break. Also trying to use dynamic brakes on the engine also break couplers and it usually happens between the engines, if the engine isn&#039;t powerful enough to break couplers in expansion then it should not be able to do so while dynamic braking. I was going to find a few pictures of where couplers have hit head on at high speed and the coupler survived the car or engine was crushed. i just couldn&#039;t find one on the net. when i try to use the physics, no matter how high i make the settings the couplers will break in compression the stock settings are 2500kn in expansion; there are no compression settings without changing the script manually; and I&#039;ve tried 100000kn, and thats not a typo, and still break couplers in compression. The problem is, is that trainz does not separate compression from expansion calculations. if one or the other reaches the limit, the coupler breaks. Vehicle Physics,&amp;lt;kuid:-16:280742&amp;gt; is my version that is doing this. if you need more detail ill be back. thanks chris.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;From what you&#039;re saying here, it sounds like we&#039;re modelling both compression and expansion correctly (and yes, we model these seperately) but we&#039;re not modelling any kind of compression within the vehicle itself. This is quite true - we assume that the vehicle is infinitely rigid, so any movement applied to one end of a vehicle will result in an equal movement at the other end of the vehicle. This will certainly exaggerate the forces on the couplers, even if the coupler calculations are correct. I doubt that there&#039;s a fault in the actual coupler calculations, because that&#039;s just a measurement of the force as a byproduct of the movement simulation, rather than a seperate simulation for the purpose of coupler breakage. Remember that we do not simulate any destruction of the vehicles, nor do we simulate any off-center forces on the train other than the effect of curved track, so if something is going to give internally, it will be the couplers. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ok Chris here it is, a picture of the head on where the coupler survived and the engine was crushed.&lt;br /&gt;
[http://www.csx-sucks.com/pictures/?al_head_on.jpg Head on]&lt;br /&gt;
btw I&#039;m not an English major and don&#039;t know how to format, but I know physics and trains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please Chris - if we&#039;re going to have a Wiki at least make an effort to actually read what is written. The previous contributor just stated that even when he sets the breakage value under compression to a ridiculously high figure, the couplers still break. You then say it sounds as if everything is working correctly?!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please re-read what i said above. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The other problem is that despite what you say Chris, the current implementation does not break couplers if the specified force is exceeded in tension. The simple test is as follows. On the Tidewater route there is a grade that climbs from the river up to the tunnel (the one you guys used to do the steam physics demo session in TRS2006). On this grade put an SD40-2 and the 3000 tonne US Coal consist. Add the vehicle physics rule to the session and set the coupler breakage value in tension as 1Kn.&lt;br /&gt;
The standard SD40-2 enginespec throttle curve puts out 165Kn tractive effort at zero speed in notch 1, so as soon as we release the brakes and open the throttle to notch 1, we should have exceeded the first coupler&#039;s breaking tension by a factor of 165 times!! They don&#039;t break though.&lt;br /&gt;
&lt;br /&gt;
I personally suspect that Trainz actually calculates neither tension or compression forces correctly. My test could likewise be used to test compression sinply by putting the loco at the back of the train and pushing. The only time I&#039;ve had couplers break is when there is a speed difference between two cars equal or greater to the speed value set for &amp;quot;couplers break when coupling above X mph&amp;quot; in the rule. -Stuart&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The forces at the couplers are not a separate calculation, but rather are an integral component of the train movement physics. If this was not functioning, the train would not move. So I think it&#039;s reasonably safe to say that the actual forces are being calculated correctly. Now, that doesn&#039;t mean that the coupler breakage code is working, or that the rules which control the coupler breakage setting is working - so I am not saying that there are no bugs here, but rather that I don&#039;t think that there are any problems with the coupler force calculations themselves. If you have a reproducible case which demonstrates a failure of one of these components, then I&#039;d strongly encourage you to bring this up on the public test forum where the QA guys will see your comments and follow it up. The wiki is a documentation tool, not a bug reporting tool. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Are there any connection between forces in couplers and couplers&#039; expansion? I can&#039;t find any expanding or compression of couplers after the train has been put in motion, even using reverse traction force (until the train stops to change the direction). Also the &amp;quot;expansion&amp;quot; and &amp;quot;compression&amp;quot; functions of GS are mixed up, their arguments have to be in Newtons, not kiloNewtons. -Vladimir&lt;br /&gt;
&lt;br /&gt;
==Cab Sway==&lt;br /&gt;
&lt;br /&gt;
The cab sway was also another idea that never worked in TRS2006 no matter how much you changed the settings and should be addressed or removed. -dmatlock&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;It works as designed. If you&#039;d like to see a nicer effect, please specify details about what you think the effect should be. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
chris i can&#039;t tell that the engine(in cab mode) sways or cars for that matter they all hit a turnout and its like nothing happened. in real life I&#039;ve never seen a car or engine not sway even when going on straight track. all cars/engines sway and most have a resonance between 22km/h and 35km/h and can sway enough to derail under the right conditions. the taller the car (you guessed it) the more it sways. speed, cg, and springs on the trucks all have a little to do with it, even the wind and direction have an effect. if trainz really wants to make this part work they must have the cg of the cars and engines and the cg if its loaded and calculate the sway of each. Man thats a lot of calculations just for physics, and thats not all thats needed to make a train in trainz look, act, and feel like a real train. later chris. -dmatlock&lt;br /&gt;
&lt;br /&gt;
I feel I should mention that I have seen cars and engines with the sway working but the sway has been way to much; more like a ship in a storm than a train going across the desert. -peter&lt;br /&gt;
&lt;br /&gt;
ok chris ive looked at the &amp;quot;sway&amp;quot; again and it does have an effect but its more leaning than sway. when i think sway its not steady, but varies as the springs compress and release. -dmatlock&lt;br /&gt;
&lt;br /&gt;
I think that sway must be simple, not to overload the core of the game. It may be created to join tracks or a junction. In such a place would train made sway, which can be defined in CONFIG. This definition is only a &amp;quot;solid spring&amp;quot;, nothing more. Simply setting from 0 to 1 is needed ;-)&lt;br /&gt;
Big sway may also be made manually, using a set connection tracks - its downgrade/reduction (I make it in TRS04: not bad results :-)  &lt;br /&gt;
Professional term is (cross) Fall. Sorry for my school english :-) -drew&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Physics&amp;diff=1870</id>
		<title>Physics</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Physics&amp;diff=1870"/>
		<updated>2011-05-13T11:02:25Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* Coupler Breakage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font color=red&amp;gt;&#039;&#039;This page needs to be formatted into a decent information source, with commentary on what is simulated, what is not simulated, and what the suspected bugs are if any. -chris&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Coupler Breakage==&lt;br /&gt;
&lt;br /&gt;
The coupler breakage feature was a great idea in Trainz Railroad Simulator 2006 for the realist but it has problems with its script that doesn&#039;t allow a different calculation for stretch,expansion and buff,compression forces. Trying to include the &amp;quot;coupler-compression&amp;quot; in the script would do nothing. A train just moving down a track should not break a coupler aka &amp;quot;knuckle&amp;quot;. The buff,compression force on a standard &amp;quot;Janney&amp;quot; knuckle is huge and the car is likely to be crushed or jackknifed before the coupler breaks. Under normal freight train conditions the slack is stretched, like a chain, through the whole train and when the train tops a hill and the last car(s) start accelerating and it can actually get going faster than the locomotive but only until the slack is bunched all the way to the loco, when the slack hits the loco it accelerates to the trains speed and then the slack is bunched. This happens not all at once but car by car starting with the last one and acts like dominoes. The tensile strength of a knuckle is around 390000 lbs ~1735kN static shock load can reach 520000 lbs or more. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;I&#039;m uncertain on what your point is here. Trainz calculates the compression and expansion forces running through the couplers, and flags them as broken if these forces exceed the specified limits. You can tweak the limits to whatever you think is appropriate. Slack and compression of the entire consist is modelled appropriately to achieve this result. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
chris, the point is couplers don&#039;t break in compression, cars are crushed or most likely jackknife aka derail. I know from experience that on a 13000 ton coal train, that when the train brakes are used even in an emergency application that the couplers don&#039;t break. Also trying to use dynamic brakes on the engine also break couplers and it usually happens between the engines, if the engine isn&#039;t powerful enough to break couplers in expansion then it should not be able to do so while dynamic braking. I was going to find a few pictures of where couplers have hit head on at high speed and the coupler survived the car or engine was crushed. i just couldn&#039;t find one on the net. when i try to use the physics, no matter how high i make the settings the couplers will break in compression the stock settings are 2500kn in expansion; there are no compression settings without changing the script manually; and I&#039;ve tried 100000kn, and thats not a typo, and still break couplers in compression. The problem is, is that trainz does not separate compression from expansion calculations. if one or the other reaches the limit, the coupler breaks. Vehicle Physics,&amp;lt;kuid:-16:280742&amp;gt; is my version that is doing this. if you need more detail ill be back. thanks chris.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;From what you&#039;re saying here, it sounds like we&#039;re modelling both compression and expansion correctly (and yes, we model these seperately) but we&#039;re not modelling any kind of compression within the vehicle itself. This is quite true - we assume that the vehicle is infinitely rigid, so any movement applied to one end of a vehicle will result in an equal movement at the other end of the vehicle. This will certainly exaggerate the forces on the couplers, even if the coupler calculations are correct. I doubt that there&#039;s a fault in the actual coupler calculations, because that&#039;s just a measurement of the force as a byproduct of the movement simulation, rather than a seperate simulation for the purpose of coupler breakage. Remember that we do not simulate any destruction of the vehicles, nor do we simulate any off-center forces on the train other than the effect of curved track, so if something is going to give internally, it will be the couplers. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ok Chris here it is, a picture of the head on where the coupler survived and the engine was crushed.&lt;br /&gt;
[http://www.csx-sucks.com/pictures/?al_head_on.jpg Head on]&lt;br /&gt;
btw I&#039;m not an English major and don&#039;t know how to format, but I know physics and trains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please Chris - if we&#039;re going to have a Wiki at least make an effort to actually read what is written. The previous contributor just stated that even when he sets the breakage value under compression to a ridiculously high figure, the couplers still break. You then say it sounds as if everything is working correctly?!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please re-read what i said above. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The other problem is that despite what you say Chris, the current implementation does not break couplers if the specified force is exceeded in tension. The simple test is as follows. On the Tidewater route there is a grade that climbs from the river up to the tunnel (the one you guys used to do the steam physics demo session in TRS2006). On this grade put an SD40-2 and the 3000 tonne US Coal consist. Add the vehicle physics rule to the session and set the coupler breakage value in tension as 1Kn.&lt;br /&gt;
The standard SD40-2 enginespec throttle curve puts out 165Kn tractive effort at zero speed in notch 1, so as soon as we release the brakes and open the throttle to notch 1, we should have exceeded the first coupler&#039;s breaking tension by a factor of 165 times!! They don&#039;t break though.&lt;br /&gt;
&lt;br /&gt;
I personally suspect that Trainz actually calculates neither tension or compression forces correctly. My test could likewise be used to test compression sinply by putting the loco at the back of the train and pushing. The only time I&#039;ve had couplers break is when there is a speed difference between two cars equal or greater to the speed value set for &amp;quot;couplers break when coupling above X mph&amp;quot; in the rule. -Stuart&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The forces at the couplers are not a separate calculation, but rather are an integral component of the train movement physics. If this was not functioning, the train would not move. So I think it&#039;s reasonably safe to say that the actual forces are being calculated correctly. Now, that doesn&#039;t mean that the coupler breakage code is working, or that the rules which control the coupler breakage setting is working - so I am not saying that there are no bugs here, but rather that I don&#039;t think that there are any problems with the coupler force calculations themselves. If you have a reproducible case which demonstrates a failure of one of these components, then I&#039;d strongly encourage you to bring this up on the public test forum where the QA guys will see your comments and follow it up. The wiki is a documentation tool, not a bug reporting tool. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Are there any connection between forces in couplers and couplers&#039; expansion? I can&#039;t find any expanding or compression of couplers after the train has been put in motion, even using reverse traction force (until the train stops to change the direction). -Vladimir&lt;br /&gt;
&lt;br /&gt;
==Cab Sway==&lt;br /&gt;
&lt;br /&gt;
The cab sway was also another idea that never worked in TRS2006 no matter how much you changed the settings and should be addressed or removed. -dmatlock&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;It works as designed. If you&#039;d like to see a nicer effect, please specify details about what you think the effect should be. -chris&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
chris i can&#039;t tell that the engine(in cab mode) sways or cars for that matter they all hit a turnout and its like nothing happened. in real life I&#039;ve never seen a car or engine not sway even when going on straight track. all cars/engines sway and most have a resonance between 22km/h and 35km/h and can sway enough to derail under the right conditions. the taller the car (you guessed it) the more it sways. speed, cg, and springs on the trucks all have a little to do with it, even the wind and direction have an effect. if trainz really wants to make this part work they must have the cg of the cars and engines and the cg if its loaded and calculate the sway of each. Man thats a lot of calculations just for physics, and thats not all thats needed to make a train in trainz look, act, and feel like a real train. later chris. -dmatlock&lt;br /&gt;
&lt;br /&gt;
I feel I should mention that I have seen cars and engines with the sway working but the sway has been way to much; more like a ship in a storm than a train going across the desert. -peter&lt;br /&gt;
&lt;br /&gt;
ok chris ive looked at the &amp;quot;sway&amp;quot; again and it does have an effect but its more leaning than sway. when i think sway its not steady, but varies as the springs compress and release. -dmatlock&lt;br /&gt;
&lt;br /&gt;
I think that sway must be simple, not to overload the core of the game. It may be created to join tracks or a junction. In such a place would train made sway, which can be defined in CONFIG. This definition is only a &amp;quot;solid spring&amp;quot;, nothing more. Simply setting from 0 to 1 is needed ;-)&lt;br /&gt;
Big sway may also be made manually, using a set connection tracks - its downgrade/reduction (I make it in TRS04: not bad results :-)  &lt;br /&gt;
Professional term is (cross) Fall. Sorry for my school english :-) -drew&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=1860</id>
		<title>Class MeshObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=1860"/>
		<updated>2011-05-05T19:59:20Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetMeshAnimationSpeed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****MeshObject&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a base class for [[class Asset|Asset]] based game objects that have meshes, effects, animations and particles. Interface methods to deal with these are provided so things like showing or hiding a mesh, attaching a mesh to an attachment point or controlling an animation can be done from a script.&lt;br /&gt;
&lt;br /&gt;
For animation Trainz interpolates between key frames. This means an intermediate animation frame is calculated dynamically to be-in-synch with the game&#039;s framerate.&lt;br /&gt;
&lt;br /&gt;
Trainzscript is an interpreted scripting language intended to be used to monitor and react to events in the Trainz world, not to perform sophisticated real-time animation tasks. Using a script to start an animation in response to an event in a thread is reasonable. However trying to control animation tightly down to short intervals is likely to provide unsatisfactory results and to adversely affect overall performance of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MeshObject Messages==&lt;br /&gt;
Messages related to MeshObject assets:&lt;br /&gt;
*[[Animation-Event Message]]&lt;br /&gt;
*[[pfx Message]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject GetFXAttachment(string effect)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of the mesh effect to query. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject currently attached to the named effect.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject attachment = GetFXAttachment(&amp;quot;coupler&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*The method returns null if the effect is unoccupied.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrame(string mesh)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Current fame of the animation file within the specified mesh container.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float height = GetMeshAnimationFrame(&amp;quot;zPosition&amp;quot;)&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is likely to be an interpreted floating point value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrameCount==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrameCount(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The number of frames in the specified animation.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float positions = GetMeshAnimationFrameCount(&amp;quot;lever&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is a float rather than an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTextureSelfIlluminationState==&lt;br /&gt;
{{MethodHeader|public native bool GetTextureSelfIlluminationState(string texture)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns true if the specified texture has self illumination set.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool isEmissive = GetTextureSelfIlluminationState(&amp;quot;texture&amp;quot;);&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;
==HasMesh==&lt;br /&gt;
{{MethodHeader|public native bool HasMesh(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (HasMesh(&amp;quot;ventilation&amp;quot;)) StartMeshAnimationLoop(&amp;quot;fans&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetFXAnimationState(string effect, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of attached-animation effect containing the animation to play.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = true to start the animation loop, false to stop.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (gateClosed) SetFXAnimationState(&amp;quot;gate&amp;quot;,false);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject SetFXAttachment(string effect, Asset asset)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containing the attachment to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = mesh asset to attach to the effect. If asset is null any existing asset will be removed and nothing will be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject which has been attached to the named effect. If the mesh asset isn&#039;t &amp;quot;kind mesh&amp;quot;, returns null.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject lamp = SetFXAttachment(&amp;quot;lamp0&amp;quot;,redlamp);&lt;br /&gt;
;Notes&lt;br /&gt;
*Returns null if the effect is unoccupied when the method returns.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXCoronaTexture==&lt;br /&gt;
{{MethodHeader|public native void SetFXCoronaTexture(string effect, Asset texture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the corona to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = corona texture asset to attach to the effect. If asset is null the corona will be turned off.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXCoronaTexture(&amp;quot;stopLight&amp;quot;,redCorona);&lt;br /&gt;
;Notes&lt;br /&gt;
*Other corona parameters such as frequency and size are defined in &#039;&#039;config.txt&#039;&#039; and cannot be altered by script code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXNameText==&lt;br /&gt;
{{MethodHeader|public native void SetFXNameText(string effect, string text)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the name effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; = new string value.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXNameText(&amp;quot;home&amp;quot;,&amp;quot;Shangri-La&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Method will not accept an empty string in the &#039;&#039;text&#039;&#039; parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXTextureReplacement==&lt;br /&gt;
{{MethodHeader|public native void SetFXTextureReplacement(string effect, Asset textureGroup, int index)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = texture-replacement effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;textureGroup&#039;&#039;&#039; = reference to texture group asset which is the source of the texture to be applied.&lt;br /&gt;
*&#039;&#039;&#039;index&#039;&#039;&#039; = index into &#039;&#039;textures&#039;&#039; table of texture-group indicating which texture to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,&amp;quot;loadTextures&amp;quot;,5);   // applies texture 5 from texture-group&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,null,0);             // clears the effect, reinstating the texture defined in the asset.&lt;br /&gt;
;Notes&lt;br /&gt;
*Use null in the textureGroup parameter to turn texture replacement off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMesh==&lt;br /&gt;
{{MethodHeader|public native void SetMesh(string mesh, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMesh(&amp;quot;default&amp;quot;,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Shows the specified mesh and hides all other meshes.&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationFrame(string mesh, float frame)&amp;lt;br&amp;gt;&lt;br /&gt;
public native void SetMeshAnimationFrame(string mesh, float frame, float period)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;frame&#039;&#039;&#039; = the frame position to which the animation is to be moved, this may be an interpolated value.&lt;br /&gt;
*&#039;&#039;&#039;period&#039;&#039;&#039; = the period over which the animation will be moved from its current position to the newly specified point.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0);      // move the animation to frame 5 instantaneously&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0,2.0);  // move the animation to frame 5 over 2 seconds&lt;br /&gt;
;Notes&lt;br /&gt;
*Moves the specified animation to the specified frame.&lt;br /&gt;
*For the first variant the transition is instant.&lt;br /&gt;
*For the second variant the transition will complete during the specified period.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationSpeed==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationSpeed(string mesh, float speed)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;speed&#039;&#039;&#039; = multiplication factor to apply to the original animation speed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,2.0);   // run fans at double speed&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,-1.0);  // run fans backwards at original speed&lt;br /&gt;
;Notes&lt;br /&gt;
*Modifies the speed at which the animation is played.&lt;br /&gt;
*The original speed is multiplied by the new speed factor.&lt;br /&gt;
*Use negative values to make the animation run in reverse.&lt;br /&gt;
*It is &#039;&#039;not&#039;&#039; compatible with SetMeshAnimationState function for the same mesh. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationState(string mesh, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = the direction in which the file is to be played, true for forwards, false for backwards.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,true);    // opens the door&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,false);   // closes the door&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which have defined start and end points such as the opening and closing of a gate or door.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is true the animation plays forwards from its current position to the last frame. If the current position is already at the last frame the call has no effect.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is false the animation plays backwards from its current position to the first frame. If the current position is already at the first frame the call has no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshVisible==&lt;br /&gt;
{{MethodHeader|public native void SetMeshVisible(string mesh, bool visible, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;visible&#039;&#039;&#039; = true to show the mesh, false to hide it.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshVisible(&amp;quot;driver&amp;quot;, false, 1.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetTextureSelfIllumination==&lt;br /&gt;
{{MethodHeader|public native void SetTextureSelfIllumination(string texture, float r, float g, float b)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
*&#039;&#039;&#039;r,g,b&#039;&#039;&#039; = red green and blue components of self illumination value to apply, range 0 .. 1 where 1 is equal to 100%.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetTextureSelfIllumination(&amp;quot;interior&amp;quot;,0.5,0.5,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Applies an emissive component to the texture using the red, green and blue components specified.&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;
==StartMeshAnimationLoop==&lt;br /&gt;
{{MethodHeader|public native void StartMeshAnimationLoop(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StartMeshAnimationLoop(&amp;quot;windmill&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which are designed to run in a continuous loop.&lt;br /&gt;
*The speed of the animation can be altered using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]]&lt;br /&gt;
*Using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]] with a negative value will cause the animation to play in reverse.&lt;br /&gt;
*[[#StopMeshAnimation|StopMeshAnimation()]] will halt the animation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StopMeshAnimation==&lt;br /&gt;
{{MethodHeader|public native void StopMeshAnimation(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be stopped.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StopMeshAnimation(&amp;quot;default&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Turns animation off for the specified mesh.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwapTextureOnMesh==&lt;br /&gt;
{{MethodHeader|public native void SwapTextureOnMesh(string mesh, string oldTexture, string newTexture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the texture to be changed.&lt;br /&gt;
*&#039;&#039;&#039;oldTexture&#039;&#039;&#039; = the original &#039;&#039;*.texture.txt&#039;&#039; file to use as the source of the transition.&lt;br /&gt;
*&#039;&#039;&#039;newTexture&#039;&#039;&#039; = the new &#039;&#039;*.texture.txt&#039;&#039; file to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SwapTextureOnMesh(&amp;quot;left-passenger-door&amp;quot;,&amp;quot;gwr&amp;quot;,&amp;quot;lms&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Swap one texture against another texture on specified mesh.&lt;br /&gt;
*Similar to texture-replacement effects, but without the need for an extra texture asset. &lt;br /&gt;
*&#039;&#039;&#039;possible bug&#039;&#039;&#039; Texture names in the .im file must be lower case for this function to work properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1859</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1859"/>
		<updated>2011-05-05T19:48:59Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetHeadlightColor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the &amp;quot;diffuse&amp;quot; component of illumination (this component remains white). Works correctly with ground and bump-mapped meshes only.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
* A multiplier value of 1.0 disables the wheelspin sound.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===NotifyTrainChanged===&lt;br /&gt;
{{MethodHeader|public void NotifyTrainChanged(Train prevTrain, Train nextTrain)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;prevTrain&#039;&#039;&#039; = The train to which this Vehicle was previously attached.&lt;br /&gt;
*&#039;&#039;&#039;nextTrain&#039;&#039;&#039; = The train to which this Vehicle is now attached.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*In ts12 only.&lt;br /&gt;
*Override this function as required, but don&#039;t forget to call the inherited version in case it does something in the future.&lt;br /&gt;
*Attempting to manipulate the makeup or positioning of any Train from within this function is illegal behavior. If you need to do that, trigger a delayed action using a message or a thread.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1858</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1858"/>
		<updated>2011-05-05T19:47:49Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetHeadlightColor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the &amp;quot;diffuse&amp;quot; component of illumination (this component remains white). Works correctly with bump-mapped meshes only.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
* A multiplier value of 1.0 disables the wheelspin sound.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===NotifyTrainChanged===&lt;br /&gt;
{{MethodHeader|public void NotifyTrainChanged(Train prevTrain, Train nextTrain)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;prevTrain&#039;&#039;&#039; = The train to which this Vehicle was previously attached.&lt;br /&gt;
*&#039;&#039;&#039;nextTrain&#039;&#039;&#039; = The train to which this Vehicle is now attached.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*In ts12 only.&lt;br /&gt;
*Override this function as required, but don&#039;t forget to call the inherited version in case it does something in the future.&lt;br /&gt;
*Attempting to manipulate the makeup or positioning of any Train from within this function is illegal behavior. If you need to do that, trigger a delayed action using a message or a thread.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1857</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1857"/>
		<updated>2011-05-05T19:46:19Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetHeadlightColor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the &amp;quot;diffuse&amp;quot; component of illumination (this component remains white).&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
* A multiplier value of 1.0 disables the wheelspin sound.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===NotifyTrainChanged===&lt;br /&gt;
{{MethodHeader|public void NotifyTrainChanged(Train prevTrain, Train nextTrain)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;prevTrain&#039;&#039;&#039; = The train to which this Vehicle was previously attached.&lt;br /&gt;
*&#039;&#039;&#039;nextTrain&#039;&#039;&#039; = The train to which this Vehicle is now attached.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*In ts12 only.&lt;br /&gt;
*Override this function as required, but don&#039;t forget to call the inherited version in case it does something in the future.&lt;br /&gt;
*Attempting to manipulate the makeup or positioning of any Train from within this function is illegal behavior. If you need to do that, trigger a delayed action using a message or a thread.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1856</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1856"/>
		<updated>2011-05-05T19:34:37Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* ViewSchedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
* A multiplier value of 1.0 disables the wheelspin sound.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===NotifyTrainChanged===&lt;br /&gt;
{{MethodHeader|public void NotifyTrainChanged(Train prevTrain, Train nextTrain)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;prevTrain&#039;&#039;&#039; = The train to which this Vehicle was previously attached.&lt;br /&gt;
*&#039;&#039;&#039;nextTrain&#039;&#039;&#039; = The train to which this Vehicle is now attached.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*In ts12 only.&lt;br /&gt;
*Override this function as required, but don&#039;t forget to call the inherited version in case it does something in the future.&lt;br /&gt;
*Attempting to manipulate the makeup or positioning of any Train from within this function is illegal behavior. If you need to do that, trigger a delayed action using a message or a thread.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1855</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1855"/>
		<updated>2011-05-05T19:28:52Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetWheelslipTractionMultiplier */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
* A multiplier value of 1.0 disables the wheelspin sound.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1854</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1854"/>
		<updated>2011-05-05T19:28:24Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetWheelslipTractionMultiplier */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
A multiplier value of 1.0 disables the wheelspin sound.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1853</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1853"/>
		<updated>2011-05-05T19:26:18Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* GetMaximumTractiveEffort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in newtons (N). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1852</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1852"/>
		<updated>2011-05-05T19:25:08Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetMaximumTractiveEffort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in kilonewtons (kN). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in newtons (N). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(185000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in newtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1849</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1849"/>
		<updated>2011-04-29T16:17:27Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetMaximumCouplerExpansionStress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in kilonewtons (kN). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compression stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compression stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compression stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in kilonewtons (kN). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(1850.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in kilonewtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1848</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1848"/>
		<updated>2011-04-29T16:16:14Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetMaximumCouplerCompressionStress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in kilonewtons (kN). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;tensile&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum tensile stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler tensile stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum tesnile stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in kilonewtons (kN). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(1850.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in kilonewtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1847</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1847"/>
		<updated>2011-04-29T16:15:44Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetMaximumCouplerCompressionStress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in kilonewtons (kN). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum &#039;&#039;expansion&#039;&#039; stress in kilonewtons (kN), Use 0.0 to turn off this simulation. &#039;&#039;// please, check this&#039;&#039;&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler expansion stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum expansion stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum tensile stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler tensile stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum tesnile stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in kilonewtons (kN). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(1850.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in kilonewtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1846</id>
		<title>Class Vehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Vehicle&amp;diff=1846"/>
		<updated>2011-04-29T16:13:39Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* GetDefaultMaximumCouplerExpansionStress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]] *&lt;br /&gt;
*****[[Class MeshObject|MeshObject]]&lt;br /&gt;
******[[Class MapObject|MapObject]]&lt;br /&gt;
*******[[Class Trackside|Trackside]]&lt;br /&gt;
********Vehicle&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A vehicle is a single piece of rolling stock including locomotives and tenders.&lt;br /&gt;
*A vehicle is always part of a train, if a vehicle is decoupled and left alone TRS will create a new consist to include it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Messages==&lt;br /&gt;
*Messages sent to and from Vehicle objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=75%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Derailed||Vehicle||Broadcast||Vehicle has derailed and can no longer be used. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Coupled||Vehicle||Broadcast||Vehicle has coupled up with another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Decoupled||Vehicle||Broadcast||Vehicle has decoupled from another vehicle. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Bad Couple||Vehicle||Broadcast||Vehicle has coupled with another vehicle at too high a velocity. &lt;br /&gt;
|-&lt;br /&gt;
|[[Vehicle Messages|Vehicle]]||Collided||Vehicle||Broadcast||Vehicle has collided with another vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Coupler Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  COUPLE_NONE = 0||Neither coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_FRONT = 1||Front coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BACK = 2||Back coupler.&lt;br /&gt;
|-&lt;br /&gt;
|public define int COUPLE_BOTH = COUPLE_FRONT &amp;amp;#166; COUPLE_BACK||Both couplers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Direction Relationships===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int  DIRECTION_NONE = 0||No known relationship.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_FORWARD = 1||Forward, facing in the same direction.&lt;br /&gt;
|-&lt;br /&gt;
|public define int DIRECTION_BACKWARD = -1||Backward, facing in opposite directions.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Engine Types===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int ENGINE_NONE = 0||Not a powered vehicle.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STANDARD = 1||Diesel, Diesel-Electric, Electric.&lt;br /&gt;
|-&lt;br /&gt;
|public define int ENGINE_STEAM = 2||Steam powered.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Vehicle Type Flags===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|public define int TYPE_LOCOMOTIVE = 1||Vehicle is a powered locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_TENDER = 2||Vehicle carries fuel for a locomotive.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TYPE_HAS_INTERIOR = 4||Vehicle has an interior. This does not necessarily mean that it is a lcomotive.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=425|&amp;lt;b&amp;gt;public IndustryProductInfoCollection  vehicleProductInfoCollection&amp;lt;/b&amp;gt;||A data object that allows tracking of products and associated assets &amp;amp; queues.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginLoad===&lt;br /&gt;
{{MethodHeader|float BeginLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BeginUnload===&lt;br /&gt;
{{MethodHeader|float BeginUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BeginLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities before loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanLoadProductFromQueue===&lt;br /&gt;
{{MethodHeader|public bool CanLoadProductFromQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to load the vehicle, false otherwise.&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanLoadProductFromQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CanUnloadProductToQueue===&lt;br /&gt;
{{MethodHeader|public bool CanUnloadProductToQueue(ProductQueue queue)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = The queue to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the vehicle and queue are compatible and the queue can be used to unload the vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (CanUnloadProductToQueue(industryOutQueue)) {&lt;br /&gt;
    DoTheProcess();&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Couple===&lt;br /&gt;
{{MethodHeader|public native bool Couple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, fale otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Couple(vehicle2)) Interface.Print(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Couples this vehicle to the given vehicle which must already be adjacent. &lt;br /&gt;
*When a vehicle is decoupled from another, the couplers are left in an unlocked state, even though the vehicles are flush against each other.&lt;br /&gt;
*This state will remain until the vehicles move a small distance apart. &lt;br /&gt;
*Sometimes you may wish to cause them to couple again and that is the intended use of this method. &lt;br /&gt;
*If the two vehicles involved are not adjacent then this method will have no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndLoad===&lt;br /&gt;
{{MethodHeader|float EndLoad(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndLoad(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after loading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EndUnload===&lt;br /&gt;
{{MethodHeader|float EndUnload(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float EndUnload(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which should be overridden by the script writer to perform customised activities after unloading at an industry.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAuxReservoirPressure===&lt;br /&gt;
{{MethodHeader|public native float GetAuxReservoirPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current auxiliary reservoir pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float ARP = GetAuxReservoirPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBogeyList===&lt;br /&gt;
{{MethodHeader|public native Bogey[ ] GetBogeyList(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array containing references to all the Bogey objects attached to this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Bogey[] bogies = GetBogeyList();&lt;br /&gt;
;Notes&lt;br /&gt;
*Bogies are indexed in the same numerical order as they are listed in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
*Invisible bogies etc. are included.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakeCylinderPressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakeCylinderPressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake cylinder pressure of this vehicle. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float BCP = GetBrakeCylinderPressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetBrakePipePressure===&lt;br /&gt;
{{MethodHeader|public native float GetBrakePipePressure(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current brake pipe pressure of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float BPP = GetBrakePipePressure();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The cabin sway amount for this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native bool GetCouplerBreakageEnabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if coupler breakages are enabled on this vehicle, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (GetCouplerBreakageEnabled()) Interface.Print(&amp;quot;Drive carefully to avoid breaking the couplers&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingDirection===&lt;br /&gt;
{{MethodHeader|public native int GetCouplingDirection(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Adjacent vehicle to couple to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of a neighbouring vehicle, relative to the direction of the caller.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool direction = GetCouplingDirection(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*If the result is DIRECTION_FORWARD then both vehicles have the same orientation.&lt;br /&gt;
*If the result is DIRECTION_BACKWARD then the two vehicles face in opposite directions.&lt;br /&gt;
*The fact that this method returns a value does not mean that it is possible for the two vehicles to couple.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetCouplingStress===&lt;br /&gt;
{{MethodHeader|public native float GetCouplingStress(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;other&#039;&#039;&#039; = Other vehicle in the same consist to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The calculated coupling stress between the two vehicles in kilonewtons (kN);&lt;br /&gt;
;Syntax&lt;br /&gt;
 float kn = GetCouplingStress(vehicle2);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;float color=red&amp;gt;Must the two vehicles be adjacent?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultCabinSwayAmount(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default cabin sway amount for this vehicle as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float CSA = GetCabinSwayAmount();&lt;br /&gt;
;Notes&lt;br /&gt;
*Higher positive values indicate higher levels of cabin sway while a 0.0 indicates no cabin sway.&lt;br /&gt;
*See also [[#SetCabinSwayAmount|SetCabinSwayAmount()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetDefaultMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler expansion stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCS = GetDefaultMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum coupler compression stress value for this vehicle in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetDefaultMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetDefaultMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum speed at which this vehicle can be coupled to without breaking the coupler, as defined in &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCV = GetDefaultMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDefaultMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetDefaultMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The default maximum tractive effort of this vehicle from its configuration in kilonewtons (kN), as defined in &#039;&#039;config.txt&#039;&#039;. &lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMTE = GetDefaultMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDirectionRelativeToTrain===&lt;br /&gt;
{{MethodHeader|public native bool GetDirectionRelativeToTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle faces in the same direction as the train&#039;s current heading, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool vehicleToTrain = GetDirectionRelativeToTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineParam===&lt;br /&gt;
{{MethodHeader|public native float GetEngineParam(string param)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = One of the engine parameter strings listed below.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current value of the given engine parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float pressure = GetEngineParam(&amp;quot;steam-boiler-pressure&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Engine parameter strings you can use with this method are:&lt;br /&gt;
**&amp;quot;brake-cylinder-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;brake-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;current-drawn&amp;quot;&lt;br /&gt;
**&amp;quot;equaliser-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;flow&amp;quot;&lt;br /&gt;
**&amp;quot;horn&amp;quot;&lt;br /&gt;
**&amp;quot;main-reservoir-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;max-coal-mass&amp;quot;&lt;br /&gt;
**&amp;quot;max-fire-temperature&amp;quot;&lt;br /&gt;
**&amp;quot;no3-pipe-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-liquid-percent&amp;quot;&lt;br /&gt;
**&amp;quot;steam-boiler-pressure&amp;quot;&lt;br /&gt;
**&amp;quot;steam-piston-cycle&amp;quot;&lt;br /&gt;
**&amp;quot;wheelslip&amp;quot;&lt;br /&gt;
**&amp;quot;engine-force&amp;quot;&lt;br /&gt;
**&amp;quot;applied-force&amp;quot;&lt;br /&gt;
**&amp;quot;max-te&amp;quot;&lt;br /&gt;
*Some of the values refer only to steam engines.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetEngineType===&lt;br /&gt;
{{MethodHeader|public native int GetEngineType(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Engine Types|Engine Type]] constants describing the engine type of this vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int eType = GetEngineType();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLength===&lt;br /&gt;
{{MethodHeader|public native float GetLength(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The length of this vehicle in metres.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = GetLength();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLoadTime===&lt;br /&gt;
{{MethodHeader|float GetLoadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetLoadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to load this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the loading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMass===&lt;br /&gt;
{{MethodHeader|public native float GetMass(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mass of the vehicle in kilograms.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float mass = GetMass();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|publc native float GetMaximumCouplerCompressionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCS = GetMaximumCouplerCompressionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerCompressionStress|SetMaximumCouplerCompressionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCouplerExpansionStress(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum coupler expansion stress value for this vehicle in kilonewtons (kN).&lt;br /&gt;
;Syntax&lt;br /&gt;
 float DMCE = GetMaximumCouplerExpansionStress();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCouplerExpansionStress|SetMaximumCouplerExpansionStress()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetMaximumCoupleVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The  maximum speed at which this vehicle can be coupled to without breaking the coupler.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float MCV = GetMaximumCoupleVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumCoupleVelocity|SetMaximumCoupleVelocity()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|GetMaximumTractiveEffort()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The maximum tractive effort of this vehicle from its configuration in kilonewtons (kN). &lt;br /&gt;
;Syntax&lt;br /&gt;
 float MTE = GetMaximumTractiveEffort();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetMaximumTractiveEffort|SetMaximumTractiveEffort()]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMyTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetMyTrain(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A reference to the train of which this vehicle is part.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train train = GetMyTrain();&lt;br /&gt;
;Notes&lt;br /&gt;
*All vehicles belong to a Train consist, even if a vehicle is not coupled to any other vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetProductRestriction===&lt;br /&gt;
{{MethodHeader|public ProductFilter GetProductRestriction(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current product restriction filter if any, null otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 ProductFilter filter = GetProductRestriction();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRelationToTrack===&lt;br /&gt;
{{MethodHeader|public native int GetRelationToTrack(Buildable obj, string trackName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Reference to a Buildable object.&lt;br /&gt;
*&#039;&#039;&#039;trackName&#039;&#039;&#039; = String representing the name of a track as defined in the Buildable&#039;s &#039;&#039;config.txt&#039;&#039;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Direction Relationships|Direction Relationship]] constants indicating the direction of the vehicle, relative to the Buildable&#039;s attached track.&lt;br /&gt;
;Syntax&lt;br /&gt;
*This method will return either DIRECTION_FORWARD or DIRECTION_BACKWARD if the vehicle is on the track as specified by the arguments or on a directly neighboring track, otherwise DIRECTION_NONE will be returned.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native string GetRunningNumber(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string fleetId = GetRunningNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is set using [[#SetRunningNumber|SetRunningNumber()]] and should be restricted to alphanumeric characters and paces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetSandingTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A wheelslip traction multiplier to apply when sand is in use.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slipFactor = GetSandingTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetSandingTractionMultiplier|SetSandingTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackGradient===&lt;br /&gt;
{{MethodHeader|public native float GetTrackGradient(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current track gradient as a percentage.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float gradient = GetTrackGradient();&lt;br /&gt;
;Notes&lt;br /&gt;
*The sign of the gradient is determined by the direction of this vehicle relative to the gradient.&lt;br /&gt;
*A negative sign indicates that the vehicle is facing down a gradient while a positive sign indicates the vehicle is facing up a gradient. &lt;br /&gt;
*The vehicle&#039;s direction may not match that of the train so the value returned here may not be what you expect.&lt;br /&gt;
*Use [[#GetDirectionRelativeToTrain|GetDirectionRelativeToTrain()]] to check this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetUnloadTime===&lt;br /&gt;
{{MethodHeader|float GetUnloadTime(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The time required, in seconds, for the activity to complete.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float GetUnloadTime(LoadingReport report) {&lt;br /&gt;
    DoStuff(report);&lt;br /&gt;
    return 10.0;&lt;br /&gt;
 }&lt;br /&gt;
;Notes&lt;br /&gt;
*This is a callback method which informs the game engine of the time needed to unload this vehicle.&lt;br /&gt;
*The method may be use to perform customised activities during the unloading operation.&lt;br /&gt;
*These include such operations as particle effects and animations.&lt;br /&gt;
*The report parameter provides details of the industries and vehicles involved and of their spatial relationship. &lt;br /&gt;
*It is the responsibility of the script writer to determine the time required for these activities and to return this in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVehicleTypeFlags===&lt;br /&gt;
{{MethodHeader|public native int GetVehicleTypeFlags(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Vehicle Type Flags|Vehicle Type Flags]] representing what kind of vehicle the current object is. &lt;br /&gt;
;Syntax&lt;br /&gt;
 int flags = GetVehicleTypeFlags();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current instantaneous velocity of the train in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = GetVelocity();&lt;br /&gt;
;Notes&lt;br /&gt;
*Use the [[Class Train#Measurement Conversion Multipliers|Measurement Conversion Multiplier]] constants for conversion to other units.&lt;br /&gt;
*For human consumption [[Class Train#GetSmoothedVelocity|Train.GetSmoothedVelocity()]] may be preferable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native float GetWheelslipTractionMultiplier(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current wheelslip traction multiplier value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float slip = GetWheelslipTractionMultiplier();&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be greater than or equal to 1.0.&lt;br /&gt;
*See [[#SetWheelslipTractionMultiplier|SetWheelslipTractionMultiplier()]];&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsInTunnel===&lt;br /&gt;
{{MethodHeader|public native bool IsInTunnel(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is in a tunnel, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool underground = IsInTunnel();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsOnBridge===&lt;br /&gt;
{{MethodHeader|public native void IsOnBridge(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this vehicle is on a bridge, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool onBridge = IsOnBridge();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LoadProduct===&lt;br /&gt;
{{MethodHeader|public bool LoadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the loading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 LoadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products to this vehicle&#039;s queues if possible from the industry queue specified in report. &lt;br /&gt;
*The sequence of events for a loading operation as performed by this method is:&lt;br /&gt;
**Verify that an loading operation is possible with this vehicle by calling [[#CanLoadProductFromQueue|CanLoadProductFromQueue()]].&lt;br /&gt;
**[[#BeginLoad|BeginLoad()]] on this vehicle and [[Class Industry#BeginLoad|Industry.BeginLoad()]] on the industry specified in the report are called to perform any pre-loading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for a load operation and the LoadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer from the industry to the vehicle is performed by calling ProductQueue.TransferProductFrom() on this vehicle&#039;s queue(s).&lt;br /&gt;
**[[#GetLoadTime|GetLoadTime()]] on this vehicle and [[Class Industry#GetLoadTime|Industry.GetLoadTime()]] are called. Again, LoadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndLoad|EndLoad()]] and [[Class Industry#EndLoad|Industry.EndLoad()]] are called to perform any post-loading events. As before LoadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reposition===&lt;br /&gt;
{{MethodHeader|public native bool Reposition(Train train, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(Vehicle vehicle, int myCoupleDir, int otherCoupleDir)&amp;lt;br&amp;gt;public native bool Reposition(TrackMark mark, bool direction)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;train&#039;&#039;&#039; = Train to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Vehicle to attach the vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;myCoupleDir&#039;&#039;&#039; = The end of the current vehicle that will be coupled, use either COUPLE_FRONT or COUPLE_BACK.&lt;br /&gt;
*&#039;&#039;&#039;otherCoupleDir&#039;&#039;&#039; = The end of the target vehicle that will be coupled to, use either COUPLE_FRONT or COUPLE_BACK. &lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = Trackmark to move this vehicle to.&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction for the vehicle, relative to the TrackMark.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Reposition(Train3,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Vehicle5,COUPLE_FRONT,COUPLE_BACK);&lt;br /&gt;
 Reposition(Mark9,true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Variant 1 moves the current vehicle and couples it to the specified train using the specified vehicle ends.&lt;br /&gt;
*Variant 2 moves the current vehicle and couples it to the specified vehicle using the specified vehicle ends.&lt;br /&gt;
*Variant 3 moves the current vehicle from its train to the specified trackmark, normally creating a new consist.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reverse===&lt;br /&gt;
{{MethodHeader|public native bool Reverse(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the operation was successfully completed, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (Reverse()) Interface.Print(&amp;quot;Direction of &amp;quot; + GetName() + &amp;quot; reversed&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method reverses the direction of the current vehicle in relation to its consist. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrakePipeEfficiency===&lt;br /&gt;
{{MethodHeader|public native void SetBrakePipeEfficiency(float efficiency)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;efficiency&#039;&#039;&#039; = A Normalised value in the range 0.0 .. 1.0 representing the efficiency of the brake pipe.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrakePipeEfficiency(0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBrokenBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetBrokenBrakes(bool broken)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;broken&#039;&#039;&#039; = True to render the brakes non operational, false to repair them.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetBrokenBrakes(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCabinSwayAmount===&lt;br /&gt;
{{MethodHeader|public native void SetCabinSwayAmount(float amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Cabin sway value greater than or equal to zero.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCabinSwayAmount(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*A value of zero removes all sway.&lt;br /&gt;
*Higher positive values increase the effect.&lt;br /&gt;
*The method is only of relevance to vehicles with interior views.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplerBreakageEnabled===&lt;br /&gt;
{{MethodHeader|public native void SetCouplerBreakageEnabled(bool enabled)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enabled&#039;&#039;&#039; = True enables simulation of coupler breakage.&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplerBreakageEnabled(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetCouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetCouplingMask(COUPLE_NONE); // prevents this vehicle from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from coupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public native void SetDecouplingMask(int mask)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the vehilce&#039;s couplers are allowed to couple. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetDecouplingMask(COUPLE_NONE); // prevents this vehicle from uncoupling in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[#Coupler Flags|Coupler Flag]] constants.&lt;br /&gt;
*This method will not prevent vehicles from uncoupling in Surveyor, but takes effect in Driver mode. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandbrake===&lt;br /&gt;
{{MethodHeader|public native void SetHandBrake(bool applied)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;applied&#039;&#039;&#039; = If true the handbrake is applied, if false the handbrake is released.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHandBrake(true);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightColor===&lt;br /&gt;
{{MethodHeader|SetHeadlightColor(float red, float blue, float green)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;red, blue, green&#039;&#039;&#039; = RGB components of selected colour, expressed as normalised values.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetHeadlightColour(0.5,1.0,0.5); // sets colour to RGB:128,255,128&lt;br /&gt;
;Notes&lt;br /&gt;
*This method controls the color of the illumination produced by the headlights.&lt;br /&gt;
*It does not affect the color of the headlight coronas.&lt;br /&gt;
*This should method not be used to &amp;quot;turn off&amp;quot; the headlights, as even a black light will consume CPU time with lighting calculations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerCompressionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerCompressionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum compressive stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerCompressionStress(1500.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler compressive stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum compressive stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCouplerExpansionStress===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCouplerExpansionStress(float stress)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;stress&#039;&#039;&#039; = Maximum tensile stress in kilonewtons (kN), Use 0.0 to turn off this simulation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCouplerExpansionStress(1000.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the maximum coupler tensile stress value for this vehicle. &lt;br /&gt;
*This value refers to the maximum tesnile stress which this vehicle&#039;s couplers need to experience before they break.&lt;br /&gt;
*This is effectively the stress that a coupler can withstand before it breaks.&lt;br /&gt;
*As a point of reference, a typical modern knuckle-type coupler can handle approximately 2500 kN of force before breaking.&lt;br /&gt;
*This is roughly equivalent to the weight of 2.5 million apples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumCoupleVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumCoupleVelocity(float velocity)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = The maximum speed in metres per second at which this vehicle can be coupled to without breaking a coupler. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumCoupleVelocity(10);&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; are broadcast if this speed is exceeded.&lt;br /&gt;
*If a value of zero is used &amp;quot;Vehicle&amp;quot;,&amp;quot;BadCouple&amp;quot; messages will not be issued.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetMaximumTractiveEffort===&lt;br /&gt;
{{MethodHeader|public native void SetMaximumTractiveEffort(float maxTE)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;maxTE&#039;&#039;&#039; = The maximum tractive effort of this vehicle in kilonewtons (kN). &lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMaximumTractiveEffort(1850.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*The maximum tractive effort of a vehicle refers to its maximum traction or pulling power measured in kilonewtons.&lt;br /&gt;
*This value is initially defined in the configuration of a vehicle asset but can be altered with this method. &lt;br /&gt;
*Generally, only locomotives will have tractive effort.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnSpeed(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = An arbitrary value used to vary the pitch of the train with its velocity.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnSpeed(2.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPitchBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetPitchBasedOnTrack(bool pitch)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;pitch&#039;&#039;&#039; = True to enable the effect, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetPitchBasedOnTrack(true);&lt;br /&gt;
;Notes&lt;br /&gt;
*Pitch is rotation about an axis at right angles to the track direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductDisabled===&lt;br /&gt;
{{MethodHeader|public native void SetProductDisabled(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductDisabled();&lt;br /&gt;
;Notes&lt;br /&gt;
*Disables the loading or unloading of any product, overriding any previous calls to SetProductRestriction().&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetProductRestriction===&lt;br /&gt;
{{MethodHeader|public native bool SetProductRestriction(Asset product)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset to to which this vehicle&#039;s load is to be restricted.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetProductRestriction(coal);&lt;br /&gt;
;Notes&lt;br /&gt;
*Restricts this vehicle to only allow the given product. &lt;br /&gt;
*When a product restriction is in effect, only that product may be either loaded or unloaded. &lt;br /&gt;
*This method overrides any previous call to SetProductDisabled().&lt;br /&gt;
*If the product parameter is null, any product compatible with this vehicle can be loaded/unloaded. &lt;br /&gt;
*If it is a product that is not compatible with this vehicle, no restriction is set and false will be returned. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetQueueInitialCount===&lt;br /&gt;
{{MethodHeader|public void SetQueueInitialCount(ProductQueue queue, Asset product, int amount)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;queue&#039;&#039;&#039; = Queue to use, any existing products in this queue will be destroyed.&lt;br /&gt;
*&#039;&#039;&#039;product&#039;&#039;&#039; = Asset of product to use.&lt;br /&gt;
*&#039;&#039;&#039;amount&#039;&#039;&#039; = Amount of product to use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetQueueInitialCount(passengerQueue,passengers,20);&lt;br /&gt;
;Notes&lt;br /&gt;
*Fills the given queue with the specified quantity of product.&lt;br /&gt;
*This method sets the amount of products in the given queue.&lt;br /&gt;
*It is a utility method that works on the given queue which need not be a queue from this vehicle.&lt;br /&gt;
*The product filter provided with queue will be used to check if the queue can take products of type asset.&lt;br /&gt;
*If it can&#039;t, the filter will be modified to suit as this method is forceful in that regard. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRollBasedOnTrack===&lt;br /&gt;
{{MethodHeader|public native void SetRollBasedOnTrack(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = Arbitrary value used to control the amount of roll.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRollBasedOnTrack(2.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Roll is a rotation about an axis parallel to the track direction.&lt;br /&gt;
*Use a positive value to lean &#039;into&#039; the curve, a negative value to lean out.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetRunningNumber===&lt;br /&gt;
{{MethodHeader|public native void SetRunningNumber(string number)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;number&#039;&#039;&#039; = The running (fleet identification) number of the vehicle.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetRunningNumber(&amp;quot;21C1&amp;quot;);&lt;br /&gt;
 SetRunningNumber(&amp;quot;4472&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This value is retrieved using [[#GetRunningNumber|GetRunningNumber()]] and should be restricted to alphanumeric characters and spaces.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetSandingTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetSandingTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or more defining the increase in this vehicle&#039;s tractive effort when sand is in use.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetSandingTractionMultiplier(1.5); // allow sanding to increase tractive effort by 50%&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetWheelslipTractionMultiplier===&lt;br /&gt;
{{MethodHeader|public native void SetWheelslipTractionMultiplier(float factor)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;factor&#039;&#039;&#039; = A multiplier value of 1.0 or less to apply to decrease this vehicle&#039;s traction when wheelslip occurs.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetWheelslipTractionMultiplier(0.25); // wheelslip reduces tractive effort to 25% of normal.&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Uncouple===&lt;br /&gt;
{{MethodHeader|public native void Uncouple(int end)&amp;lt;br&amp;gt;public native void Uncouple(Vehicle other)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; = One of the [[#Direction Relationships|Direction Relationship]] constants indicating at which end of the current vehicle the uncoupling is to occur.&lt;br /&gt;
*&#039;&#039;&#039;other&#039;&#039;&#039; = A reference to the other vehicle form which the caller is to be uncoupled.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Uncouple(DIRECTION_FORWARD);  // uncouple at the current vehicle&#039;s front end&lt;br /&gt;
 Uncouple(vehicle1);           // uncouple from the specified vehicle&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will always cause another Train object to be created.&lt;br /&gt;
*The current Train reference will remain on the section of the previous train with the most drivers declared.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UnloadProduct===&lt;br /&gt;
{{MethodHeader|public bool UnloadProduct(LoadingReport report)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;report&#039;&#039;&#039; = Report on the current state of the loading operation.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the unloading operation was successful, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 UnloadProduct(report);&lt;br /&gt;
;Notes&lt;br /&gt;
*Unloads products into this vehicle as defined by the given report. &lt;br /&gt;
*This method works by attempting to transfer products from this vehicle&#039;s queues to the industry queue specified in report. &lt;br /&gt;
*The sequence of events for an unloading operation as performed by this method is:&lt;br /&gt;
**Verify that an unloading operation is possible with this vehicle by calling [[#CanUnloadProductToQueue|CanUnloadProductToQueue()]].&lt;br /&gt;
**[[#BeginUnload|BeginUnload()]] on this vehicle and [[Class Industry#BeginUnload|Industry.BeginUnload()]] on the industry specified in the report are called to perform any pre-unloading events like animation or particle effects on the vehicle and industry respectively. &lt;br /&gt;
**Both of these methods return the amount of time required for an unloading operation and the UnloadProduct() method sleeps for which ever of these times is the longer.&lt;br /&gt;
**The actual product transfer to the industry from the vehicle is performed by calling ProductQueue.TransferProductFrom() on the industry queue(s).&lt;br /&gt;
**[[#GetUnloadTime|GetUnloadTime()]] on this vehicle and [[Class Industry#GetUnloadTime|Industry.GetUnloadTime()]] are called. Again, UnloadProduct() sleeps for which ever is the longer of the times returned.&lt;br /&gt;
**[[#EndUnload|EndUnload()]] and [[Class Industry#EndUnload|Industry.EndUnload()]] are called to perform any post-loading events. As before UnloadProduct() sleeps for the longer time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|void UpdateViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Update the view details window for this vehicle (from the train). &lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;Vehicle&amp;quot;,&amp;quot;LoadComplete&amp;quot;.&lt;br /&gt;
*Such a message indicates that the load or queue of the vehicle have changed and the view details window of the train will need to be updated. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|void ViewDetails(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View details window for this vehicle using the Train&#039;s output.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;ViewDetails&amp;quot;.object. &lt;br /&gt;
*Such a message indicates that the user has opened the right-click menu of the vehicle and selected the &amp;quot;View Details&amp;quot; menu item. &lt;br /&gt;
*This method will call the ViewDetails() method of this vehicle&#039;s train so that a Browser window describing the entire train can be displayed to the user. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewSchedule===&lt;br /&gt;
{{MethodHeader|void ViewSchedule(Message msg)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;msg&#039;&#039;&#039; = Message object which triggers this handler.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*View the schedule window for this vehicle from the train.&lt;br /&gt;
*This method is setup by Init() as a handler method for a message of type &amp;quot;MapObject&amp;quot;,&amp;quot;View-Schedule&amp;quot;. &lt;br /&gt;
*Such a message indicates that the schedule of the vehicle or train is to be displayed for the user.&lt;br /&gt;
*This method calls through to Train.UpdateScheduleWindow(). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class Train#GetVehicles|Train.GetVehicles()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetVehicleList|World.GetVehicleList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=1841</id>
		<title>Class World</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=1841"/>
		<updated>2011-04-25T14:19:41Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetSceneryDrawDistance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language 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;
*&amp;lt;strike&amp;gt;The length of the sound file in seconds.&amp;lt;/strike&amp;gt;&lt;br /&gt;
*NOTE:  In TS12, the returned value is now undefined, and currently always returns &#039;10&#039;.  This is to remove the performance cost of having to read the file from disk immediately to determine the sound length before the function can complete.&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;
 &amp;lt;strike&amp;gt;// Wait until sound has completed before continuing.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &amp;lt;strike&amp;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;));&amp;lt;/strike&amp;gt; &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;
*In TS12 is OBSOLETE.&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>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=1840</id>
		<title>Class World</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=1840"/>
		<updated>2011-04-25T14:10:33Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* PlaySound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language 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;
*&amp;lt;strike&amp;gt;The length of the sound file in seconds.&amp;lt;/strike&amp;gt;&lt;br /&gt;
*NOTE:  In TS12, the returned value is now undefined, and currently always returns &#039;10&#039;.  This is to remove the performance cost of having to read the file from disk immediately to determine the sound length before the function can complete.&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;
 &amp;lt;strike&amp;gt;// Wait until sound has completed before continuing.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &amp;lt;strike&amp;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;));&amp;lt;/strike&amp;gt; &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>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=1839</id>
		<title>Class World</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_World&amp;diff=1839"/>
		<updated>2011-04-25T14:09:49Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* PlaySound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language 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;
*&amp;lt;strike&amp;gt;The length of the sound file in seconds.&amp;lt;/strike&amp;gt;&lt;br /&gt;
*NOTE:  In TS12, the returned value is now undefined, and currently always returns &#039;10&#039;.  This is to remove the performance cost of having to read the file from disk immediately to determine the sound length before the function can complete.&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;
&amp;lt;strike&amp;gt; // Wait until sound has completed before continuing.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &amp;lt;strike&amp;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;));&amp;lt;/strike&amp;gt; &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>Tram (legacy 26267)</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=1826</id>
		<title>Class MeshObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=1826"/>
		<updated>2011-04-03T00:45:23Z</updated>

		<summary type="html">&lt;p&gt;Tram (legacy 26267): /* SetFXAttachment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****MeshObject&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a base class for [[class Asset|Asset]] based game objects that have meshes, effects, animations and particles. Interface methods to deal with these are provided so things like showing or hiding a mesh, attaching a mesh to an attachment point or controlling an animation can be done from a script.&lt;br /&gt;
&lt;br /&gt;
For animation Trainz interpolates between key frames. This means an intermediate animation frame is calculated dynamically to be-in-synch with the game&#039;s framerate.&lt;br /&gt;
&lt;br /&gt;
Trainzscript is an interpreted scripting language intended to be used to monitor and react to events in the Trainz world, not to perform sophisticated real-time animation tasks. Using a script to start an animation in response to an event in a thread is reasonable. However trying to control animation tightly down to short intervals is likely to provide unsatisfactory results and to adversely affect overall performance of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MeshObject Messages==&lt;br /&gt;
Messages related to MeshObject assets:&lt;br /&gt;
*[[Animation-Event Message]]&lt;br /&gt;
*[[pfx Message]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject GetFXAttachment(string effect)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of the mesh effect to query. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject currently attached to the named effect.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject attachment = GetFXAttachment(&amp;quot;coupler&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*The method returns null if the effect is unoccupied.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrame(string mesh)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Current fame of the animation file within the specified mesh container.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float height = GetMeshAnimationFrame(&amp;quot;zPosition&amp;quot;)&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is likely to be an interpreted floating point value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrameCount==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrameCount(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The number of frames in the specified animation.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float positions = GetMeshAnimationFrameCount(&amp;quot;lever&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is a float rather than an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTextureSelfIlluminationState==&lt;br /&gt;
{{MethodHeader|public native bool GetTextureSelfIlluminationState(string texture)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns true if the specified texture has self illumination set.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool isEmissive = GetTextureSelfIlluminationState(&amp;quot;texture&amp;quot;);&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;
==HasMesh==&lt;br /&gt;
{{MethodHeader|public native bool HasMesh(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (HasMesh(&amp;quot;ventilation&amp;quot;)) StartMeshAnimationLoop(&amp;quot;fans&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetFXAnimationState(string effect, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of attached-animation effect containing the animation to play.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = true to start the animation loop, false to stop.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (gateClosed) SetFXAnimationState(&amp;quot;gate&amp;quot;,false);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject SetFXAttachment(string effect, Asset asset)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containing the attachment to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = mesh asset to attach to the effect. If asset is null any existing asset will be removed and nothing will be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject which has been attached to the named effect. If the mesh asset isn&#039;t &amp;quot;kind mesh&amp;quot;, returns null.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject lamp = SetFXAttachment(&amp;quot;lamp0&amp;quot;,redlamp);&lt;br /&gt;
;Notes&lt;br /&gt;
*Returns null if the effect is unoccupied when the method returns.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXCoronaTexture==&lt;br /&gt;
{{MethodHeader|public native void SetFXCoronaTexture(string effect, Asset texture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the corona to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = corona texture asset to attach to the effect. If asset is null the corona will be turned off.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXCoronaTexture(&amp;quot;stopLight&amp;quot;,redCorona);&lt;br /&gt;
;Notes&lt;br /&gt;
*Other corona parameters such as frequency and size are defined in &#039;&#039;config.txt&#039;&#039; and cannot be altered by script code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXNameText==&lt;br /&gt;
{{MethodHeader|public native void SetFXNameText(string effect, string text)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the name effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; = new string value.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXNameText(&amp;quot;home&amp;quot;,&amp;quot;Shangri-La&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Method will not accept an empty string in the &#039;&#039;text&#039;&#039; parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXTextureReplacement==&lt;br /&gt;
{{MethodHeader|public native void SetFXTextureReplacement(string effect, Asset textureGroup, int index)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = texture-replacement effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;textureGroup&#039;&#039;&#039; = reference to texture group asset which is the source of the texture to be applied.&lt;br /&gt;
*&#039;&#039;&#039;index&#039;&#039;&#039; = index into &#039;&#039;textures&#039;&#039; table of texture-group indicating which texture to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,&amp;quot;loadTextures&amp;quot;,5);   // applies texture 5 from texture-group&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,null,0);             // clears the effect, reinstating the texture defined in the asset.&lt;br /&gt;
;Notes&lt;br /&gt;
*Use null in the textureGroup parameter to turn texture replacement off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMesh==&lt;br /&gt;
{{MethodHeader|public native void SetMesh(string mesh, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMesh(&amp;quot;default&amp;quot;,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Shows the specified mesh and hides all other meshes.&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationFrame(string mesh, float frame)&amp;lt;br&amp;gt;&lt;br /&gt;
public native void SetMeshAnimationFrame(string mesh, float frame, float period)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;frame&#039;&#039;&#039; = the frame position to which the animation is to be moved, this may be an interpolated value.&lt;br /&gt;
*&#039;&#039;&#039;period&#039;&#039;&#039; = the period over which the animation will be moved from its current position to the newly specified point.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0);      // move the animation to frame 5 instantaneously&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0,2.0);  // move the animation to frame 5 over 2 seconds&lt;br /&gt;
;Notes&lt;br /&gt;
*Moves the specified animation to the specified frame.&lt;br /&gt;
*For the first variant the transition is instant.&lt;br /&gt;
*For the second variant the transition will complete during the specified period.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationSpeed==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationSpeed(string mesh, float speed)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;speed&#039;&#039;&#039; = multiplication factor to apply to the original animation speed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,2.0);   // run fans at double speed&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,-1.0);  // run fans backwards at original speed&lt;br /&gt;
;Notes&lt;br /&gt;
*Modifies the speed at which the animation is played.&lt;br /&gt;
*The original speed is multiplied by the new speed factor.&lt;br /&gt;
*Use negative values to make the animation run in reverse.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationState(string mesh, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = the direction in which the file is to be played, true for forwards, false for backwards.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,true);    // opens the door&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,false);   // closes the door&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which have defined start and end points such as the opening and closing of a gate or door.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is true the animation plays forwards from its current position to the last frame. If the current position is already at the last frame the call has no effect.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is false the animation plays backwards from its current position to the first frame. If the current position is already at the first frame the call has no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshVisible==&lt;br /&gt;
{{MethodHeader|public native void SetMeshVisible(string mesh, bool visible, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;visible&#039;&#039;&#039; = true to show the mesh, false to hide it.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshVisible(&amp;quot;driver&amp;quot;, false, 1.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetTextureSelfIllumination==&lt;br /&gt;
{{MethodHeader|public native void SetTextureSelfIllumination(string texture, float r, float g, float b)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
*&#039;&#039;&#039;r,g,b&#039;&#039;&#039; = red green and blue components of self illumination value to apply, range 0 .. 1 where 1 is equal to 100%.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetTextureSelfIllumination(&amp;quot;interior&amp;quot;,0.5,0.5,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Applies an emissive component to the texture using the red, green and blue components specified.&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;
==StartMeshAnimationLoop==&lt;br /&gt;
{{MethodHeader|public native void StartMeshAnimationLoop(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StartMeshAnimationLoop(&amp;quot;windmill&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which are designed to run in a continuous loop.&lt;br /&gt;
*The speed of the animation can be altered using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]]&lt;br /&gt;
*Using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]] with a negative value will cause the animation to play in reverse.&lt;br /&gt;
*[[#StopMeshAnimation|StopMeshAnimation()]] will halt the animation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StopMeshAnimation==&lt;br /&gt;
{{MethodHeader|public native void StopMeshAnimation(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be stopped.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StopMeshAnimation(&amp;quot;default&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Turns animation off for the specified mesh.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwapTextureOnMesh==&lt;br /&gt;
{{MethodHeader|public native void SwapTextureOnMesh(string mesh, string oldTexture, string newTexture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the texture to be changed.&lt;br /&gt;
*&#039;&#039;&#039;oldTexture&#039;&#039;&#039; = the original &#039;&#039;*.texture.txt&#039;&#039; file to use as the source of the transition.&lt;br /&gt;
*&#039;&#039;&#039;newTexture&#039;&#039;&#039; = the new &#039;&#039;*.texture.txt&#039;&#039; file to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SwapTextureOnMesh(&amp;quot;left-passenger-door&amp;quot;,&amp;quot;gwr&amp;quot;,&amp;quot;lms&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Swap one texture against another texture on specified mesh.&lt;br /&gt;
*Similar to texture-replacement effects, but without the need for an extra texture asset. &lt;br /&gt;
*&#039;&#039;&#039;possible bug&#039;&#039;&#039; Texture names in the .im file must be lower case for this function to work properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Tram (legacy 26267)</name></author>
	</entry>
</feed>