<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hard-light.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aginor</id>
	<title>FreeSpace Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hard-light.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aginor"/>
	<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php/Special:Contributions/Aginor"/>
	<updated>2026-11-15T10:44:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38979</id>
		<title>Scripting functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38979"/>
		<updated>2012-07-15T12:08:35Z</updated>

		<summary type="html">&lt;p&gt;Aginor: /* HudGauge */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains all the functions mentioned in the scripting.html file, including their syntax, remarks on their use and common errors modders may encounter when they use them.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Script Output - FSO v3.6.13 (FS2_Open Scripting)&lt;br /&gt;
&lt;br /&gt;
==Conditional Hooks==&lt;br /&gt;
&lt;br /&gt;
===Conditions===&lt;br /&gt;
*State&lt;br /&gt;
*Campaign&lt;br /&gt;
*Mission&lt;br /&gt;
*Object Type&lt;br /&gt;
*Ship&lt;br /&gt;
*Ship class&lt;br /&gt;
*Ship type&lt;br /&gt;
*Weapon class&lt;br /&gt;
*KeyPress&lt;br /&gt;
*Version&lt;br /&gt;
*Application&lt;br /&gt;
**&#039;&#039;Usually: $Application: FS2_Open&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Actions===&lt;br /&gt;
*On Game Init&lt;br /&gt;
*On Splash Screen&lt;br /&gt;
*On State Start&lt;br /&gt;
*On Frame&lt;br /&gt;
*On Key Pressed&lt;br /&gt;
*On Key Released&lt;br /&gt;
*On Mouse Moved&lt;br /&gt;
*On Mouse Pressed&lt;br /&gt;
*On Mouse Released&lt;br /&gt;
*On State End&lt;br /&gt;
*On Mission Start&lt;br /&gt;
*On HUD Draw&lt;br /&gt;
*On Ship Collision&lt;br /&gt;
*On Weapon Collision&lt;br /&gt;
*On Debris Collision&lt;br /&gt;
*On Asteroid Collision&lt;br /&gt;
*On Object Render&lt;br /&gt;
*On Warp In&lt;br /&gt;
*On Warp Out&lt;br /&gt;
*On Death&lt;br /&gt;
*On Mission End&lt;br /&gt;
*On Weapon Delete&lt;br /&gt;
*On Weapon Equipped&lt;br /&gt;
*On Weapon Fired&lt;br /&gt;
*On Weapon Selected&lt;br /&gt;
*On Weapon Deselected&lt;br /&gt;
*On Gameplay Start&lt;br /&gt;
*On Turret Fired&lt;br /&gt;
*On Primary Fire&lt;br /&gt;
*On Secondary Fire&lt;br /&gt;
&lt;br /&gt;
==Types==&lt;br /&gt;
===vector===&lt;br /&gt;
:&#039;&#039;&#039;Vector object&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number [] x,y,z or 1-3&#039;&#039;&lt;br /&gt;
::*Vector component&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Value at index, or 0 if vector handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] + number/vector&#039;&#039;&lt;br /&gt;
::*Adds vector by another vector, or adds all axes by value&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] - number/vector&#039;&#039;&lt;br /&gt;
::*Subtracts vector from another vector, or subtracts all axes by value&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] * number/vector&#039;&#039;&lt;br /&gt;
::*Scales vector object (Multiplies all axes by number), or multiplies each axes by the other vector&#039;s axes.&lt;br /&gt;
::*&#039;&#039;&#039; Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] / number/vector&#039;&#039;&lt;br /&gt;
::*Scales vector object (Divide all axes by number), or divides each axes by the dividing vector&#039;s axes.&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string (string)&#039;&#039;&lt;br /&gt;
::*Converts a vector to string with format &amp;quot;(x,y,z)&amp;quot;&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Vector as string, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#orientation|orientation]]&#039;&#039; &#039;&#039;&#039;getOrientation()&#039;&#039;&#039;&lt;br /&gt;
::*Returns orientation object representing the direction of the vector. Does not require vector to be normalized.&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Orientation object, or null orientation object if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getMagnitude()&#039;&#039;&#039;&lt;br /&gt;
::*Returns the magnitude of a vector (Total regardless of direction)&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Magnitude of vector, or 0 if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getDistance(&#039;&#039;&#039;&#039;&#039;Vector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Distance&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Returns distance from another vector&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getDotProduct(&#039;&#039;&#039;&#039;&#039;vector OtherVector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Returns dot product of vector object with vector argument&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Dot product, or 0 if a handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]]&#039;&#039; &#039;&#039;&#039;getCrossProduct(&#039;&#039;&#039;&#039;&#039;vector OtherVector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Returns cross product of vector object with vector argument&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Cross product, or null vector if a handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number,number&#039;&#039; &#039;&#039;&#039;getScreenCoords()&#039;&#039;&#039;&lt;br /&gt;
::*Gets screen cordinates of a world vector&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; X (number), Y (number), or false if off-screen&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;vector&#039;&#039; &#039;&#039;&#039;getNormalized()&#039;&#039;&#039;&lt;br /&gt;
::*Returns a normalized version of the vector&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Normalized Vector, or NIL if invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===orientation===&lt;br /&gt;
Orientation matrix object&lt;br /&gt;
&lt;br /&gt;
                number [] p,b,h or 1-9&lt;br /&gt;
                    Orientation component - pitch, bank, heading, or index into 3x3 matrix (1-9)&lt;br /&gt;
                    Returns: Number at the specified index, or 0 if index is invalid.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation * orientation&lt;br /&gt;
                    Multiplies two matrix objects)&lt;br /&gt;
                    Returns: matrix, or empty matrix if unsuccessful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Converts a matrix to a string with format &amp;quot;[r1c1 r2c1 r3c1 | r1c2 r2c2 r3c2| r1c3 r2c3 r3c3]&amp;quot;&lt;br /&gt;
                    Returns: Formatted string or &amp;quot;&lt;br /&gt;
                      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getInterpolated(orientation Final, number Factor)&lt;br /&gt;
                    Returns orientation that has been interpolated to Final by Factor (0.0-1.0)&lt;br /&gt;
                    Returns: Interpolated orientation, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getTranspose()&lt;br /&gt;
                    Returns a transpose version of the specified orientation&lt;br /&gt;
                    Returns: Transpose matrix, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector rotateVector(vector Input)&lt;br /&gt;
                    Returns rotated version of given vector&lt;br /&gt;
                    Returns: Rotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector unrotateVector(vector Input)&lt;br /&gt;
                    Returns unrotated version of given vector&lt;br /&gt;
                    Returns: Unrotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
===enumeration===&lt;br /&gt;
Enumeration object&lt;br /&gt;
&lt;br /&gt;
                enumeration = enumeration&lt;br /&gt;
                    Sets enumeration to specified value (if it is not a global&lt;br /&gt;
                    Returns: enumeration&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns enumeration name&lt;br /&gt;
                    Returns: Enumeration name, or &amp;quot;&amp;quot; if invalid&lt;br /&gt;
                      &lt;br /&gt;
===event===&lt;br /&gt;
Mission event handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Mission event name&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveText = string&lt;br /&gt;
                    Directive text&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveKeypressText = string&lt;br /&gt;
                    Raw directive keypress text, as seen in FRED.&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Interval = number&lt;br /&gt;
                    Time for event to repeat (in seconds)&lt;br /&gt;
                    Value: Repeat time, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ObjectCount = number&lt;br /&gt;
                    Number of objects left for event&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RepeatCount = number&lt;br /&gt;
                    Event repeat count&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Score = number&lt;br /&gt;
                    Event score&lt;br /&gt;
                    Value: Event score, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===file===&lt;br /&gt;
File handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil close()&lt;br /&gt;
                    Instantly closes file and invalidates all file handles&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean flush()&lt;br /&gt;
                    Flushes file buffer to disk.&lt;br /&gt;
                    Returns: True for success, false on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getPath()&lt;br /&gt;
                    Determines path of the given file&lt;br /&gt;
                    Returns: Path string of the file handle, or an empty string if it doesn&#039;t have one, or the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number or string, ... read(number or string, ...)&lt;br /&gt;
                    Reads part of or all of a file, depending on arguments passed. Based on basic Lua file:read function.Returns nil when the end of the file is reached.&lt;br /&gt;
&lt;br /&gt;
                        * &amp;quot;*n&amp;quot; - Reads a number.&lt;br /&gt;
                        * &amp;quot;*a&amp;quot; - Reads the rest of the file and returns it as a string.&lt;br /&gt;
                        * &amp;quot;*l&amp;quot; - Reads a line. Skips the end of line markers.&lt;br /&gt;
                        * (number) - Reads given number of characters, then returns them as a string.&lt;br /&gt;
&lt;br /&gt;
                    Returns: Requested data, or nil if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number seek([string Whence=&amp;quot;cur&amp;quot;, number Offset=0])&lt;br /&gt;
                  # Changes position of file, or gets location.Whence can be:&amp;quot;set&amp;quot; - File start.&lt;br /&gt;
                  # &amp;quot;cur&amp;quot; - Current position in file.&lt;br /&gt;
                  # &amp;quot;end&amp;quot; - File end.&lt;br /&gt;
                    Returns: new offset, or false or nil on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number write(string or number, ...)&lt;br /&gt;
                    Writes a series of Lua strings or numbers to the current file.&lt;br /&gt;
                    Returns: Number of items successfully written.&lt;br /&gt;
                     &lt;br /&gt;
===font===&lt;br /&gt;
font handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Filename of font&lt;br /&gt;
                    Returns: Font filename, or an empty string if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Filename of font (including extension)&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Height = number&lt;br /&gt;
                    Height of font (in pixels)&lt;br /&gt;
                    Value: Font height, or 0 if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
===gameevent===&lt;br /&gt;
Game event&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Returns: Game event name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Value: Game event name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===gamestate===&lt;br /&gt;
:&#039;&#039;&#039;Game state&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string (string)&#039;&#039;&lt;br /&gt;
::*Game state name&lt;br /&gt;
::*&#039;&#039;&#039;Value:&#039;&#039;&#039; Game state name, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Name = string&#039;&#039;&lt;br /&gt;
::*Game state name&lt;br /&gt;
::*&#039;&#039;&#039;Value:&#039;&#039;&#039; Game state name, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===HudGauge===&lt;br /&gt;
:&#039;&#039;&#039;HUD Gauge handle&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Name = string&#039;&#039;&lt;br /&gt;
::*Custom HUD Gauge name&lt;br /&gt;
::*&#039;&#039;&#039;Value:&#039;&#039;&#039; Custom HUD Gauge name, or nil if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Text = string&#039;&#039;&lt;br /&gt;
::*Custom HUD Gauge text&lt;br /&gt;
::*&#039;&#039;&#039;Value:&#039;&#039;&#039; Custom HUD Gauge text, or nil if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===eyepoint===&lt;br /&gt;
Eyepoint handle&lt;br /&gt;
&lt;br /&gt;
                vector Normal = vector&lt;br /&gt;
                    Eyepoint normal&lt;br /&gt;
                    Value: Eyepoint normal, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Eyepoint location (Local vector)&lt;br /&gt;
                    Value: Eyepoint location, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean IsValid()&lt;br /&gt;
                    Detect whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===model===&lt;br /&gt;
3D Model (POF) handle&lt;br /&gt;
&lt;br /&gt;
                modeltextures_h Textures = modeltextures_h&lt;br /&gt;
                    Model textures&lt;br /&gt;
                    Value: Model textures, or an invalid modeltextures handle if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusters Thrusters = thrusters&lt;br /&gt;
                    Model thrusters&lt;br /&gt;
                    Value: Thrusters of the model or invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoints Eyepoints = eyepoints&lt;br /&gt;
                    Model eyepoints&lt;br /&gt;
                    Value: Array of eyepoints or invalid handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMax = vector&lt;br /&gt;
                    Model bounding box maximum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMin = vector&lt;br /&gt;
                    Model bounding box minimum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Model filename&lt;br /&gt;
                    Value: Model filename, or an empty string if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Model mass&lt;br /&gt;
                    Value: Model mass, or 0 if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation MomentOfInertia = orientation&lt;br /&gt;
                    Model moment of inertia&lt;br /&gt;
                    Value: Moment of Inertia matrix or identity matrix if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    Model radius (Used for collision &amp;amp; culling detection)&lt;br /&gt;
                    Value: Model Radius or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
===modeltextures_h===&lt;br /&gt;
Array of materials&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on model&lt;br /&gt;
                    Returns: Number of model textures&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] texture&lt;br /&gt;
                    number Index/string TextureName&lt;br /&gt;
                    Returns: Model textures, or invalid modeltextures handle if model handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===eyepoints===&lt;br /&gt;
Array of model eye points&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Gets the number of eyepoints on this model&lt;br /&gt;
                    Returns: Number of eyepoints on this model or 0 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoint [] eyepoint&lt;br /&gt;
                    Gets en eyepoint handle&lt;br /&gt;
                    Returns: eye handle or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid or not&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===thrusters===&lt;br /&gt;
The thrusters of a model&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thruster banks on the model&lt;br /&gt;
                    Returns: Number of thrusterbanks&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusterbank [] number Index&lt;br /&gt;
                    Array of all thrusterbanks on this thruster&lt;br /&gt;
                    Returns: Handle to the thrusterbank or invalid handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===thrusterbank===&lt;br /&gt;
A model thrusterbank&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thrusters on this thrusterbank&lt;br /&gt;
                    Returns: Number of thrusters on this bank or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                glowpoint [] number Index&lt;br /&gt;
                    Array of glowpoint&lt;br /&gt;
                    Returns: Glowpoint, or invalid glowpoint handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detectes if this handle is valid&lt;br /&gt;
                    Returns: true if this handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===glowpoint===&lt;br /&gt;
A model glowpoint&lt;br /&gt;
&lt;br /&gt;
                vector Position&lt;br /&gt;
                    The (local) vector to the position of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius&lt;br /&gt;
                    The radius of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Returns wether this handle is valid or not&lt;br /&gt;
                    Returns: True if handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===order===&lt;br /&gt;
order handle&lt;br /&gt;
&lt;br /&gt;
                boolean remove()&lt;br /&gt;
                    Removes the given order from the ship&#039;s priority queue.&lt;br /&gt;
                    Returns: True if order was successfully removed, otherwise false or nil.&lt;br /&gt;
                     &lt;br /&gt;
===shiporders===&lt;br /&gt;
Ship orders&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                order [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship orders&lt;br /&gt;
                    Returns: Order, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===physics===&lt;br /&gt;
Physics handle&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerAccelerationTime = number&lt;br /&gt;
                    Afterburner acceleration time&lt;br /&gt;
                    Value: Afterburner acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector AfterburnerVelocityMax = vector&lt;br /&gt;
                    Afterburner max velocity (Local vector)&lt;br /&gt;
                    Value: Afterburner max velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number BankingConstant = number&lt;br /&gt;
                    Banking constant&lt;br /&gt;
                    Value: Banking constant, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardAccelerationTime = number&lt;br /&gt;
                    Forward acceleration time&lt;br /&gt;
                    Value: Forward acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardDecelerationTime = number&lt;br /&gt;
                    Forward deceleration time&lt;br /&gt;
                    Value: Forward decleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardThrust = number&lt;br /&gt;
                    Forward thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Forward thrust, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Object mass&lt;br /&gt;
                    Value: Object mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocity = vector&lt;br /&gt;
                    Rotational velocity (Local vector)&lt;br /&gt;
                    Value: Rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDamping = number&lt;br /&gt;
                    Rotational damping, ie derivative of rotational speed&lt;br /&gt;
                    Value: Rotational damping, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDesired = lvector&lt;br /&gt;
                    Desired rotational velocity&lt;br /&gt;
                    Value: Desired rotational velocity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocityMax = vector&lt;br /&gt;
                    Maximum rotational velocity (Local vector)&lt;br /&gt;
                    Value: Maximum rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShockwaveShakeAmplitude = number&lt;br /&gt;
                    How much shaking from shockwaves is applied to object&lt;br /&gt;
                    Value: Shockwave shake amplitude, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SideThrust = number&lt;br /&gt;
                    Side thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Side thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideAccelerationTime = number&lt;br /&gt;
                    Time to accelerate to maximum slide velocity&lt;br /&gt;
                    Value: Sliding acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideDecelerationTime = number&lt;br /&gt;
                    Time to decelerate from maximum slide speed&lt;br /&gt;
                    Value: Sliding deceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    Object world velocity (World vector)&lt;br /&gt;
                    Value: Object velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityDesired = vector&lt;br /&gt;
                    Desired velocity (World vector)&lt;br /&gt;
                    Value: Desired velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityMax = vector&lt;br /&gt;
                    Object max local velocity (Local vector)&lt;br /&gt;
                    Value: Maximum velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number VerticalThrust = number&lt;br /&gt;
                    Vertical thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Vertical thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AfterburnerActive = boolean&lt;br /&gt;
                    Specifies if the afterburner is active or not&lt;br /&gt;
                    Value: true if afterburner is active false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSpeed()&lt;br /&gt;
                    Gets total speed as of last frame&lt;br /&gt;
                    Returns: Total speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getForwardSpeed()&lt;br /&gt;
                    Gets total speed in the ship&#039;s &#039;forward&#039; direction as of last frame&lt;br /&gt;
                    Returns: Total forward speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isAfterburnerActive()&lt;br /&gt;
                    True if Afterburners are on, false or nil if not&lt;br /&gt;
                    Returns: Detects whether afterburner is active&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isGliding()&lt;br /&gt;
                    True if glide mode is on, false or nil if not&lt;br /&gt;
                    Returns: Detects if ship is gliding&lt;br /&gt;
                     &lt;br /&gt;
===sexpvariable===&lt;br /&gt;
SEXP Variable handle&lt;br /&gt;
&lt;br /&gt;
                enumeration Persistence = enumeration&lt;br /&gt;
                    SEXP Variable persistance, uses SEXPVAR_*_PERSISTENT enumerations&lt;br /&gt;
                    Value: SEXPVAR_*_PERSISTENT enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration Type = enumeration&lt;br /&gt;
                    SEXP Variable type, uses SEXPVAR_TYPE_* enumerations&lt;br /&gt;
                    Value: SEXPVAR_TYPE_* enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Value = number/string&lt;br /&gt;
                    SEXP variable value&lt;br /&gt;
                    Value: SEXP variable contents, or nil if the variable is of an invalid type or the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns SEXP name&lt;br /&gt;
                    Returns: SEXP name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean delete()&lt;br /&gt;
                    Deletes a SEXP Variable&lt;br /&gt;
                    Returns: True if successful, false if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===shields===&lt;br /&gt;
Shields handle&lt;br /&gt;
&lt;br /&gt;
                number [] enumeration/number&lt;br /&gt;
                    Gets or sets shield quadrant strength. Use &amp;quot;SHIELD_*&amp;quot; enumeration or 1-4 for a specific quadrant, or NONE for the entire shield&lt;br /&gt;
                    Returns: Quadrant/shield strength, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedLeft = number&lt;br /&gt;
                    Total shield hitpoints left (for all quadrants combined)&lt;br /&gt;
                    Value: Combined shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedMax = number&lt;br /&gt;
                    Maximum shield hitpoints (for all quadrants combined)&lt;br /&gt;
                    Value: Combined maximum shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===shiptype===&lt;br /&gt;
Ship type handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship type name&lt;br /&gt;
                    Value: Ship type name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===species===&lt;br /&gt;
Species handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Species name&lt;br /&gt;
                    Value: Species name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===team===&lt;br /&gt;
Team handle&lt;br /&gt;
&lt;br /&gt;
                boolean == team, team&lt;br /&gt;
                    Checks whether two teams are the same team&lt;br /&gt;
                    Returns: true if equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Team name&lt;br /&gt;
                    Value: Team name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getColor()&lt;br /&gt;
                    Gets the IFF color of the specified Team&lt;br /&gt;
                    Returns: rgb color for the specified team or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===texture===&lt;br /&gt;
Texture handle&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Auto-deletes texture&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean == texture, texture&lt;br /&gt;
                    Checks if two texture handles refer to the same texture&lt;br /&gt;
                    Returns: True if textures are equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number&lt;br /&gt;
                    Returns texture handle to specified frame number in current texture&#039;s animation.This means that [1] will always return the first frame in an animation, no matter what frame an animation is.You cannot change a texture animation frame.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unload()&lt;br /&gt;
                    Unloads a texture from memory&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns filename for texture&lt;br /&gt;
                    Returns: Filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWidth()&lt;br /&gt;
                    Gets texture width&lt;br /&gt;
                    Returns: Texture width, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getHeight()&lt;br /&gt;
                    Gets texture height&lt;br /&gt;
                    Returns: Texture height, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFPS()&lt;br /&gt;
                    Gets frames-per-second of texture&lt;br /&gt;
                    Returns: Texture FPS, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFramesLeft()&lt;br /&gt;
                    Gets number of frames left, from handle&#039;s position in animation&lt;br /&gt;
                    Returns: Frames left, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===material===&lt;br /&gt;
Texture map, including diffuse, glow, and specular textures&lt;br /&gt;
&lt;br /&gt;
                texture BaseMap = texture&lt;br /&gt;
                    Base texture&lt;br /&gt;
                    Value: Base texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture GlowMap = texture&lt;br /&gt;
                    Glow texture&lt;br /&gt;
                    Value: Glow texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture SpecularMap = texture&lt;br /&gt;
                    Specular texture&lt;br /&gt;
                    Value: Texture handle, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
===weaponclass===&lt;br /&gt;
Weapon class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Returns: Weapon class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Value: Weapon class name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Title = string&lt;br /&gt;
                    Weapon class title&lt;br /&gt;
                    Value: Weapon class title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Weapon class description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechTitle = string&lt;br /&gt;
                    Weapon class tech title&lt;br /&gt;
                    Value: Tech title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechAnimationFilename = string&lt;br /&gt;
                    Weapon class animation filename&lt;br /&gt;
                    Value: Filename, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Weapon class tech description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Weapon class model, or invalid model handle if weaponclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ArmorFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship hull (0-1.0)&lt;br /&gt;
                    Value: Armor factor, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Damage = number&lt;br /&gt;
                    Amount of damage that weapon deals&lt;br /&gt;
                    Value: Damage amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FireWait = number&lt;br /&gt;
                    Weapon fire wait (cooldown time) in seconds&lt;br /&gt;
                    Value: Fire wait time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FreeFlightTime = number&lt;br /&gt;
                    The time the weapon will fly before turing onto its target&lt;br /&gt;
                    Value: Free flight time or emty string if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeMax = number&lt;br /&gt;
                    Life of weapon in seconds&lt;br /&gt;
                    Value: Life of weapon, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Range = number&lt;br /&gt;
                    Range of weapon in meters&lt;br /&gt;
                    Value: Weapon Range, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Weapon mass&lt;br /&gt;
                    Value: Weapon mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShieldFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship shields (0-1.0)&lt;br /&gt;
                    Value: Shield damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SubsystemFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship subsystems (0-1.0)&lt;br /&gt;
                    Value: Subsystem damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TargetLOD = number&lt;br /&gt;
                    LOD used for weapon model in the targeting computer&lt;br /&gt;
                    Value: LOD number, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Speed = number&lt;br /&gt;
                    Weapon max speed, aka $Velocity in weapons.tbl&lt;br /&gt;
                    Value: Weapon speed, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Bomb = boolean&lt;br /&gt;
                    Is weapon class flagged as bomb&lt;br /&gt;
                    Value: New flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWeaponClassIndex()&lt;br /&gt;
                    Gets the index value of the weapon class&lt;br /&gt;
                    Returns: index value of the weapon class&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isLaser()&lt;br /&gt;
                    Return true if the weapon is a laser (this includes balistic primaries)&lt;br /&gt;
                    Returns: true if the weapon is a laser, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMissile()&lt;br /&gt;
                    Return true if the weapon is a missile&lt;br /&gt;
                    Returns: true if the weapon is a missile, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isBeam()&lt;br /&gt;
                    Return true if the weapon is a beam&lt;br /&gt;
                    Returns: true if the weapon is a beam, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===collision info===&lt;br /&gt;
Information about a collision&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Removes the allocated reference of this handle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    The model this collision info is about&lt;br /&gt;
                    Value: The model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionDistance()&lt;br /&gt;
                    The distance to the closest collision point&lt;br /&gt;
                    Returns: distance or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPoint([boolean local])&lt;br /&gt;
                    The collision point of this information (local to the object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision point or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionNormal([boolean local])&lt;br /&gt;
                    The collision normal of this information (local to object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision normal or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects if this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===object===&lt;br /&gt;
Object handle&lt;br /&gt;
&lt;br /&gt;
                boolean == object, object&lt;br /&gt;
                    Checks whether two object handles are for the same object&lt;br /&gt;
                    Returns: True if equal, false if not or a handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of object (if any)&lt;br /&gt;
                    Returns: Object name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Parent = object&lt;br /&gt;
                    Parent of the object. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Parent handle, or invalid handle if object is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Object world position (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastPosition = vector&lt;br /&gt;
                    Object world position as of last frame (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Object world orientation (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation LastOrientation = orientation&lt;br /&gt;
                    Object world orientation as of last frame (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                physics Physics = physics&lt;br /&gt;
                    Physics data used to move ship between frames&lt;br /&gt;
                    Value: Physics data, or invalid physics handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Hitpoints an object has left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shields Shields = shields&lt;br /&gt;
                    Shields&lt;br /&gt;
                    Value: Shields handle, or invalid shields handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSignature()&lt;br /&gt;
                    Gets the object&#039;s unique signature&lt;br /&gt;
                    Returns: Returns the objects unique numeric signature, or -1 if invalid. useful for creating a metadata sytem&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getBreedName()&lt;br /&gt;
                    Gets object type&lt;br /&gt;
                    Returns: Object type name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CollisionGroups = number&lt;br /&gt;
                    Collision group data&lt;br /&gt;
                    Value: Current collision group signature. NOTE: This is a bitfield, NOT a normal number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getfvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current fvec.&lt;br /&gt;
                    Returns: Objects&#039; forward vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getuvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current uvec.&lt;br /&gt;
                    Returns: Objects&#039; up vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getrvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current rvec.&lt;br /&gt;
                    Returns: Objects&#039; rvec, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector, collision info checkRayCollision(vector Start Point, vector End Point, [boolean Local])&lt;br /&gt;
                    Checks the collisions between the polygons of the current object and a ray&lt;br /&gt;
                    Returns: World collision point (local if boolean is set to true) and the specific collsision info, nil if no collisions&lt;br /&gt;
                     &lt;br /&gt;
===asteroid:object===&lt;br /&gt;
Asteroid handle&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Asteroid target object; may be object derivative, such as ship.&lt;br /&gt;
                    Value: Target object, or invalid handle if asteroid handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([ship killer=nil, wvector hitpos=nil])&lt;br /&gt;
                    Kills the asteroid. Set &amp;quot;killer&amp;quot; to designate a specific ship as having been the killer, and &amp;quot;hitpos&amp;quot; to specify the world position of the hit location; if nil, the asteroid center is used.&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
===shipclass===&lt;br /&gt;
Ship class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Returns: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Value: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShortName = string&lt;br /&gt;
                    Ship class short name&lt;br /&gt;
                    Value: Ship short name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TypeString = string&lt;br /&gt;
                    Ship class type string&lt;br /&gt;
                    Value: Type string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManeuverabilityString = string&lt;br /&gt;
                    Ship class maneuverability string&lt;br /&gt;
                    Value: Maneuverability string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorString = string&lt;br /&gt;
                    Ship class armor string&lt;br /&gt;
                    Value: Armor string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManufacturerString = string&lt;br /&gt;
                    Ship class manufacturer&lt;br /&gt;
                    Value: Manufacturer, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Ship class description&lt;br /&gt;
                    Value: Description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Ship class tech description&lt;br /&gt;
                    Value: Tech description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresMax = number&lt;br /&gt;
                    Maximum number of countermeasures the ship can carry&lt;br /&gt;
                    Value: Countermeasure capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Ship class model, or invalid model handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model CockpitModel = model&lt;br /&gt;
                    Model used for first-person cockpit&lt;br /&gt;
                    Value: Cockpit model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Ship class hitpoints&lt;br /&gt;
                    Value: Hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                species Species = Species&lt;br /&gt;
                    Ship class species&lt;br /&gt;
                    Value: Ship class species, or invalid species handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptype Type = shiptype&lt;br /&gt;
                    Ship class type&lt;br /&gt;
                    Value: Ship type, or invalid handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isInTechroom()&lt;br /&gt;
                    Gets whether or not the ship class is available in the techroom&lt;br /&gt;
                    Returns: Whether ship has been revealed in the techroom, false if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel(X1, Y1, X2, Y2, [Rotation %, Pitch %, Bank %, Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel2(X1, Y1, X2, Y2, orientation Orientation=null, [Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isModelLoaded([boolean Load = false])&lt;br /&gt;
                    Checks if the model used for this shipclass is loaded or not and optionally loads the model, which might be a slow operation.&lt;br /&gt;
                    Returns: If the model is loaded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getShipClassIndex()&lt;br /&gt;
                    Gets the index valus of the ship class&lt;br /&gt;
                    Returns: index value of the ship class&lt;br /&gt;
                     &lt;br /&gt;
===debris:object===&lt;br /&gt;
Debris handle&lt;br /&gt;
&lt;br /&gt;
                boolean IsHull = boolean&lt;br /&gt;
                    Whether or not debris is a piece of hull&lt;br /&gt;
                    Value: Whether debris is a hull fragment, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass OriginClass = shipclass&lt;br /&gt;
                    The shipclass of the ship this debris originates from&lt;br /&gt;
                    Value: The shipclass of the ship that created this debris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDebrisRadius()&lt;br /&gt;
                    The radius of this debris piece&lt;br /&gt;
                    Returns: The radius of this debris piece or -1 if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Return if this debris handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===waypoint:object===&lt;br /&gt;
waypoint handle&lt;br /&gt;
&lt;br /&gt;
===waypointlist===&lt;br /&gt;
waypointlist handle&lt;br /&gt;
&lt;br /&gt;
                waypoint [] number Index&lt;br /&gt;
                    Array of waypoints that are part of the waypoint list&lt;br /&gt;
                    Returns: Waypoint, or invalid handle if the index or waypointlist handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of waypoints in the list. Note that the value returned cannot be relied on for more than one frame.&lt;br /&gt;
                    Returns: Number of waypoints in the list, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Name of WaypointList&lt;br /&gt;
                    Value: Waypointlist name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===weaponbank===&lt;br /&gt;
Ship/subystem weapons bank handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass WeaponClass = weaponclass&lt;br /&gt;
                    Class of weapon mounted in the bank&lt;br /&gt;
                    Value: Weapon class, or an invalid weaponclass handle if bank handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoLeft = number&lt;br /&gt;
                    Ammo left for the current bank&lt;br /&gt;
                    Value: Ammo left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoMax = number&lt;br /&gt;
                    Maximum ammo for the current bank&lt;br /&gt;
                    Value: Ammo capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Armed = boolean&lt;br /&gt;
                    Weapon armed status. Does not take linking into account.&lt;br /&gt;
                    Value: True if armed, false if unarmed or handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===weaponbanktype===&lt;br /&gt;
Ship/subsystem weapons bank type handle&lt;br /&gt;
&lt;br /&gt;
                weaponbank [] number Index&lt;br /&gt;
                    Array of weapon banks&lt;br /&gt;
                    Returns: Weapon bank, or invalid handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Linked = boolean&lt;br /&gt;
                    Whether bank is in linked or unlinked fire mode (Primary-only)&lt;br /&gt;
                    Value: Link status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DualFire = boolean&lt;br /&gt;
                    Whether bank is in dual fire mode (Secondary-only)&lt;br /&gt;
                    Value: Dual fire status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of weapons in the mounted bank&lt;br /&gt;
                    Returns: Number of bank weapons, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===subsystem===&lt;br /&gt;
Ship subsystem handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of subsystem&lt;br /&gt;
                    Returns: Subsystem name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSIntensity = number&lt;br /&gt;
                    Subsystem AWACS intensity&lt;br /&gt;
                    Value: AWACS intensity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSRadius = number&lt;br /&gt;
                    Subsystem AWACS radius&lt;br /&gt;
                    Value: AWACS radius, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Orientation of subobject or turret base&lt;br /&gt;
                    Value: Subsystem orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation GunOrientation = orientation&lt;br /&gt;
                    Orientation of turret gun&lt;br /&gt;
                    Value: Gun orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Subsystem hitpoints left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid. Setting a value of 0 will disable it - set a value of -1 or lower to actually blow it up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Subsystem hitpoints max&lt;br /&gt;
                    Value: Max hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Subsystem position with regards to main ship (Local Vector)&lt;br /&gt;
                    Value: Subsystem position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector GunPosition = vector&lt;br /&gt;
                    Subsystem gun position with regards to main ship (Local vector)&lt;br /&gt;
                    Value: Gun position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Subsystem name&lt;br /&gt;
                    Value: Subsystem name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getModelName()&lt;br /&gt;
                    Returns the original name of the subsystem in the model file&lt;br /&gt;
                    Returns: name or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Object targetted by this subsystem. If used to set a new target, AI targeting will be switched off.&lt;br /&gt;
                    Value: Targeted object, or invalid object handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretResets = boolean&lt;br /&gt;
                    Specifies wether this turrets resets after a certain time of inactivity&lt;br /&gt;
                    Value: true if turret resets, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurretResetDelay = number&lt;br /&gt;
                    The time (in milliseconds) after that the turret resets itself&lt;br /&gt;
                    Value: Reset delay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurnRate = number&lt;br /&gt;
                    The turn rate&lt;br /&gt;
                    Value: Turnrate or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretLocked = boolean&lt;br /&gt;
                    Whether the turret is locked. Setting to true locks the turret, setting to false frees it.&lt;br /&gt;
                    Value: True if turret is locked, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number NextFireTimestamp = number&lt;br /&gt;
                    The next time the turret may attempt to fire&lt;br /&gt;
                    Value: Mission time (seconds) or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean targetingOverride(boolean)&lt;br /&gt;
                    If set to true, AI targeting for this turret is switched off. If set to false, the AI will take over again.&lt;br /&gt;
                    Returns: Returns true if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasFired()&lt;br /&gt;
                    Determine if a subsystem has fired&lt;br /&gt;
                    Returns: true if if fired, false if not fired, or nil if invalid. resets fired flag when called.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isTurret()&lt;br /&gt;
                    Determines if this subsystem is a turret&lt;br /&gt;
                    Returns: true if subsystem is turret, false otherwise or nil on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil fireWeapon([Turret weapon index = 1, Flak range = 100])&lt;br /&gt;
                    Fires weapon on turret&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rotateTurret(vector Pos[, boolean reset=false)&lt;br /&gt;
                    Rotates the turret to face Pos or resets the turret to its original state&lt;br /&gt;
                    Returns: true on success false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getTurretHeading()&lt;br /&gt;
                    Returns the turrets forward vector&lt;br /&gt;
                    Returns: Returns a normalized version of the forward vector or null vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getFOVs()&lt;br /&gt;
                    Returns current turrets FOVs&lt;br /&gt;
                    Returns: Standard FOV, maximum barrel elevation, turret base fov.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                matrix getTurretMatrix()&lt;br /&gt;
                    Returns current subsystems turret matrix&lt;br /&gt;
                    Returns: Turret matrix.&lt;br /&gt;
                     &lt;br /&gt;
===shiptextures===&lt;br /&gt;
Ship textures handle&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship textures&lt;br /&gt;
                    Returns: Texture, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===ship:object===&lt;br /&gt;
Ship handle&lt;br /&gt;
&lt;br /&gt;
                subsystem [] string Name/number Index&lt;br /&gt;
                    Array of ship subsystems&lt;br /&gt;
                    Returns: Subsystem handle, or invalid subsystem handle if index or ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of subsystems on ship&lt;br /&gt;
                    Returns: Subsystem number, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShieldArmorClass = string&lt;br /&gt;
                    Current Armor class of the ships&#039; shield&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship name&lt;br /&gt;
                    Value: Ship name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelLeft = number&lt;br /&gt;
                    Afterburner fuel left&lt;br /&gt;
                    Value: Afterburner fuel left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner fuel capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass Class = shipclass&lt;br /&gt;
                    Ship class&lt;br /&gt;
                    Value: Ship class, or invalid shipclass handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresLeft = number&lt;br /&gt;
                    Number of countermeasures left&lt;br /&gt;
                    Value: Countermeasures left, or 0 if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponclass CountermeasureClass = weaponclass&lt;br /&gt;
                    Weapon class mounted on this ship&#039;s countermeasure point&lt;br /&gt;
                    Value: Countermeasure hardpoint weapon class, or invalid weaponclass handle if no countermeasure class or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Total hitpoints&lt;br /&gt;
                    Value: Ship maximum hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyLeft = number&lt;br /&gt;
                    Current weapon energy reserves&lt;br /&gt;
                    Value: Ship current weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyMax = number&lt;br /&gt;
                    Maximum weapon energy&lt;br /&gt;
                    Value: Ship maximum weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean PrimaryTriggerDown = boolean&lt;br /&gt;
                    Determines if primary trigger is pressed or not&lt;br /&gt;
                    Value: True if pressed, false if not, nil if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype TertiaryBanks = weaponbanktype&lt;br /&gt;
                    Array of tertiary weapon banks&lt;br /&gt;
                    Value: Tertiary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of ship. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Target object, or invalid object handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Target subsystem of ship.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Ship&#039;s team&lt;br /&gt;
                    Value: Ship team, or invalid team handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptextures Textures = shiptextures&lt;br /&gt;
                    Gets ship textures&lt;br /&gt;
                    Value: Ship textures, or invalid shiptextures handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean FlagAffectedByGravity = boolean&lt;br /&gt;
                    Checks for the &amp;quot;affected-by-gravity&amp;quot; flag&lt;br /&gt;
                    Value: True if flag is set, false if flag is not set and nil on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Disabled = boolean&lt;br /&gt;
                    The disabled state of this ship&lt;br /&gt;
                    Value: true if ship is diabled, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([object Killer])&lt;br /&gt;
                    Kills the ship. Set &amp;quot;Killer&amp;quot; to the ship you are killing to self-destruct&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean addShipEffect(string name, int duration (in milliseconds))&lt;br /&gt;
                    Activates an effect for this ship. Effect names are defined in Post_processing.tbl, and need to be implemented in the main shader. This functions analogous to the ship-effect sexp. NOTE: only one effect can be active at any time, adding new effects will override effects already in progress. &lt;br /&gt;
                    Returns: Returns true if the effect was successfully added, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number hasShipExploded()&lt;br /&gt;
                    Checks if the ship explosion event has already happened&lt;br /&gt;
                    Returns: Returns 1 if first explosion timestamp is passed, 2 if second is passed, 0 otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fireCountermeasure()&lt;br /&gt;
                    Launches a countermeasure from the ship&lt;br /&gt;
                    Returns: Whether countermeasure was launched or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number firePrimary()&lt;br /&gt;
                    Fires ship primary bank(s)&lt;br /&gt;
                    Returns: Number of primary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number fireSecondary()&lt;br /&gt;
                    Fires ship secondary bank(s)&lt;br /&gt;
                    Returns: Number of secondary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getAnimationDoneTime(number Type, number Subtype)&lt;br /&gt;
                    Gets time that animation will be done&lt;br /&gt;
                    Returns: Time (seconds), or 0 if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean clearOrders()&lt;br /&gt;
                    Clears a ship&#039;s orders list&lt;br /&gt;
                    Returns: True if successful, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean giveOrder(enumeration Order, [object Target=nil, subsystem TargetSubsystem=nil, number Priority=1.0])&lt;br /&gt;
                    Uses the goal code to execute orders&lt;br /&gt;
                    Returns: True if order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean doManeuver(number Duration, number Heading, number Pitch, number Bank, boolean Force Rotation, number Vertical, number Horizontal, number Forward, boolean Force Movement)&lt;br /&gt;
                    Sets ship maneuver over the defined time period&lt;br /&gt;
                    Returns: True if maneuver order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean triggerAnimation(string Type, [number Subtype, boolean Forwards])&lt;br /&gt;
                    Triggers an animation. Type is the string name of the animation type, Subtype is the subtype number, such as weapon bank #, and Forwards is boolean.&lt;br /&gt;
                    IMPORTANT: Function is in testing and should not be used with official mod releases&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpIn()&lt;br /&gt;
                    Warps ship in&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpOut()&lt;br /&gt;
                    Warps ship out&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isWarpingIn()&lt;br /&gt;
                    Checks if ship is warping in&lt;br /&gt;
                    Returns: True if the ship is warping in, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getEMP()&lt;br /&gt;
                    Returns the current emp effect strength acting on the object&lt;br /&gt;
                    Returns: Current EMP effect strength or NIL if object is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTimeUntilExplosion()&lt;br /&gt;
                    Returns the time in seconds until the ship explodes&lt;br /&gt;
                    Returns: Time until explosion or -1, if invalid handle or ship isn&#039;t exploding&lt;br /&gt;
                     &lt;br /&gt;
===weapon:object===&lt;br /&gt;
Weapon handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DestroyedByWeapon = boolean&lt;br /&gt;
                    Whether weapon was destroyed by another weapon&lt;br /&gt;
                    Value: True if weapon was destroyed by another weapon, false if weapon was destroyed by another object or if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeLeft = number&lt;br /&gt;
                    Weapon life left (in seconds)&lt;br /&gt;
                    Value: Life left (seconds) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FlakDetonationRange = number&lt;br /&gt;
                    Range at which flak will detonate (meters)&lt;br /&gt;
                    Value: Detonation range (meters) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of weapon. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Weapon target, or invalid object handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentTurret = subsystem&lt;br /&gt;
                    Turret which fired this weapon.&lt;br /&gt;
                    Value: Turret subsystem handle, or an invalid handle if the weapon not fired from a turret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object HomingObject = object&lt;br /&gt;
                    Object that weapon will home in on. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;&lt;br /&gt;
                    Value: Object that weapon is homing in on, or an invalid object handle if weapon is not homing or the weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector HomingPosition = vector&lt;br /&gt;
                    Position that weapon will home in on (World vector)&lt;br /&gt;
                    Value: Homing point, or null vector if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem HomingSubsystem = subsystem&lt;br /&gt;
                    Subsystem that weapon will home in on.&lt;br /&gt;
                    Value: Homing subsystem, or invalid subsystem handle if weapon is not homing or weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Weapon&#039;s team&lt;br /&gt;
                    Value: Weapon team, or invalid team handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isArmed([boolean Hit target])&lt;br /&gt;
                    Checks if the weapon is armed.&lt;br /&gt;
                    Returns: boolean value of the weapon arming status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation()&lt;br /&gt;
                    Returns the collision information for this weapon&lt;br /&gt;
                    Returns: The collision information or invalid handle if none&lt;br /&gt;
                     &lt;br /&gt;
===beam:object===&lt;br /&gt;
Beam handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastShot = vector&lt;br /&gt;
                    End point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastStart = vector&lt;br /&gt;
                    Start point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of beam. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Beam target, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is targeting.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object ParentShip = object&lt;br /&gt;
                    Parent of the beam.&lt;br /&gt;
                    Value: Beam parent, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is fired from.&lt;br /&gt;
                    Value: Parent subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionCount()&lt;br /&gt;
                    Get the number of collisions in frame.&lt;br /&gt;
                    Returns: Number of beam collisions&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPosition(number)&lt;br /&gt;
                    Get the position of the defined collision.&lt;br /&gt;
                    Returns: World vector&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation(number)&lt;br /&gt;
                    Get the collision information of the specified collision&lt;br /&gt;
                    Returns: handle to information or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object getCollisionObject(number)&lt;br /&gt;
                    Get the target of the defined collision.&lt;br /&gt;
                    Returns: Object the beam collided with&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isExitCollision(number)&lt;br /&gt;
                    Checks if the defined collision was exit collision.&lt;br /&gt;
                    Returns: True if the collision was exit collision, false if entry, nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getStartDirectionInfo()&lt;br /&gt;
                    Gets the start information about the direction. The vector is a normalized vector from LastStart showing the start direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getEndDirectionInfo()&lt;br /&gt;
                    Gets the end information about the direction. The vector is a normalized vector from LastStart showing the end direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
===wing===&lt;br /&gt;
Wing handle&lt;br /&gt;
&lt;br /&gt;
                ship [] number Index&lt;br /&gt;
                    Array of ships in the wing&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invawing handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of wings in mission&lt;br /&gt;
                    Returns: Number of wings in mission&lt;br /&gt;
                     &lt;br /&gt;
===player===&lt;br /&gt;
Player handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getName()&lt;br /&gt;
                    Gets current player name&lt;br /&gt;
                    Returns: Player name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCampaignFilename()&lt;br /&gt;
                    Gets current player campaign filename&lt;br /&gt;
                    Returns: Campaign name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getImageFilename()&lt;br /&gt;
                    Gets current player image filename&lt;br /&gt;
                    Returns: Player image filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMainHall()&lt;br /&gt;
                    Gets player&#039;s main hall number&lt;br /&gt;
                    Returns: Main hall index, or 1 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getSquadronName()&lt;br /&gt;
                    Gets current player squad name&lt;br /&gt;
                    Returns: Squadron name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===camera===&lt;br /&gt;
Camera handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Camera name&lt;br /&gt;
                    Returns: Camera name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    New camera name&lt;br /&gt;
                    Value: Camera name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FOV = number&lt;br /&gt;
                    New camera FOV (in radians)&lt;br /&gt;
                    Value: Camera FOV (in radians)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    New camera orientation&lt;br /&gt;
                    Value: Camera orientation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    New camera position&lt;br /&gt;
                    Value: Camera position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Self = object&lt;br /&gt;
                    New mount object&lt;br /&gt;
                    Value: Camera object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem SelfSubsystem = subsystem&lt;br /&gt;
                    New mount object subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is mounted on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    New target object&lt;br /&gt;
                    Value: Camera target object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    New target subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is pointed at&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setFOV([number FOV, number Zoom Time, number Zoom Acceleration Time, number Zoom deceleration Time])&lt;br /&gt;
                    Sets camera FOV&lt;br /&gt;
                    FOV is the final field of view, in radians, of the camera.&lt;br /&gt;
                    Zoom Time is the total time to take zooming in or out.&lt;br /&gt;
                    Acceleration Time is the total time it should take the camera to get up to full zoom speed.&lt;br /&gt;
                    Deceleration Time is the total time it should take the camera to slow down from full zoom speed.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setOrientation([world orientation Orientation, number Rotation Time, number Acceleration Time, number Deceleration time])&lt;br /&gt;
                    Sets camera orientation and velocity data.&lt;br /&gt;
                    Orientation is the final orientation for the camera, after it has finished moving. If not specified, the camera will simply stop at its current orientation.&lt;br /&gt;
                    Rotation time is how long total, including acceleration, the camera should take to rotate. If it is not specified, the camera will jump to the specified orientation.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition([wvector Position, number Translation Time, number Acceleration Time, number Deceleration Time])&lt;br /&gt;
                    Sets camera position and velocity data.&lt;br /&gt;
                    Position is the final position for the camera. If not specified, the camera will simply stop at its current position.&lt;br /&gt;
                    Translation time is how long total, including acceleration, the camera should take to move. If it is not specified, the camera will jump to the specified position.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
===soundentry===&lt;br /&gt;
sounds.tbl table entry handle&lt;br /&gt;
&lt;br /&gt;
                number DefaultVolume = number&lt;br /&gt;
                    The default volume of this game sound&lt;br /&gt;
                    Value: Volume in the range from 1 to 0 or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns the filename of this sound&lt;br /&gt;
                    Returns: filename or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDuration()&lt;br /&gt;
                    Gives the length of the sound in seconds.&lt;br /&gt;
                    Returns: the length, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number get3DValues(vector Postion[, number radius=0.0])&lt;br /&gt;
                    Computes the volume and the panning of the sound when it would be played from the specified position.&lt;br /&gt;
                    If range is given then the volume will diminish when the listener is withing that distance to the source.&lt;br /&gt;
                    The position of the listener is always the the current viewing position.&lt;br /&gt;
                    Returns: The volume and the panning, in that sequence, or both -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===sound===&lt;br /&gt;
sound instance handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of sound, from 100 to 100000&lt;br /&gt;
                    Value: Pitch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getRemainingTime()&lt;br /&gt;
                    The remaining time of this sound handle&lt;br /&gt;
                    Returns: Remaining time, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setVolume(number)&lt;br /&gt;
                    Sets the volume of this sound instance&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPanning(number)&lt;br /&gt;
                    Sets the panning of this sound. Argument ranges from -1 for left to 1 for right&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition(number[,boolean = true])&lt;br /&gt;
                    Sets the absolute position of the sound. If boolean argument is true then the value is given as a percentage&lt;br /&gt;
                    Returns: true if successfull, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rewind(number)&lt;br /&gt;
                    Rewinds the sound by the given number of seconds&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean skip(number)&lt;br /&gt;
                    Skips the given number of seconds of the sound&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPlaying()&lt;br /&gt;
                    Specifies if this handle is currently playing&lt;br /&gt;
                    Returns: true if playing, false if otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean stop()&lt;br /&gt;
                    Stops the sound of this handle&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===3Dsound:sound===&lt;br /&gt;
3D sound instance handle&lt;br /&gt;
&lt;br /&gt;
                boolean updatePosition(vector Position[, number radius = 0.0])&lt;br /&gt;
                    Updates the given 3D sound with the specified position and an optional range value&lt;br /&gt;
                    Returns: true if succeesed, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===control info===&lt;br /&gt;
control info handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of the player ship&lt;br /&gt;
                    Value: Pitch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Heading = number&lt;br /&gt;
                    Heading of the player ship&lt;br /&gt;
                    Value: Heading&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Bank = number&lt;br /&gt;
                    Bank of the player ship&lt;br /&gt;
                    Value: Bank&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Vertical = number&lt;br /&gt;
                    Vertical control of the player ship&lt;br /&gt;
                    Value: Vertical control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Sideways = number&lt;br /&gt;
                    Sideways control of the player ship&lt;br /&gt;
                    Value: Sideways control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Forward = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardCruise = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number PrimaryCount = number&lt;br /&gt;
                    Number of primary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SecondaryCount = number&lt;br /&gt;
                    Number of secondary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasureCount = number&lt;br /&gt;
                    Number of countermeasures that will launch&lt;br /&gt;
                    Value: Number of countermeasures to launch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearLuaButtonInfo()&lt;br /&gt;
                    Clears the lua button control info&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number getButtonInfo()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number accessButtonInfo(number, number, number, number)&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil useButtonControl(number, string)&lt;br /&gt;
                    Adds the defined button control to lua button control data, if number is -1 it tries to use the string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getButtonControlName(number)&lt;br /&gt;
                    Gives the name of the command corresponding with the given number&lt;br /&gt;
                    Returns: Name of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getButtonControlNumber(string)&lt;br /&gt;
                    Gives the number of the command corresponding with the given string&lt;br /&gt;
                    Returns: Number of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AllButtonPolling = boolean&lt;br /&gt;
                    Toggles the all button polling for lua&lt;br /&gt;
                    Value: If the all button polling is enabled or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number pollAllButtons()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
===particle===&lt;br /&gt;
Handle to a particle&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    The current position of the particle (world vector)&lt;br /&gt;
                    Value: The current position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    The current velocity of the particle (world vector)&lt;br /&gt;
                    Value: The current velocity&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Age = number&lt;br /&gt;
                    The time this particle already lives&lt;br /&gt;
                    Value: The current age or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number MaximumLife = number&lt;br /&gt;
                    The time this particle can live&lt;br /&gt;
                    Value: The maximal life or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    The radius of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TracerLength = number&lt;br /&gt;
                    The tracer legth of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object AttachedObject = object&lt;br /&gt;
                    The object this particle is attached to. If valid the position will be relativ to this object and the velocity will be ignored.&lt;br /&gt;
                    Value: Attached object or invalid object handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false if not&lt;br /&gt;
                     &lt;br /&gt;
==Libraries==&lt;br /&gt;
===Audio (ad)===&lt;br /&gt;
Sound/Music Library&lt;br /&gt;
&lt;br /&gt;
                soundentry getSoundentry(string/number)&lt;br /&gt;
                    Return a sound entry matching the specified index or name. If you are using a number then the first valid index is 1&lt;br /&gt;
                    Returns: soundentry or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playSound(soundentry)&lt;br /&gt;
                    Plays the specified sound entry handle&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playLoopingSound(soundentry)&lt;br /&gt;
                    Plays the specified sound as a looping sound&lt;br /&gt;
                    Returns: A handle to the playing sound or invalid handle if playback failed&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                3Dsound play3DSound(soundentry[, vector source[, vector listener]])&lt;br /&gt;
                    Plays the specified sound entry handle. Source if by default 0, 0, 0 and listener is by default the current viewposition&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playGameSound(Sound index, [Panning (-1.0 left to 1.0 right), Volume %, Priority 0-3, Voice Message?])&lt;br /&gt;
                    Plays a sound from #Game Sounds in sounds.tbl. A priority of 0 indicates that the song must play; 1-3 will specify the maximum number of that sound that can be played&lt;br /&gt;
                    Returns: True if sound was played, false if not (Replaced with a sound instance object in the future)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playInterfaceSound(Sound index)&lt;br /&gt;
                    Plays a sound from #Interface Sounds in sounds.tbl&lt;br /&gt;
                    Returns: True if sound was played, false if not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number playMusic(string Filename, [float volume = 1.0, bool looping = true])&lt;br /&gt;
                    Plays a music file using FS2Open&#039;s builtin music system. Volume should be in the 0.0 - 1.0 range, and is capped at 1.0. Files passed to this function are looped by default.&lt;br /&gt;
                    Returns: Audiohandle of the created audiostream, or -1 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil stopMusic(int audiohandle, [bool fade = false])&lt;br /&gt;
                    Stops a playing music file, provided audiohandle is valid&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Base (ba)===&lt;br /&gt;
Base FreeSpace 2 functions&lt;br /&gt;
&lt;br /&gt;
                nil print(string Message)&lt;br /&gt;
                    Prints a string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil warning(string Message)&lt;br /&gt;
                    Displays a FreeSpace warning (debug build-only) message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil error(string Message)&lt;br /&gt;
                    Displays a FreeSpace error message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation createOrientation([p/r1c1, b/r1c2, h/r1c3, r2c1, r2c2, r2c3, r3c1, r3c2, r3c3])&lt;br /&gt;
                    Given 0, 3, or 9 arguments, creates an orientation object with that orientation.&lt;br /&gt;
                    Returns: New orientation object, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector createVector([x, y, z])&lt;br /&gt;
                    Creates a vector object&lt;br /&gt;
                    Returns: Vector object&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFrametime([Do not adjust for time compression (Boolean)])&lt;br /&gt;
                    Gets how long this frame is calculated to take. Use it to for animations, physics, etc to make incremental changes.&lt;br /&gt;
                    Returns: Frame time (seconds)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                state getCurrentGameState([Depth (number)])&lt;br /&gt;
                    Gets current FreeSpace state; if a depth is specified, the state at that depth is returned. (IE at the in-game options game, a depth of 1 would give you the game state, while the function defaults to 0, which would be the options screen.&lt;br /&gt;
                    Returns: Current game state at specified depth, or invalid handle if no game state is active yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCurrentMPStatus(NIL)&lt;br /&gt;
                    Gets this computers current MP status&lt;br /&gt;
                    Returns: Current MP status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setControlMode(NIL or enumeration LE_*_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setButtonControlMode(NIL or enumeration LE_*_BUTTON_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                control info getControlInfo()&lt;br /&gt;
                    Gets the control info handle.&lt;br /&gt;
                    Returns: control info handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean postGameEvent(gameevent Event)&lt;br /&gt;
                    Sets current game event. Note that you can crash FreeSpace 2 by posting an event at an improper time, so test extensively if you use it.&lt;br /&gt;
                    Returns: True if event was posted, false if passed event was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gameevent GameEvents[] number Index/string Name&lt;br /&gt;
                    Array of game events&lt;br /&gt;
                    Returns: Game event, or invalid gameevent handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events&lt;br /&gt;
                        Returns: Number of events&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gamestate GameStates[] number Index/string Name&lt;br /&gt;
                    Array of game states&lt;br /&gt;
                    Returns: Game state, or invalid gamestate handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of states&lt;br /&gt;
                        Returns: Number of states&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CFile (cf)===&lt;br /&gt;
CFile FS2 filesystem access&lt;br /&gt;
&lt;br /&gt;
                boolean deleteFile(string Filename, string Path)&lt;br /&gt;
                    Deletes given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if deleted, false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fileExists(string Filename, [string Path = &amp;quot;&amp;quot;, boolean CheckVPs = false])&lt;br /&gt;
                    Checks if a file exists. Use a blank string for path for any directory, or a slash for the root directory.&lt;br /&gt;
                    Returns: True if file exists, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openFile(string Filename, [string Mode=&amp;quot;r&amp;quot;, string Path = &amp;quot;&amp;quot;])&lt;br /&gt;
                    Opens a file. &#039;Mode&#039; uses standard C fopen arguments. Use a blank string for path for any directory, or a slash for the root directory.Be EXTREMELY CAREFUL when using this function, as you may PERMANENTLY delete any file by accident&lt;br /&gt;
                    Returns: File handle, or invalid file handle if the specified file couldn&#039;t be opened&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openTempFile()&lt;br /&gt;
                    Opens a temp file that is automatically deleted when closed&lt;br /&gt;
                    Returns: File handle, or invalid file handle if tempfile couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renameFile(string CurrentFilename, string NewFilename, string Path)&lt;br /&gt;
                    Renames given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if file was renamed, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Controls (io)===&lt;br /&gt;
Controls library&lt;br /&gt;
&lt;br /&gt;
                number getMouseX()&lt;br /&gt;
                    Gets Mouse X pos&lt;br /&gt;
                    Returns: Mouse x position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMouseY()&lt;br /&gt;
                    Gets Mouse Y pos&lt;br /&gt;
                    Returns: Mouse y position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMouseButtonDown({MOUSE_*_BUTTON enumeration}, [..., ...])&lt;br /&gt;
                    Returns whether the specified mouse buttons are up or down&lt;br /&gt;
                    Returns: Whether specified mouse buttons are down, or false if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorImage(Image filename, [LOCK or UNLOCK])&lt;br /&gt;
                    Sets mouse cursor image, and allows you to lock/unlock the image. (A locked cursor may only be changed with the unlock parameter)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorHidden(True to hide mouse, false to show it)&lt;br /&gt;
                    Shows or hides mouse cursor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean forceMousePosition(number, number (coordinates))&lt;br /&gt;
                    function to force mouse position&lt;br /&gt;
                    Returns: if the operation succeeded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean MouseControlStatus = boolean&lt;br /&gt;
                    Gets and sets the retail mouse control status&lt;br /&gt;
                    Value: if the retail mouse is on or off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean updateTrackIR()&lt;br /&gt;
                    Updates Tracking Data. Call before using get functions&lt;br /&gt;
                    Returns: Checks if trackir is available and updates variables, returns true if successful, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRPitch()&lt;br /&gt;
                    Gets pitch axis from last update&lt;br /&gt;
                    Returns: Pitch value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRYaw()&lt;br /&gt;
                    Gets yaw axis from last update&lt;br /&gt;
                    Returns: Yaw value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRRoll()&lt;br /&gt;
                    Gets roll axis from last update&lt;br /&gt;
                    Returns: Roll value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRX()&lt;br /&gt;
                    Gets x position from last update&lt;br /&gt;
                    Returns: X value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRY()&lt;br /&gt;
                    Gets y position from last update&lt;br /&gt;
                    Returns: Y value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRZ()&lt;br /&gt;
                    Gets z position from last update&lt;br /&gt;
                    Returns: Z value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HUD (hu)===&lt;br /&gt;
HUD library&lt;br /&gt;
&lt;br /&gt;
                boolean HUDDrawn = boolean&lt;br /&gt;
                    Current HUD draw status&lt;br /&gt;
                    Value: If the HUD is drawn or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setHUDGaugeColor(number (index number of the gauge), [number red, number green, number blue, number alpha])&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: If the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number, number getHUDGaugeColor(number (index number of the gauge))&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: Red, green, blue, and alpha of the gauge&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                HudGauge getHUDGaugeHandle(string Name)&lt;br /&gt;
                    Returns a handle to a specified HUD gauge&lt;br /&gt;
                    Returns: HUD Gauge handle, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Graphics (gr)===&lt;br /&gt;
Graphics Library&lt;br /&gt;
&lt;br /&gt;
                camera Cameras[] number Index/string Name&lt;br /&gt;
                    Gets camera&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of cameras&lt;br /&gt;
                        Returns: Number of cameras&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font Fonts[] number Index/string Filename&lt;br /&gt;
                    Array of loaded fonts&lt;br /&gt;
                    Returns: Font handle, or invalid font handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of loaded fonts&lt;br /&gt;
                        Returns: Number of loaded fonts&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font CurrentFont = font&lt;br /&gt;
                    Current font&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration CurrentOpacityType = enumeration&lt;br /&gt;
                    Current alpha blending type; uses ALPHABLEND_* enumerations&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture CurrentRenderTarget = texture&lt;br /&gt;
                    Current rendering target&lt;br /&gt;
                    Value: Current rendering target, or invalid texture handle if screen is render target&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearScreen([number Red, number green, number blue, number alpha])&lt;br /&gt;
                    Clears the screen to black, or the color specified.&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                camera createCamera(string Name, [wvector Position, orientation Orientation])&lt;br /&gt;
                    Creates a new camera using the specified position and orientation (World)&lt;br /&gt;
                    Returns: Camera handle, or invalid camera handle if camera couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenWidth()&lt;br /&gt;
                    Gets screen width&lt;br /&gt;
                    Returns: Width in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenHeight()&lt;br /&gt;
                    Gets screen height&lt;br /&gt;
                    Returns: Height in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getVectorFromCoords([number X=center, number Y=center, number Depth, boolean normalize = false])&lt;br /&gt;
                    Returns a vector through screen coordinates x and y. If depth is specified, vector is extended to Depth units into spaceIf normalize is true, vector will be normalized.&lt;br /&gt;
                    Returns: Vector, or zero vector on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setTarget([texture Texture])&lt;br /&gt;
                    If texture is specified, sets current rendering surface to a texture.Otherwise, sets rendering surface back to screen.&lt;br /&gt;
                    Returns: True if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setCamera([camera handle Camera])&lt;br /&gt;
                    Sets current camera, or resets camera if none specified&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setColor(number Red, number Green, number Blue, [number Alpha])&lt;br /&gt;
                    Sets 2D drawing color; each color number should be from 0 (darkest) to 255 (brightest)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCircle(number Radius, number X, number Y)&lt;br /&gt;
                    Draws a circle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCurve(number X, number Y, number Radius)&lt;br /&gt;
                    Draws a curve&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawGradientLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with the CurrentColor that steadily fades out&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPixel(number X, number Y)&lt;br /&gt;
                    Sets pixel to CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPolygon(texture Texture, [vector Position={0,0,0}, orientation Orientation=null, number Width=1.0, number Height=1.0])&lt;br /&gt;
                    Draws a polygon&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawRectangle(number X1, number Y1, number X2, number Y2, [boolean Filled=true])&lt;br /&gt;
                    Draws a rectangle with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawSphere([number Radius = 1.0, vector Position])&lt;br /&gt;
                    Draws a sphere with radius Radius at world vector Position&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModel(model, position, orientation)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, may not work properly in all scripting hooks.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModelOOR(model Model, vector Position, matrix Orientation, integer Flags)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, designer to operate properly only in On Object Render hook.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number,number,number,number drawTargetingBrackets(object Object, [boolean draw=true, int padding=5])&lt;br /&gt;
                    Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.&lt;br /&gt;
                    Returns: Left, top, right, and bottom positions of the brackets, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number drawString(string Message, [number X1, number Y1, number X2, number Y2])&lt;br /&gt;
                    Draws a string. Use x1/y1 to control position, x2/y2 to limit textbox size.Text will automatically move onto new lines, if x2/y2 is specified.Additionally, calling drawString with only a string argument will automaticallydraw that string below the previously drawn string (or 0,0 if no stringshave been drawn yet&lt;br /&gt;
                    Returns: Number of lines drawn, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getStringWidth(string String)&lt;br /&gt;
                    Gets string width&lt;br /&gt;
                    Returns: String width, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture createTexture([number Width=512, number Height=512, enumeration Type=TEXTURE_DYNAMIC])&lt;br /&gt;
                    Creates a texture for rendering to.Types are TEXTURE_STATIC - for infrequent rendering - and TEXTURE_DYNAMIC - for frequent rendering.&lt;br /&gt;
                    Returns: New texture handle, or invalid texture handle if texture couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture loadTexture(string Filename, [boolean LoadIfAnimation, boolean NoDropFrames])&lt;br /&gt;
                    Gets a handle to a texture. If second argument is set to true, animations will also be loaded.If third argument is set to true, every other animation frame will not be loaded if system has less than 48 MB memory.&lt;br /&gt;
                    IMPORTANT: Textures will not be unload themselves unless you explicitly tell them to do so.When you are done with a texture, call the Unload() function to free up memory.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if texture couldn&#039;t be loaded&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawImage(string Filename/texture Texture, [number X1=0, Y1=0, number X2, number Y2, number UVX1 = 0.0, number UVY1 = 0.0, number UVX2=1.0, number UVY2=1.0, number alpha=1.0])&lt;br /&gt;
                    Draws an image or texture. Any image extension passed will be ignored.The UV variables specify the UV value for each corner of the image. In UV coordinates, (0,0) is the top left of the image; (1,1) is the lower right.&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawMonochromeImage(string Filename/texture Texture, number X1, number Y1, [number X2, number Y2, number alpha=1.0])&lt;br /&gt;
                    Draws a monochrome image using the current color&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageWidth(string Filename)&lt;br /&gt;
                    Gets image width&lt;br /&gt;
                    Returns: Image width, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageHeight(Image name)&lt;br /&gt;
                    Gets image height&lt;br /&gt;
                    Returns: Image height, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil flashScreen(number Red, number Green, number Blue)&lt;br /&gt;
                    Flashes the screen&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model loadModel(string Filename)&lt;br /&gt;
                    Loads the model - will not setup subsystem data, DO NOT USE FOR LOADING SHIP MODELS&lt;br /&gt;
                    Returns: Handle to a model&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasViewmode(enumeration)&lt;br /&gt;
                    Specifies if the current viemode has the specified flag, see VM_* enumeration&lt;br /&gt;
                    Returns: true if flag is present, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HookVariables (hv)===&lt;br /&gt;
Hook variables repository&lt;br /&gt;
&lt;br /&gt;
                string Globals[] number Index&lt;br /&gt;
                    Array of current HookVariable names&lt;br /&gt;
                    Returns: Hookvariable name, or empty string if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of HookVariables&lt;br /&gt;
                        Returns: Number of HookVariables&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mission (mn)===&lt;br /&gt;
Mission library&lt;br /&gt;
&lt;br /&gt;
                object getObjectFromSignature(number Signature)&lt;br /&gt;
                    Gets a handle of an object from its signature&lt;br /&gt;
                    Returns: Handle of object with signaure, invalid handle if signature is not in use&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean evaluateSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean runSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                asteroid Asteroids[] number Index&lt;br /&gt;
                    Gets asteroid&lt;br /&gt;
                    Returns: Asteroid handle, or invalid handle if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of asteroids in mission. Note that the value returned is only good until an asteroid is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of asteroids in the mission, or 0 if asteroids are not enabled&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                debris Debris[] number Index&lt;br /&gt;
                    Array of debris in the current mission&lt;br /&gt;
                    Returns: Debris handle, or invalid debris handle if index wasn&#039;t valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of debris pieces in the mission. Note that the value returned is only good until a piece of debris is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Current number of debris particles&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship EscortShips[] number Index&lt;br /&gt;
                    Gets escort ship at specified index on escort list&lt;br /&gt;
                    Returns: Specified ship, or invalid ship handle if invalid index&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of escort ships&lt;br /&gt;
                        Returns: Current number of escort ships&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                event Events[] number Index/string Name&lt;br /&gt;
                    Indexes events list&lt;br /&gt;
                    Returns: Event handle, or invalid event handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events in mission&lt;br /&gt;
                        Returns: Number of events in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sexpvariable SEXPVariables[] number Index/string Name&lt;br /&gt;
                    Array of SEXP variables. Note that you can set a sexp variable using the array, eg &#039;SEXPVariables[1] = &amp;quot;newvalue&amp;quot;&#039;&lt;br /&gt;
                    Returns: Handle to SEXP variable, or invalid sexpvariable handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of SEXP variables&lt;br /&gt;
                        Returns: Counts number of loaded SEXP Variables. May be slow.&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship Ships[] number Index/string Name&lt;br /&gt;
                    Gets ship&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ships in the mission. This function is somewhat slow, and should be set to a variable for use in looping situations. Note that the value returned is only good until a ship is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of ships in the mission, or 0 if ships haven&#039;t been initialized yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint Waypoints[] number Index&lt;br /&gt;
                    Array of waypoints in the current mission&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of waypoints in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoints in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypointlist WaypointLists[] number Index/string WaypointListName&lt;br /&gt;
                    Array of waypoint lists&lt;br /&gt;
                    Returns: Gets waypointlist handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of waypoint lists in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoint lists in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon Weapons[] number Index&lt;br /&gt;
                    Gets handle to a weapon object in the mission.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of weapon objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                beam Beams[] number Index&lt;br /&gt;
                    Gets handle to a beam object in the mission.&lt;br /&gt;
                    Returns: Beam handle, or invalid beam handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of beam objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of beam objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                wing Wings[] number Index/string WingName&lt;br /&gt;
                    Wings in the mission&lt;br /&gt;
                    Returns: Wing handle, or invalid wing handle if index or name was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of wings in mission&lt;br /&gt;
                        Returns: Number of wings in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship createShip([string Name, shipclass Class=Shipclass[1], orientation Orientation=null, vector Position={0,0,0}])&lt;br /&gt;
                    Creates a ship and returns a handle to it using the specified name, class, world orientation, and world position&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if ship couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint createWaypoint([vector Position, waypointlist List])&lt;br /&gt;
                    Creates a waypoint&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if waypoint couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon createWeapon([weaponclass Class=WeaponClass[1], orientation Orientation=null, world vector Position={0,0,0}, object Parent = nil, number Group = -1)&lt;br /&gt;
                    Creates a weapon and returns a handle to it. &#039;Group&#039; is used for lighting grouping purposes; for example, quad lasers would only need to act as one light source.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if weapon couldn&#039;t be created.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getMissionFilename()&lt;br /&gt;
                    Gets mission filename&lt;br /&gt;
                    Returns: Mission filename, or empty string if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean startMission([Filename or MISSION_* enumeration, Briefing = true])&lt;br /&gt;
                    Starts the defined mission&lt;br /&gt;
                    Returns: True, or false if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMissionTime()&lt;br /&gt;
                    Game time in seconds since the mission was started; is affected by time compression&lt;br /&gt;
                    Returns: Mission time (seconds), or 0 if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean loadMission(Mission name)&lt;br /&gt;
                    Loads a mission&lt;br /&gt;
                    Returns: True if mission was loaded, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unloadMission()&lt;br /&gt;
                    Stops the current mission and unloads it&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil simulateFrame()&lt;br /&gt;
                    Simulates mission frame&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil renderFrame()&lt;br /&gt;
                    Renders mission frame, but does not move anything&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BitOps (bit)===&lt;br /&gt;
Bitwise Operations library&lt;br /&gt;
&lt;br /&gt;
                number AND(number, number)&lt;br /&gt;
                    Values for which bitwise boolean AND operation is performed&lt;br /&gt;
                    Returns: Result of the AND operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number OR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean OR operation is performed&lt;br /&gt;
                    Returns: Result of the OR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number XOR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean XOR operation is performed&lt;br /&gt;
                    Returns: Result of the XOR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number toggleBit(number, number (bit))&lt;br /&gt;
                    Toggles the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean checkBit(number, number (bit))&lt;br /&gt;
                    Checks the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Was the bit true of false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number addBit(number, number (bit))&lt;br /&gt;
                    Performs inclusive or (OR) operation on the set bit of the value&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Tables (tb)===&lt;br /&gt;
Tables library&lt;br /&gt;
&lt;br /&gt;
                ship ShipClasses[] number Index/string Name&lt;br /&gt;
                    Array of ship classes&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ship classes&lt;br /&gt;
                        Returns: Number of ship classes, or 0 if ship classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon WeaponClasses[] number Index/string WeaponName&lt;br /&gt;
                    Array of weapon classes&lt;br /&gt;
                    Returns: Weapon class handle, or invalid weaponclass handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon classes&lt;br /&gt;
                        Returns: Number of weapon classes, or 0 if weapon classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing (ts)===&lt;br /&gt;
Experimental or testing stuff&lt;br /&gt;
&lt;br /&gt;
                nil avdTest()&lt;br /&gt;
                    Test the AVD Physics code&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                particle createParticle(vector Position, vector Velocity, number Lifetime, number Radius, enumeration Type, [number Tracer length=-1, boolean Reverse=false, texture Texture=Nil, object Attached Object=Nil])&lt;br /&gt;
                    Creates a particle. Use PARTICLE_* enumerations for type.Reverse reverse animation, if one is specifiedAttached object specifies object that Position will be (and always be) relative to.&lt;br /&gt;
                    Returns: Handle to the created particle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getStack()&lt;br /&gt;
                    Generates an ADE stackdump&lt;br /&gt;
                    Returns: Current Lua stack&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isCurrentPlayerMulti()&lt;br /&gt;
                    Returns whether current player is a multiplayer pilot or not.&lt;br /&gt;
                    Returns: Whether current player is a multiplayer pilot or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPXOEnabled()&lt;br /&gt;
                    Returns whether PXO is currently enabled in the configuration.&lt;br /&gt;
                    Returns: Whether PXO is enabled or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enumerations==&lt;br /&gt;
        ALPHABLEND_FILTER&lt;br /&gt;
        ALPHABLEND_NONE&lt;br /&gt;
        CFILE_TYPE_NORMAL&lt;br /&gt;
        CFILE_TYPE_MEMORY_MAPPED&lt;br /&gt;
        MOUSE_LEFT_BUTTON&lt;br /&gt;
        MOUSE_RIGHT_BUTTON&lt;br /&gt;
        MOUSE_MIDDLE_BUTTON&lt;br /&gt;
        ORDER_ATTACK&lt;br /&gt;
        ORDER_ATTACK_ANY&lt;br /&gt;
        ORDER_DEPART&lt;br /&gt;
        ORDER_DISABLE&lt;br /&gt;
        ORDER_DISARM&lt;br /&gt;
        ORDER_DOCK&lt;br /&gt;
        ORDER_EVADE&lt;br /&gt;
        ORDER_FLY_TO&lt;br /&gt;
        ORDER_FORM_ON_WING&lt;br /&gt;
        ORDER_GUARD&lt;br /&gt;
        ORDER_IGNORE_SHIP&lt;br /&gt;
        ORDER_KEEP_SAFE_DISTANCE&lt;br /&gt;
        ORDER_PLAY_DEAD&lt;br /&gt;
        ORDER_REARM&lt;br /&gt;
        ORDER_STAY_NEAR&lt;br /&gt;
        ORDER_STAY_STILL&lt;br /&gt;
        ORDER_UNDOCK&lt;br /&gt;
        ORDER_WAYPOINTS&lt;br /&gt;
        ORDER_WAYPOINTS_ONCE&lt;br /&gt;
        PARTICLE_DEBUG&lt;br /&gt;
        PARTICLE_BITMAP&lt;br /&gt;
        PARTICLE_FIRE&lt;br /&gt;
        PARTICLE_SMOKE&lt;br /&gt;
        PARTICLE_SMOKE2&lt;br /&gt;
        PARTICLE_PERSISTENT_BITMAP&lt;br /&gt;
        SEXPVAR_CAMPAIGN_PERSISTENT&lt;br /&gt;
        SEXPVAR_NOT_PERSISTENT&lt;br /&gt;
        SEXPVAR_PLAYER_PERSISTENT&lt;br /&gt;
        SEXPVAR_TYPE_NUMBER&lt;br /&gt;
        SEXPVAR_TYPE_STRING&lt;br /&gt;
        TEXTURE_STATIC&lt;br /&gt;
        TEXTURE_DYNAMIC&lt;br /&gt;
        LOCK&lt;br /&gt;
        UNLOCK&lt;br /&gt;
        NONE&lt;br /&gt;
        SHIELD_FRONT&lt;br /&gt;
        SHIELD_LEFT&lt;br /&gt;
        SHIELD_RIGHT&lt;br /&gt;
        SHIELD_BACK&lt;br /&gt;
        MISSION_REPEAT&lt;br /&gt;
        NORMAL_CONTROLS&lt;br /&gt;
        LUA_STEERING_CONTROLS&lt;br /&gt;
        LUA_FULL_CONTROLS&lt;br /&gt;
        NORMAL_BUTTON_CONTROLS&lt;br /&gt;
        LUA_ADDITIVE_BUTTON_CONTROL&lt;br /&gt;
        LUA_OVERRIDE_BUTTON_CONTROL&lt;br /&gt;
        VM_INTERNAL&lt;br /&gt;
        VM_EXTERNAL&lt;br /&gt;
        VM_TRACK&lt;br /&gt;
        VM_DEAD_VIEW&lt;br /&gt;
        VM_CHASE&lt;br /&gt;
        VM_OTHER_SHIP&lt;br /&gt;
        VM_EXTERNAL_CAMERA_LOCKED&lt;br /&gt;
        VM_WARP_CHASE&lt;br /&gt;
        VM_PADLOCK_UP&lt;br /&gt;
        VM_PADLOCK_REAR&lt;br /&gt;
        VM_PADLOCK_LEFT&lt;br /&gt;
        VM_PADLOCK_RIGHT&lt;br /&gt;
        VM_WARPIN_ANCHOR&lt;br /&gt;
        VM_TOPDOWN&lt;br /&gt;
        VM_FREECAMERA&lt;/div&gt;</summary>
		<author><name>Aginor</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38978</id>
		<title>Scripting functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38978"/>
		<updated>2012-07-15T12:07:45Z</updated>

		<summary type="html">&lt;p&gt;Aginor: /* gamestate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains all the functions mentioned in the scripting.html file, including their syntax, remarks on their use and common errors modders may encounter when they use them.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Script Output - FSO v3.6.13 (FS2_Open Scripting)&lt;br /&gt;
&lt;br /&gt;
==Conditional Hooks==&lt;br /&gt;
&lt;br /&gt;
===Conditions===&lt;br /&gt;
*State&lt;br /&gt;
*Campaign&lt;br /&gt;
*Mission&lt;br /&gt;
*Object Type&lt;br /&gt;
*Ship&lt;br /&gt;
*Ship class&lt;br /&gt;
*Ship type&lt;br /&gt;
*Weapon class&lt;br /&gt;
*KeyPress&lt;br /&gt;
*Version&lt;br /&gt;
*Application&lt;br /&gt;
**&#039;&#039;Usually: $Application: FS2_Open&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Actions===&lt;br /&gt;
*On Game Init&lt;br /&gt;
*On Splash Screen&lt;br /&gt;
*On State Start&lt;br /&gt;
*On Frame&lt;br /&gt;
*On Key Pressed&lt;br /&gt;
*On Key Released&lt;br /&gt;
*On Mouse Moved&lt;br /&gt;
*On Mouse Pressed&lt;br /&gt;
*On Mouse Released&lt;br /&gt;
*On State End&lt;br /&gt;
*On Mission Start&lt;br /&gt;
*On HUD Draw&lt;br /&gt;
*On Ship Collision&lt;br /&gt;
*On Weapon Collision&lt;br /&gt;
*On Debris Collision&lt;br /&gt;
*On Asteroid Collision&lt;br /&gt;
*On Object Render&lt;br /&gt;
*On Warp In&lt;br /&gt;
*On Warp Out&lt;br /&gt;
*On Death&lt;br /&gt;
*On Mission End&lt;br /&gt;
*On Weapon Delete&lt;br /&gt;
*On Weapon Equipped&lt;br /&gt;
*On Weapon Fired&lt;br /&gt;
*On Weapon Selected&lt;br /&gt;
*On Weapon Deselected&lt;br /&gt;
*On Gameplay Start&lt;br /&gt;
*On Turret Fired&lt;br /&gt;
*On Primary Fire&lt;br /&gt;
*On Secondary Fire&lt;br /&gt;
&lt;br /&gt;
==Types==&lt;br /&gt;
===vector===&lt;br /&gt;
:&#039;&#039;&#039;Vector object&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number [] x,y,z or 1-3&#039;&#039;&lt;br /&gt;
::*Vector component&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Value at index, or 0 if vector handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] + number/vector&#039;&#039;&lt;br /&gt;
::*Adds vector by another vector, or adds all axes by value&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] - number/vector&#039;&#039;&lt;br /&gt;
::*Subtracts vector from another vector, or subtracts all axes by value&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] * number/vector&#039;&#039;&lt;br /&gt;
::*Scales vector object (Multiplies all axes by number), or multiplies each axes by the other vector&#039;s axes.&lt;br /&gt;
::*&#039;&#039;&#039; Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] / number/vector&#039;&#039;&lt;br /&gt;
::*Scales vector object (Divide all axes by number), or divides each axes by the dividing vector&#039;s axes.&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string (string)&#039;&#039;&lt;br /&gt;
::*Converts a vector to string with format &amp;quot;(x,y,z)&amp;quot;&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Vector as string, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#orientation|orientation]]&#039;&#039; &#039;&#039;&#039;getOrientation()&#039;&#039;&#039;&lt;br /&gt;
::*Returns orientation object representing the direction of the vector. Does not require vector to be normalized.&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Orientation object, or null orientation object if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getMagnitude()&#039;&#039;&#039;&lt;br /&gt;
::*Returns the magnitude of a vector (Total regardless of direction)&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Magnitude of vector, or 0 if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getDistance(&#039;&#039;&#039;&#039;&#039;Vector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Distance&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Returns distance from another vector&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getDotProduct(&#039;&#039;&#039;&#039;&#039;vector OtherVector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Returns dot product of vector object with vector argument&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Dot product, or 0 if a handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]]&#039;&#039; &#039;&#039;&#039;getCrossProduct(&#039;&#039;&#039;&#039;&#039;vector OtherVector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Returns cross product of vector object with vector argument&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Cross product, or null vector if a handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number,number&#039;&#039; &#039;&#039;&#039;getScreenCoords()&#039;&#039;&#039;&lt;br /&gt;
::*Gets screen cordinates of a world vector&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; X (number), Y (number), or false if off-screen&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;vector&#039;&#039; &#039;&#039;&#039;getNormalized()&#039;&#039;&#039;&lt;br /&gt;
::*Returns a normalized version of the vector&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Normalized Vector, or NIL if invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===orientation===&lt;br /&gt;
Orientation matrix object&lt;br /&gt;
&lt;br /&gt;
                number [] p,b,h or 1-9&lt;br /&gt;
                    Orientation component - pitch, bank, heading, or index into 3x3 matrix (1-9)&lt;br /&gt;
                    Returns: Number at the specified index, or 0 if index is invalid.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation * orientation&lt;br /&gt;
                    Multiplies two matrix objects)&lt;br /&gt;
                    Returns: matrix, or empty matrix if unsuccessful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Converts a matrix to a string with format &amp;quot;[r1c1 r2c1 r3c1 | r1c2 r2c2 r3c2| r1c3 r2c3 r3c3]&amp;quot;&lt;br /&gt;
                    Returns: Formatted string or &amp;quot;&lt;br /&gt;
                      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getInterpolated(orientation Final, number Factor)&lt;br /&gt;
                    Returns orientation that has been interpolated to Final by Factor (0.0-1.0)&lt;br /&gt;
                    Returns: Interpolated orientation, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getTranspose()&lt;br /&gt;
                    Returns a transpose version of the specified orientation&lt;br /&gt;
                    Returns: Transpose matrix, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector rotateVector(vector Input)&lt;br /&gt;
                    Returns rotated version of given vector&lt;br /&gt;
                    Returns: Rotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector unrotateVector(vector Input)&lt;br /&gt;
                    Returns unrotated version of given vector&lt;br /&gt;
                    Returns: Unrotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
===enumeration===&lt;br /&gt;
Enumeration object&lt;br /&gt;
&lt;br /&gt;
                enumeration = enumeration&lt;br /&gt;
                    Sets enumeration to specified value (if it is not a global&lt;br /&gt;
                    Returns: enumeration&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns enumeration name&lt;br /&gt;
                    Returns: Enumeration name, or &amp;quot;&amp;quot; if invalid&lt;br /&gt;
                      &lt;br /&gt;
===event===&lt;br /&gt;
Mission event handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Mission event name&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveText = string&lt;br /&gt;
                    Directive text&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveKeypressText = string&lt;br /&gt;
                    Raw directive keypress text, as seen in FRED.&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Interval = number&lt;br /&gt;
                    Time for event to repeat (in seconds)&lt;br /&gt;
                    Value: Repeat time, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ObjectCount = number&lt;br /&gt;
                    Number of objects left for event&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RepeatCount = number&lt;br /&gt;
                    Event repeat count&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Score = number&lt;br /&gt;
                    Event score&lt;br /&gt;
                    Value: Event score, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===file===&lt;br /&gt;
File handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil close()&lt;br /&gt;
                    Instantly closes file and invalidates all file handles&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean flush()&lt;br /&gt;
                    Flushes file buffer to disk.&lt;br /&gt;
                    Returns: True for success, false on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getPath()&lt;br /&gt;
                    Determines path of the given file&lt;br /&gt;
                    Returns: Path string of the file handle, or an empty string if it doesn&#039;t have one, or the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number or string, ... read(number or string, ...)&lt;br /&gt;
                    Reads part of or all of a file, depending on arguments passed. Based on basic Lua file:read function.Returns nil when the end of the file is reached.&lt;br /&gt;
&lt;br /&gt;
                        * &amp;quot;*n&amp;quot; - Reads a number.&lt;br /&gt;
                        * &amp;quot;*a&amp;quot; - Reads the rest of the file and returns it as a string.&lt;br /&gt;
                        * &amp;quot;*l&amp;quot; - Reads a line. Skips the end of line markers.&lt;br /&gt;
                        * (number) - Reads given number of characters, then returns them as a string.&lt;br /&gt;
&lt;br /&gt;
                    Returns: Requested data, or nil if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number seek([string Whence=&amp;quot;cur&amp;quot;, number Offset=0])&lt;br /&gt;
                  # Changes position of file, or gets location.Whence can be:&amp;quot;set&amp;quot; - File start.&lt;br /&gt;
                  # &amp;quot;cur&amp;quot; - Current position in file.&lt;br /&gt;
                  # &amp;quot;end&amp;quot; - File end.&lt;br /&gt;
                    Returns: new offset, or false or nil on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number write(string or number, ...)&lt;br /&gt;
                    Writes a series of Lua strings or numbers to the current file.&lt;br /&gt;
                    Returns: Number of items successfully written.&lt;br /&gt;
                     &lt;br /&gt;
===font===&lt;br /&gt;
font handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Filename of font&lt;br /&gt;
                    Returns: Font filename, or an empty string if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Filename of font (including extension)&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Height = number&lt;br /&gt;
                    Height of font (in pixels)&lt;br /&gt;
                    Value: Font height, or 0 if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
===gameevent===&lt;br /&gt;
Game event&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Returns: Game event name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Value: Game event name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===gamestate===&lt;br /&gt;
:&#039;&#039;&#039;Game state&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string (string)&#039;&#039;&lt;br /&gt;
::*Game state name&lt;br /&gt;
::*&#039;&#039;&#039;Value:&#039;&#039;&#039; Game state name, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Name = string&#039;&#039;&lt;br /&gt;
::*Game state name&lt;br /&gt;
::*&#039;&#039;&#039;Value:&#039;&#039;&#039; Game state name, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===HudGauge===&lt;br /&gt;
:&#039;&#039;&#039;HUD Gauge handle&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Name = string&#039;&#039;&lt;br /&gt;
::*Custom HUD Gauge name&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Custom HUD Gauge name, or nil if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Text = string&#039;&#039;&lt;br /&gt;
::*Custom HUD Gauge text&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Value: Custom HUD Gauge text, or nil if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===eyepoint===&lt;br /&gt;
Eyepoint handle&lt;br /&gt;
&lt;br /&gt;
                vector Normal = vector&lt;br /&gt;
                    Eyepoint normal&lt;br /&gt;
                    Value: Eyepoint normal, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Eyepoint location (Local vector)&lt;br /&gt;
                    Value: Eyepoint location, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean IsValid()&lt;br /&gt;
                    Detect whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===model===&lt;br /&gt;
3D Model (POF) handle&lt;br /&gt;
&lt;br /&gt;
                modeltextures_h Textures = modeltextures_h&lt;br /&gt;
                    Model textures&lt;br /&gt;
                    Value: Model textures, or an invalid modeltextures handle if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusters Thrusters = thrusters&lt;br /&gt;
                    Model thrusters&lt;br /&gt;
                    Value: Thrusters of the model or invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoints Eyepoints = eyepoints&lt;br /&gt;
                    Model eyepoints&lt;br /&gt;
                    Value: Array of eyepoints or invalid handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMax = vector&lt;br /&gt;
                    Model bounding box maximum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMin = vector&lt;br /&gt;
                    Model bounding box minimum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Model filename&lt;br /&gt;
                    Value: Model filename, or an empty string if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Model mass&lt;br /&gt;
                    Value: Model mass, or 0 if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation MomentOfInertia = orientation&lt;br /&gt;
                    Model moment of inertia&lt;br /&gt;
                    Value: Moment of Inertia matrix or identity matrix if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    Model radius (Used for collision &amp;amp; culling detection)&lt;br /&gt;
                    Value: Model Radius or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
===modeltextures_h===&lt;br /&gt;
Array of materials&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on model&lt;br /&gt;
                    Returns: Number of model textures&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] texture&lt;br /&gt;
                    number Index/string TextureName&lt;br /&gt;
                    Returns: Model textures, or invalid modeltextures handle if model handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===eyepoints===&lt;br /&gt;
Array of model eye points&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Gets the number of eyepoints on this model&lt;br /&gt;
                    Returns: Number of eyepoints on this model or 0 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoint [] eyepoint&lt;br /&gt;
                    Gets en eyepoint handle&lt;br /&gt;
                    Returns: eye handle or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid or not&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===thrusters===&lt;br /&gt;
The thrusters of a model&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thruster banks on the model&lt;br /&gt;
                    Returns: Number of thrusterbanks&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusterbank [] number Index&lt;br /&gt;
                    Array of all thrusterbanks on this thruster&lt;br /&gt;
                    Returns: Handle to the thrusterbank or invalid handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===thrusterbank===&lt;br /&gt;
A model thrusterbank&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thrusters on this thrusterbank&lt;br /&gt;
                    Returns: Number of thrusters on this bank or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                glowpoint [] number Index&lt;br /&gt;
                    Array of glowpoint&lt;br /&gt;
                    Returns: Glowpoint, or invalid glowpoint handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detectes if this handle is valid&lt;br /&gt;
                    Returns: true if this handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===glowpoint===&lt;br /&gt;
A model glowpoint&lt;br /&gt;
&lt;br /&gt;
                vector Position&lt;br /&gt;
                    The (local) vector to the position of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius&lt;br /&gt;
                    The radius of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Returns wether this handle is valid or not&lt;br /&gt;
                    Returns: True if handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===order===&lt;br /&gt;
order handle&lt;br /&gt;
&lt;br /&gt;
                boolean remove()&lt;br /&gt;
                    Removes the given order from the ship&#039;s priority queue.&lt;br /&gt;
                    Returns: True if order was successfully removed, otherwise false or nil.&lt;br /&gt;
                     &lt;br /&gt;
===shiporders===&lt;br /&gt;
Ship orders&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                order [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship orders&lt;br /&gt;
                    Returns: Order, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===physics===&lt;br /&gt;
Physics handle&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerAccelerationTime = number&lt;br /&gt;
                    Afterburner acceleration time&lt;br /&gt;
                    Value: Afterburner acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector AfterburnerVelocityMax = vector&lt;br /&gt;
                    Afterburner max velocity (Local vector)&lt;br /&gt;
                    Value: Afterburner max velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number BankingConstant = number&lt;br /&gt;
                    Banking constant&lt;br /&gt;
                    Value: Banking constant, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardAccelerationTime = number&lt;br /&gt;
                    Forward acceleration time&lt;br /&gt;
                    Value: Forward acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardDecelerationTime = number&lt;br /&gt;
                    Forward deceleration time&lt;br /&gt;
                    Value: Forward decleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardThrust = number&lt;br /&gt;
                    Forward thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Forward thrust, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Object mass&lt;br /&gt;
                    Value: Object mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocity = vector&lt;br /&gt;
                    Rotational velocity (Local vector)&lt;br /&gt;
                    Value: Rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDamping = number&lt;br /&gt;
                    Rotational damping, ie derivative of rotational speed&lt;br /&gt;
                    Value: Rotational damping, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDesired = lvector&lt;br /&gt;
                    Desired rotational velocity&lt;br /&gt;
                    Value: Desired rotational velocity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocityMax = vector&lt;br /&gt;
                    Maximum rotational velocity (Local vector)&lt;br /&gt;
                    Value: Maximum rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShockwaveShakeAmplitude = number&lt;br /&gt;
                    How much shaking from shockwaves is applied to object&lt;br /&gt;
                    Value: Shockwave shake amplitude, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SideThrust = number&lt;br /&gt;
                    Side thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Side thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideAccelerationTime = number&lt;br /&gt;
                    Time to accelerate to maximum slide velocity&lt;br /&gt;
                    Value: Sliding acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideDecelerationTime = number&lt;br /&gt;
                    Time to decelerate from maximum slide speed&lt;br /&gt;
                    Value: Sliding deceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    Object world velocity (World vector)&lt;br /&gt;
                    Value: Object velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityDesired = vector&lt;br /&gt;
                    Desired velocity (World vector)&lt;br /&gt;
                    Value: Desired velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityMax = vector&lt;br /&gt;
                    Object max local velocity (Local vector)&lt;br /&gt;
                    Value: Maximum velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number VerticalThrust = number&lt;br /&gt;
                    Vertical thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Vertical thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AfterburnerActive = boolean&lt;br /&gt;
                    Specifies if the afterburner is active or not&lt;br /&gt;
                    Value: true if afterburner is active false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSpeed()&lt;br /&gt;
                    Gets total speed as of last frame&lt;br /&gt;
                    Returns: Total speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getForwardSpeed()&lt;br /&gt;
                    Gets total speed in the ship&#039;s &#039;forward&#039; direction as of last frame&lt;br /&gt;
                    Returns: Total forward speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isAfterburnerActive()&lt;br /&gt;
                    True if Afterburners are on, false or nil if not&lt;br /&gt;
                    Returns: Detects whether afterburner is active&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isGliding()&lt;br /&gt;
                    True if glide mode is on, false or nil if not&lt;br /&gt;
                    Returns: Detects if ship is gliding&lt;br /&gt;
                     &lt;br /&gt;
===sexpvariable===&lt;br /&gt;
SEXP Variable handle&lt;br /&gt;
&lt;br /&gt;
                enumeration Persistence = enumeration&lt;br /&gt;
                    SEXP Variable persistance, uses SEXPVAR_*_PERSISTENT enumerations&lt;br /&gt;
                    Value: SEXPVAR_*_PERSISTENT enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration Type = enumeration&lt;br /&gt;
                    SEXP Variable type, uses SEXPVAR_TYPE_* enumerations&lt;br /&gt;
                    Value: SEXPVAR_TYPE_* enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Value = number/string&lt;br /&gt;
                    SEXP variable value&lt;br /&gt;
                    Value: SEXP variable contents, or nil if the variable is of an invalid type or the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns SEXP name&lt;br /&gt;
                    Returns: SEXP name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean delete()&lt;br /&gt;
                    Deletes a SEXP Variable&lt;br /&gt;
                    Returns: True if successful, false if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===shields===&lt;br /&gt;
Shields handle&lt;br /&gt;
&lt;br /&gt;
                number [] enumeration/number&lt;br /&gt;
                    Gets or sets shield quadrant strength. Use &amp;quot;SHIELD_*&amp;quot; enumeration or 1-4 for a specific quadrant, or NONE for the entire shield&lt;br /&gt;
                    Returns: Quadrant/shield strength, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedLeft = number&lt;br /&gt;
                    Total shield hitpoints left (for all quadrants combined)&lt;br /&gt;
                    Value: Combined shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedMax = number&lt;br /&gt;
                    Maximum shield hitpoints (for all quadrants combined)&lt;br /&gt;
                    Value: Combined maximum shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===shiptype===&lt;br /&gt;
Ship type handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship type name&lt;br /&gt;
                    Value: Ship type name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===species===&lt;br /&gt;
Species handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Species name&lt;br /&gt;
                    Value: Species name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===team===&lt;br /&gt;
Team handle&lt;br /&gt;
&lt;br /&gt;
                boolean == team, team&lt;br /&gt;
                    Checks whether two teams are the same team&lt;br /&gt;
                    Returns: true if equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Team name&lt;br /&gt;
                    Value: Team name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getColor()&lt;br /&gt;
                    Gets the IFF color of the specified Team&lt;br /&gt;
                    Returns: rgb color for the specified team or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===texture===&lt;br /&gt;
Texture handle&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Auto-deletes texture&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean == texture, texture&lt;br /&gt;
                    Checks if two texture handles refer to the same texture&lt;br /&gt;
                    Returns: True if textures are equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number&lt;br /&gt;
                    Returns texture handle to specified frame number in current texture&#039;s animation.This means that [1] will always return the first frame in an animation, no matter what frame an animation is.You cannot change a texture animation frame.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unload()&lt;br /&gt;
                    Unloads a texture from memory&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns filename for texture&lt;br /&gt;
                    Returns: Filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWidth()&lt;br /&gt;
                    Gets texture width&lt;br /&gt;
                    Returns: Texture width, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getHeight()&lt;br /&gt;
                    Gets texture height&lt;br /&gt;
                    Returns: Texture height, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFPS()&lt;br /&gt;
                    Gets frames-per-second of texture&lt;br /&gt;
                    Returns: Texture FPS, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFramesLeft()&lt;br /&gt;
                    Gets number of frames left, from handle&#039;s position in animation&lt;br /&gt;
                    Returns: Frames left, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===material===&lt;br /&gt;
Texture map, including diffuse, glow, and specular textures&lt;br /&gt;
&lt;br /&gt;
                texture BaseMap = texture&lt;br /&gt;
                    Base texture&lt;br /&gt;
                    Value: Base texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture GlowMap = texture&lt;br /&gt;
                    Glow texture&lt;br /&gt;
                    Value: Glow texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture SpecularMap = texture&lt;br /&gt;
                    Specular texture&lt;br /&gt;
                    Value: Texture handle, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
===weaponclass===&lt;br /&gt;
Weapon class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Returns: Weapon class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Value: Weapon class name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Title = string&lt;br /&gt;
                    Weapon class title&lt;br /&gt;
                    Value: Weapon class title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Weapon class description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechTitle = string&lt;br /&gt;
                    Weapon class tech title&lt;br /&gt;
                    Value: Tech title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechAnimationFilename = string&lt;br /&gt;
                    Weapon class animation filename&lt;br /&gt;
                    Value: Filename, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Weapon class tech description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Weapon class model, or invalid model handle if weaponclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ArmorFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship hull (0-1.0)&lt;br /&gt;
                    Value: Armor factor, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Damage = number&lt;br /&gt;
                    Amount of damage that weapon deals&lt;br /&gt;
                    Value: Damage amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FireWait = number&lt;br /&gt;
                    Weapon fire wait (cooldown time) in seconds&lt;br /&gt;
                    Value: Fire wait time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FreeFlightTime = number&lt;br /&gt;
                    The time the weapon will fly before turing onto its target&lt;br /&gt;
                    Value: Free flight time or emty string if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeMax = number&lt;br /&gt;
                    Life of weapon in seconds&lt;br /&gt;
                    Value: Life of weapon, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Range = number&lt;br /&gt;
                    Range of weapon in meters&lt;br /&gt;
                    Value: Weapon Range, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Weapon mass&lt;br /&gt;
                    Value: Weapon mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShieldFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship shields (0-1.0)&lt;br /&gt;
                    Value: Shield damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SubsystemFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship subsystems (0-1.0)&lt;br /&gt;
                    Value: Subsystem damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TargetLOD = number&lt;br /&gt;
                    LOD used for weapon model in the targeting computer&lt;br /&gt;
                    Value: LOD number, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Speed = number&lt;br /&gt;
                    Weapon max speed, aka $Velocity in weapons.tbl&lt;br /&gt;
                    Value: Weapon speed, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Bomb = boolean&lt;br /&gt;
                    Is weapon class flagged as bomb&lt;br /&gt;
                    Value: New flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWeaponClassIndex()&lt;br /&gt;
                    Gets the index value of the weapon class&lt;br /&gt;
                    Returns: index value of the weapon class&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isLaser()&lt;br /&gt;
                    Return true if the weapon is a laser (this includes balistic primaries)&lt;br /&gt;
                    Returns: true if the weapon is a laser, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMissile()&lt;br /&gt;
                    Return true if the weapon is a missile&lt;br /&gt;
                    Returns: true if the weapon is a missile, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isBeam()&lt;br /&gt;
                    Return true if the weapon is a beam&lt;br /&gt;
                    Returns: true if the weapon is a beam, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===collision info===&lt;br /&gt;
Information about a collision&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Removes the allocated reference of this handle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    The model this collision info is about&lt;br /&gt;
                    Value: The model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionDistance()&lt;br /&gt;
                    The distance to the closest collision point&lt;br /&gt;
                    Returns: distance or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPoint([boolean local])&lt;br /&gt;
                    The collision point of this information (local to the object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision point or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionNormal([boolean local])&lt;br /&gt;
                    The collision normal of this information (local to object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision normal or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects if this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===object===&lt;br /&gt;
Object handle&lt;br /&gt;
&lt;br /&gt;
                boolean == object, object&lt;br /&gt;
                    Checks whether two object handles are for the same object&lt;br /&gt;
                    Returns: True if equal, false if not or a handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of object (if any)&lt;br /&gt;
                    Returns: Object name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Parent = object&lt;br /&gt;
                    Parent of the object. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Parent handle, or invalid handle if object is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Object world position (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastPosition = vector&lt;br /&gt;
                    Object world position as of last frame (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Object world orientation (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation LastOrientation = orientation&lt;br /&gt;
                    Object world orientation as of last frame (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                physics Physics = physics&lt;br /&gt;
                    Physics data used to move ship between frames&lt;br /&gt;
                    Value: Physics data, or invalid physics handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Hitpoints an object has left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shields Shields = shields&lt;br /&gt;
                    Shields&lt;br /&gt;
                    Value: Shields handle, or invalid shields handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSignature()&lt;br /&gt;
                    Gets the object&#039;s unique signature&lt;br /&gt;
                    Returns: Returns the objects unique numeric signature, or -1 if invalid. useful for creating a metadata sytem&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getBreedName()&lt;br /&gt;
                    Gets object type&lt;br /&gt;
                    Returns: Object type name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CollisionGroups = number&lt;br /&gt;
                    Collision group data&lt;br /&gt;
                    Value: Current collision group signature. NOTE: This is a bitfield, NOT a normal number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getfvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current fvec.&lt;br /&gt;
                    Returns: Objects&#039; forward vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getuvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current uvec.&lt;br /&gt;
                    Returns: Objects&#039; up vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getrvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current rvec.&lt;br /&gt;
                    Returns: Objects&#039; rvec, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector, collision info checkRayCollision(vector Start Point, vector End Point, [boolean Local])&lt;br /&gt;
                    Checks the collisions between the polygons of the current object and a ray&lt;br /&gt;
                    Returns: World collision point (local if boolean is set to true) and the specific collsision info, nil if no collisions&lt;br /&gt;
                     &lt;br /&gt;
===asteroid:object===&lt;br /&gt;
Asteroid handle&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Asteroid target object; may be object derivative, such as ship.&lt;br /&gt;
                    Value: Target object, or invalid handle if asteroid handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([ship killer=nil, wvector hitpos=nil])&lt;br /&gt;
                    Kills the asteroid. Set &amp;quot;killer&amp;quot; to designate a specific ship as having been the killer, and &amp;quot;hitpos&amp;quot; to specify the world position of the hit location; if nil, the asteroid center is used.&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
===shipclass===&lt;br /&gt;
Ship class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Returns: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Value: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShortName = string&lt;br /&gt;
                    Ship class short name&lt;br /&gt;
                    Value: Ship short name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TypeString = string&lt;br /&gt;
                    Ship class type string&lt;br /&gt;
                    Value: Type string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManeuverabilityString = string&lt;br /&gt;
                    Ship class maneuverability string&lt;br /&gt;
                    Value: Maneuverability string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorString = string&lt;br /&gt;
                    Ship class armor string&lt;br /&gt;
                    Value: Armor string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManufacturerString = string&lt;br /&gt;
                    Ship class manufacturer&lt;br /&gt;
                    Value: Manufacturer, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Ship class description&lt;br /&gt;
                    Value: Description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Ship class tech description&lt;br /&gt;
                    Value: Tech description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresMax = number&lt;br /&gt;
                    Maximum number of countermeasures the ship can carry&lt;br /&gt;
                    Value: Countermeasure capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Ship class model, or invalid model handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model CockpitModel = model&lt;br /&gt;
                    Model used for first-person cockpit&lt;br /&gt;
                    Value: Cockpit model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Ship class hitpoints&lt;br /&gt;
                    Value: Hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                species Species = Species&lt;br /&gt;
                    Ship class species&lt;br /&gt;
                    Value: Ship class species, or invalid species handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptype Type = shiptype&lt;br /&gt;
                    Ship class type&lt;br /&gt;
                    Value: Ship type, or invalid handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isInTechroom()&lt;br /&gt;
                    Gets whether or not the ship class is available in the techroom&lt;br /&gt;
                    Returns: Whether ship has been revealed in the techroom, false if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel(X1, Y1, X2, Y2, [Rotation %, Pitch %, Bank %, Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel2(X1, Y1, X2, Y2, orientation Orientation=null, [Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isModelLoaded([boolean Load = false])&lt;br /&gt;
                    Checks if the model used for this shipclass is loaded or not and optionally loads the model, which might be a slow operation.&lt;br /&gt;
                    Returns: If the model is loaded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getShipClassIndex()&lt;br /&gt;
                    Gets the index valus of the ship class&lt;br /&gt;
                    Returns: index value of the ship class&lt;br /&gt;
                     &lt;br /&gt;
===debris:object===&lt;br /&gt;
Debris handle&lt;br /&gt;
&lt;br /&gt;
                boolean IsHull = boolean&lt;br /&gt;
                    Whether or not debris is a piece of hull&lt;br /&gt;
                    Value: Whether debris is a hull fragment, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass OriginClass = shipclass&lt;br /&gt;
                    The shipclass of the ship this debris originates from&lt;br /&gt;
                    Value: The shipclass of the ship that created this debris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDebrisRadius()&lt;br /&gt;
                    The radius of this debris piece&lt;br /&gt;
                    Returns: The radius of this debris piece or -1 if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Return if this debris handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===waypoint:object===&lt;br /&gt;
waypoint handle&lt;br /&gt;
&lt;br /&gt;
===waypointlist===&lt;br /&gt;
waypointlist handle&lt;br /&gt;
&lt;br /&gt;
                waypoint [] number Index&lt;br /&gt;
                    Array of waypoints that are part of the waypoint list&lt;br /&gt;
                    Returns: Waypoint, or invalid handle if the index or waypointlist handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of waypoints in the list. Note that the value returned cannot be relied on for more than one frame.&lt;br /&gt;
                    Returns: Number of waypoints in the list, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Name of WaypointList&lt;br /&gt;
                    Value: Waypointlist name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===weaponbank===&lt;br /&gt;
Ship/subystem weapons bank handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass WeaponClass = weaponclass&lt;br /&gt;
                    Class of weapon mounted in the bank&lt;br /&gt;
                    Value: Weapon class, or an invalid weaponclass handle if bank handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoLeft = number&lt;br /&gt;
                    Ammo left for the current bank&lt;br /&gt;
                    Value: Ammo left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoMax = number&lt;br /&gt;
                    Maximum ammo for the current bank&lt;br /&gt;
                    Value: Ammo capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Armed = boolean&lt;br /&gt;
                    Weapon armed status. Does not take linking into account.&lt;br /&gt;
                    Value: True if armed, false if unarmed or handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===weaponbanktype===&lt;br /&gt;
Ship/subsystem weapons bank type handle&lt;br /&gt;
&lt;br /&gt;
                weaponbank [] number Index&lt;br /&gt;
                    Array of weapon banks&lt;br /&gt;
                    Returns: Weapon bank, or invalid handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Linked = boolean&lt;br /&gt;
                    Whether bank is in linked or unlinked fire mode (Primary-only)&lt;br /&gt;
                    Value: Link status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DualFire = boolean&lt;br /&gt;
                    Whether bank is in dual fire mode (Secondary-only)&lt;br /&gt;
                    Value: Dual fire status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of weapons in the mounted bank&lt;br /&gt;
                    Returns: Number of bank weapons, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===subsystem===&lt;br /&gt;
Ship subsystem handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of subsystem&lt;br /&gt;
                    Returns: Subsystem name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSIntensity = number&lt;br /&gt;
                    Subsystem AWACS intensity&lt;br /&gt;
                    Value: AWACS intensity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSRadius = number&lt;br /&gt;
                    Subsystem AWACS radius&lt;br /&gt;
                    Value: AWACS radius, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Orientation of subobject or turret base&lt;br /&gt;
                    Value: Subsystem orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation GunOrientation = orientation&lt;br /&gt;
                    Orientation of turret gun&lt;br /&gt;
                    Value: Gun orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Subsystem hitpoints left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid. Setting a value of 0 will disable it - set a value of -1 or lower to actually blow it up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Subsystem hitpoints max&lt;br /&gt;
                    Value: Max hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Subsystem position with regards to main ship (Local Vector)&lt;br /&gt;
                    Value: Subsystem position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector GunPosition = vector&lt;br /&gt;
                    Subsystem gun position with regards to main ship (Local vector)&lt;br /&gt;
                    Value: Gun position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Subsystem name&lt;br /&gt;
                    Value: Subsystem name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getModelName()&lt;br /&gt;
                    Returns the original name of the subsystem in the model file&lt;br /&gt;
                    Returns: name or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Object targetted by this subsystem. If used to set a new target, AI targeting will be switched off.&lt;br /&gt;
                    Value: Targeted object, or invalid object handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretResets = boolean&lt;br /&gt;
                    Specifies wether this turrets resets after a certain time of inactivity&lt;br /&gt;
                    Value: true if turret resets, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurretResetDelay = number&lt;br /&gt;
                    The time (in milliseconds) after that the turret resets itself&lt;br /&gt;
                    Value: Reset delay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurnRate = number&lt;br /&gt;
                    The turn rate&lt;br /&gt;
                    Value: Turnrate or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretLocked = boolean&lt;br /&gt;
                    Whether the turret is locked. Setting to true locks the turret, setting to false frees it.&lt;br /&gt;
                    Value: True if turret is locked, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number NextFireTimestamp = number&lt;br /&gt;
                    The next time the turret may attempt to fire&lt;br /&gt;
                    Value: Mission time (seconds) or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean targetingOverride(boolean)&lt;br /&gt;
                    If set to true, AI targeting for this turret is switched off. If set to false, the AI will take over again.&lt;br /&gt;
                    Returns: Returns true if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasFired()&lt;br /&gt;
                    Determine if a subsystem has fired&lt;br /&gt;
                    Returns: true if if fired, false if not fired, or nil if invalid. resets fired flag when called.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isTurret()&lt;br /&gt;
                    Determines if this subsystem is a turret&lt;br /&gt;
                    Returns: true if subsystem is turret, false otherwise or nil on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil fireWeapon([Turret weapon index = 1, Flak range = 100])&lt;br /&gt;
                    Fires weapon on turret&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rotateTurret(vector Pos[, boolean reset=false)&lt;br /&gt;
                    Rotates the turret to face Pos or resets the turret to its original state&lt;br /&gt;
                    Returns: true on success false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getTurretHeading()&lt;br /&gt;
                    Returns the turrets forward vector&lt;br /&gt;
                    Returns: Returns a normalized version of the forward vector or null vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getFOVs()&lt;br /&gt;
                    Returns current turrets FOVs&lt;br /&gt;
                    Returns: Standard FOV, maximum barrel elevation, turret base fov.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                matrix getTurretMatrix()&lt;br /&gt;
                    Returns current subsystems turret matrix&lt;br /&gt;
                    Returns: Turret matrix.&lt;br /&gt;
                     &lt;br /&gt;
===shiptextures===&lt;br /&gt;
Ship textures handle&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship textures&lt;br /&gt;
                    Returns: Texture, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===ship:object===&lt;br /&gt;
Ship handle&lt;br /&gt;
&lt;br /&gt;
                subsystem [] string Name/number Index&lt;br /&gt;
                    Array of ship subsystems&lt;br /&gt;
                    Returns: Subsystem handle, or invalid subsystem handle if index or ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of subsystems on ship&lt;br /&gt;
                    Returns: Subsystem number, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShieldArmorClass = string&lt;br /&gt;
                    Current Armor class of the ships&#039; shield&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship name&lt;br /&gt;
                    Value: Ship name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelLeft = number&lt;br /&gt;
                    Afterburner fuel left&lt;br /&gt;
                    Value: Afterburner fuel left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner fuel capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass Class = shipclass&lt;br /&gt;
                    Ship class&lt;br /&gt;
                    Value: Ship class, or invalid shipclass handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresLeft = number&lt;br /&gt;
                    Number of countermeasures left&lt;br /&gt;
                    Value: Countermeasures left, or 0 if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponclass CountermeasureClass = weaponclass&lt;br /&gt;
                    Weapon class mounted on this ship&#039;s countermeasure point&lt;br /&gt;
                    Value: Countermeasure hardpoint weapon class, or invalid weaponclass handle if no countermeasure class or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Total hitpoints&lt;br /&gt;
                    Value: Ship maximum hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyLeft = number&lt;br /&gt;
                    Current weapon energy reserves&lt;br /&gt;
                    Value: Ship current weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyMax = number&lt;br /&gt;
                    Maximum weapon energy&lt;br /&gt;
                    Value: Ship maximum weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean PrimaryTriggerDown = boolean&lt;br /&gt;
                    Determines if primary trigger is pressed or not&lt;br /&gt;
                    Value: True if pressed, false if not, nil if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype TertiaryBanks = weaponbanktype&lt;br /&gt;
                    Array of tertiary weapon banks&lt;br /&gt;
                    Value: Tertiary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of ship. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Target object, or invalid object handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Target subsystem of ship.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Ship&#039;s team&lt;br /&gt;
                    Value: Ship team, or invalid team handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptextures Textures = shiptextures&lt;br /&gt;
                    Gets ship textures&lt;br /&gt;
                    Value: Ship textures, or invalid shiptextures handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean FlagAffectedByGravity = boolean&lt;br /&gt;
                    Checks for the &amp;quot;affected-by-gravity&amp;quot; flag&lt;br /&gt;
                    Value: True if flag is set, false if flag is not set and nil on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Disabled = boolean&lt;br /&gt;
                    The disabled state of this ship&lt;br /&gt;
                    Value: true if ship is diabled, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([object Killer])&lt;br /&gt;
                    Kills the ship. Set &amp;quot;Killer&amp;quot; to the ship you are killing to self-destruct&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean addShipEffect(string name, int duration (in milliseconds))&lt;br /&gt;
                    Activates an effect for this ship. Effect names are defined in Post_processing.tbl, and need to be implemented in the main shader. This functions analogous to the ship-effect sexp. NOTE: only one effect can be active at any time, adding new effects will override effects already in progress. &lt;br /&gt;
                    Returns: Returns true if the effect was successfully added, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number hasShipExploded()&lt;br /&gt;
                    Checks if the ship explosion event has already happened&lt;br /&gt;
                    Returns: Returns 1 if first explosion timestamp is passed, 2 if second is passed, 0 otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fireCountermeasure()&lt;br /&gt;
                    Launches a countermeasure from the ship&lt;br /&gt;
                    Returns: Whether countermeasure was launched or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number firePrimary()&lt;br /&gt;
                    Fires ship primary bank(s)&lt;br /&gt;
                    Returns: Number of primary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number fireSecondary()&lt;br /&gt;
                    Fires ship secondary bank(s)&lt;br /&gt;
                    Returns: Number of secondary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getAnimationDoneTime(number Type, number Subtype)&lt;br /&gt;
                    Gets time that animation will be done&lt;br /&gt;
                    Returns: Time (seconds), or 0 if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean clearOrders()&lt;br /&gt;
                    Clears a ship&#039;s orders list&lt;br /&gt;
                    Returns: True if successful, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean giveOrder(enumeration Order, [object Target=nil, subsystem TargetSubsystem=nil, number Priority=1.0])&lt;br /&gt;
                    Uses the goal code to execute orders&lt;br /&gt;
                    Returns: True if order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean doManeuver(number Duration, number Heading, number Pitch, number Bank, boolean Force Rotation, number Vertical, number Horizontal, number Forward, boolean Force Movement)&lt;br /&gt;
                    Sets ship maneuver over the defined time period&lt;br /&gt;
                    Returns: True if maneuver order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean triggerAnimation(string Type, [number Subtype, boolean Forwards])&lt;br /&gt;
                    Triggers an animation. Type is the string name of the animation type, Subtype is the subtype number, such as weapon bank #, and Forwards is boolean.&lt;br /&gt;
                    IMPORTANT: Function is in testing and should not be used with official mod releases&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpIn()&lt;br /&gt;
                    Warps ship in&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpOut()&lt;br /&gt;
                    Warps ship out&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isWarpingIn()&lt;br /&gt;
                    Checks if ship is warping in&lt;br /&gt;
                    Returns: True if the ship is warping in, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getEMP()&lt;br /&gt;
                    Returns the current emp effect strength acting on the object&lt;br /&gt;
                    Returns: Current EMP effect strength or NIL if object is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTimeUntilExplosion()&lt;br /&gt;
                    Returns the time in seconds until the ship explodes&lt;br /&gt;
                    Returns: Time until explosion or -1, if invalid handle or ship isn&#039;t exploding&lt;br /&gt;
                     &lt;br /&gt;
===weapon:object===&lt;br /&gt;
Weapon handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DestroyedByWeapon = boolean&lt;br /&gt;
                    Whether weapon was destroyed by another weapon&lt;br /&gt;
                    Value: True if weapon was destroyed by another weapon, false if weapon was destroyed by another object or if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeLeft = number&lt;br /&gt;
                    Weapon life left (in seconds)&lt;br /&gt;
                    Value: Life left (seconds) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FlakDetonationRange = number&lt;br /&gt;
                    Range at which flak will detonate (meters)&lt;br /&gt;
                    Value: Detonation range (meters) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of weapon. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Weapon target, or invalid object handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentTurret = subsystem&lt;br /&gt;
                    Turret which fired this weapon.&lt;br /&gt;
                    Value: Turret subsystem handle, or an invalid handle if the weapon not fired from a turret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object HomingObject = object&lt;br /&gt;
                    Object that weapon will home in on. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;&lt;br /&gt;
                    Value: Object that weapon is homing in on, or an invalid object handle if weapon is not homing or the weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector HomingPosition = vector&lt;br /&gt;
                    Position that weapon will home in on (World vector)&lt;br /&gt;
                    Value: Homing point, or null vector if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem HomingSubsystem = subsystem&lt;br /&gt;
                    Subsystem that weapon will home in on.&lt;br /&gt;
                    Value: Homing subsystem, or invalid subsystem handle if weapon is not homing or weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Weapon&#039;s team&lt;br /&gt;
                    Value: Weapon team, or invalid team handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isArmed([boolean Hit target])&lt;br /&gt;
                    Checks if the weapon is armed.&lt;br /&gt;
                    Returns: boolean value of the weapon arming status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation()&lt;br /&gt;
                    Returns the collision information for this weapon&lt;br /&gt;
                    Returns: The collision information or invalid handle if none&lt;br /&gt;
                     &lt;br /&gt;
===beam:object===&lt;br /&gt;
Beam handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastShot = vector&lt;br /&gt;
                    End point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastStart = vector&lt;br /&gt;
                    Start point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of beam. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Beam target, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is targeting.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object ParentShip = object&lt;br /&gt;
                    Parent of the beam.&lt;br /&gt;
                    Value: Beam parent, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is fired from.&lt;br /&gt;
                    Value: Parent subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionCount()&lt;br /&gt;
                    Get the number of collisions in frame.&lt;br /&gt;
                    Returns: Number of beam collisions&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPosition(number)&lt;br /&gt;
                    Get the position of the defined collision.&lt;br /&gt;
                    Returns: World vector&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation(number)&lt;br /&gt;
                    Get the collision information of the specified collision&lt;br /&gt;
                    Returns: handle to information or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object getCollisionObject(number)&lt;br /&gt;
                    Get the target of the defined collision.&lt;br /&gt;
                    Returns: Object the beam collided with&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isExitCollision(number)&lt;br /&gt;
                    Checks if the defined collision was exit collision.&lt;br /&gt;
                    Returns: True if the collision was exit collision, false if entry, nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getStartDirectionInfo()&lt;br /&gt;
                    Gets the start information about the direction. The vector is a normalized vector from LastStart showing the start direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getEndDirectionInfo()&lt;br /&gt;
                    Gets the end information about the direction. The vector is a normalized vector from LastStart showing the end direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
===wing===&lt;br /&gt;
Wing handle&lt;br /&gt;
&lt;br /&gt;
                ship [] number Index&lt;br /&gt;
                    Array of ships in the wing&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invawing handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of wings in mission&lt;br /&gt;
                    Returns: Number of wings in mission&lt;br /&gt;
                     &lt;br /&gt;
===player===&lt;br /&gt;
Player handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getName()&lt;br /&gt;
                    Gets current player name&lt;br /&gt;
                    Returns: Player name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCampaignFilename()&lt;br /&gt;
                    Gets current player campaign filename&lt;br /&gt;
                    Returns: Campaign name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getImageFilename()&lt;br /&gt;
                    Gets current player image filename&lt;br /&gt;
                    Returns: Player image filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMainHall()&lt;br /&gt;
                    Gets player&#039;s main hall number&lt;br /&gt;
                    Returns: Main hall index, or 1 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getSquadronName()&lt;br /&gt;
                    Gets current player squad name&lt;br /&gt;
                    Returns: Squadron name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===camera===&lt;br /&gt;
Camera handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Camera name&lt;br /&gt;
                    Returns: Camera name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    New camera name&lt;br /&gt;
                    Value: Camera name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FOV = number&lt;br /&gt;
                    New camera FOV (in radians)&lt;br /&gt;
                    Value: Camera FOV (in radians)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    New camera orientation&lt;br /&gt;
                    Value: Camera orientation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    New camera position&lt;br /&gt;
                    Value: Camera position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Self = object&lt;br /&gt;
                    New mount object&lt;br /&gt;
                    Value: Camera object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem SelfSubsystem = subsystem&lt;br /&gt;
                    New mount object subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is mounted on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    New target object&lt;br /&gt;
                    Value: Camera target object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    New target subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is pointed at&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setFOV([number FOV, number Zoom Time, number Zoom Acceleration Time, number Zoom deceleration Time])&lt;br /&gt;
                    Sets camera FOV&lt;br /&gt;
                    FOV is the final field of view, in radians, of the camera.&lt;br /&gt;
                    Zoom Time is the total time to take zooming in or out.&lt;br /&gt;
                    Acceleration Time is the total time it should take the camera to get up to full zoom speed.&lt;br /&gt;
                    Deceleration Time is the total time it should take the camera to slow down from full zoom speed.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setOrientation([world orientation Orientation, number Rotation Time, number Acceleration Time, number Deceleration time])&lt;br /&gt;
                    Sets camera orientation and velocity data.&lt;br /&gt;
                    Orientation is the final orientation for the camera, after it has finished moving. If not specified, the camera will simply stop at its current orientation.&lt;br /&gt;
                    Rotation time is how long total, including acceleration, the camera should take to rotate. If it is not specified, the camera will jump to the specified orientation.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition([wvector Position, number Translation Time, number Acceleration Time, number Deceleration Time])&lt;br /&gt;
                    Sets camera position and velocity data.&lt;br /&gt;
                    Position is the final position for the camera. If not specified, the camera will simply stop at its current position.&lt;br /&gt;
                    Translation time is how long total, including acceleration, the camera should take to move. If it is not specified, the camera will jump to the specified position.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
===soundentry===&lt;br /&gt;
sounds.tbl table entry handle&lt;br /&gt;
&lt;br /&gt;
                number DefaultVolume = number&lt;br /&gt;
                    The default volume of this game sound&lt;br /&gt;
                    Value: Volume in the range from 1 to 0 or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns the filename of this sound&lt;br /&gt;
                    Returns: filename or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDuration()&lt;br /&gt;
                    Gives the length of the sound in seconds.&lt;br /&gt;
                    Returns: the length, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number get3DValues(vector Postion[, number radius=0.0])&lt;br /&gt;
                    Computes the volume and the panning of the sound when it would be played from the specified position.&lt;br /&gt;
                    If range is given then the volume will diminish when the listener is withing that distance to the source.&lt;br /&gt;
                    The position of the listener is always the the current viewing position.&lt;br /&gt;
                    Returns: The volume and the panning, in that sequence, or both -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===sound===&lt;br /&gt;
sound instance handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of sound, from 100 to 100000&lt;br /&gt;
                    Value: Pitch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getRemainingTime()&lt;br /&gt;
                    The remaining time of this sound handle&lt;br /&gt;
                    Returns: Remaining time, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setVolume(number)&lt;br /&gt;
                    Sets the volume of this sound instance&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPanning(number)&lt;br /&gt;
                    Sets the panning of this sound. Argument ranges from -1 for left to 1 for right&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition(number[,boolean = true])&lt;br /&gt;
                    Sets the absolute position of the sound. If boolean argument is true then the value is given as a percentage&lt;br /&gt;
                    Returns: true if successfull, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rewind(number)&lt;br /&gt;
                    Rewinds the sound by the given number of seconds&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean skip(number)&lt;br /&gt;
                    Skips the given number of seconds of the sound&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPlaying()&lt;br /&gt;
                    Specifies if this handle is currently playing&lt;br /&gt;
                    Returns: true if playing, false if otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean stop()&lt;br /&gt;
                    Stops the sound of this handle&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===3Dsound:sound===&lt;br /&gt;
3D sound instance handle&lt;br /&gt;
&lt;br /&gt;
                boolean updatePosition(vector Position[, number radius = 0.0])&lt;br /&gt;
                    Updates the given 3D sound with the specified position and an optional range value&lt;br /&gt;
                    Returns: true if succeesed, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===control info===&lt;br /&gt;
control info handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of the player ship&lt;br /&gt;
                    Value: Pitch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Heading = number&lt;br /&gt;
                    Heading of the player ship&lt;br /&gt;
                    Value: Heading&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Bank = number&lt;br /&gt;
                    Bank of the player ship&lt;br /&gt;
                    Value: Bank&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Vertical = number&lt;br /&gt;
                    Vertical control of the player ship&lt;br /&gt;
                    Value: Vertical control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Sideways = number&lt;br /&gt;
                    Sideways control of the player ship&lt;br /&gt;
                    Value: Sideways control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Forward = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardCruise = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number PrimaryCount = number&lt;br /&gt;
                    Number of primary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SecondaryCount = number&lt;br /&gt;
                    Number of secondary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasureCount = number&lt;br /&gt;
                    Number of countermeasures that will launch&lt;br /&gt;
                    Value: Number of countermeasures to launch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearLuaButtonInfo()&lt;br /&gt;
                    Clears the lua button control info&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number getButtonInfo()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number accessButtonInfo(number, number, number, number)&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil useButtonControl(number, string)&lt;br /&gt;
                    Adds the defined button control to lua button control data, if number is -1 it tries to use the string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getButtonControlName(number)&lt;br /&gt;
                    Gives the name of the command corresponding with the given number&lt;br /&gt;
                    Returns: Name of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getButtonControlNumber(string)&lt;br /&gt;
                    Gives the number of the command corresponding with the given string&lt;br /&gt;
                    Returns: Number of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AllButtonPolling = boolean&lt;br /&gt;
                    Toggles the all button polling for lua&lt;br /&gt;
                    Value: If the all button polling is enabled or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number pollAllButtons()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
===particle===&lt;br /&gt;
Handle to a particle&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    The current position of the particle (world vector)&lt;br /&gt;
                    Value: The current position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    The current velocity of the particle (world vector)&lt;br /&gt;
                    Value: The current velocity&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Age = number&lt;br /&gt;
                    The time this particle already lives&lt;br /&gt;
                    Value: The current age or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number MaximumLife = number&lt;br /&gt;
                    The time this particle can live&lt;br /&gt;
                    Value: The maximal life or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    The radius of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TracerLength = number&lt;br /&gt;
                    The tracer legth of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object AttachedObject = object&lt;br /&gt;
                    The object this particle is attached to. If valid the position will be relativ to this object and the velocity will be ignored.&lt;br /&gt;
                    Value: Attached object or invalid object handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false if not&lt;br /&gt;
                     &lt;br /&gt;
==Libraries==&lt;br /&gt;
===Audio (ad)===&lt;br /&gt;
Sound/Music Library&lt;br /&gt;
&lt;br /&gt;
                soundentry getSoundentry(string/number)&lt;br /&gt;
                    Return a sound entry matching the specified index or name. If you are using a number then the first valid index is 1&lt;br /&gt;
                    Returns: soundentry or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playSound(soundentry)&lt;br /&gt;
                    Plays the specified sound entry handle&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playLoopingSound(soundentry)&lt;br /&gt;
                    Plays the specified sound as a looping sound&lt;br /&gt;
                    Returns: A handle to the playing sound or invalid handle if playback failed&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                3Dsound play3DSound(soundentry[, vector source[, vector listener]])&lt;br /&gt;
                    Plays the specified sound entry handle. Source if by default 0, 0, 0 and listener is by default the current viewposition&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playGameSound(Sound index, [Panning (-1.0 left to 1.0 right), Volume %, Priority 0-3, Voice Message?])&lt;br /&gt;
                    Plays a sound from #Game Sounds in sounds.tbl. A priority of 0 indicates that the song must play; 1-3 will specify the maximum number of that sound that can be played&lt;br /&gt;
                    Returns: True if sound was played, false if not (Replaced with a sound instance object in the future)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playInterfaceSound(Sound index)&lt;br /&gt;
                    Plays a sound from #Interface Sounds in sounds.tbl&lt;br /&gt;
                    Returns: True if sound was played, false if not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number playMusic(string Filename, [float volume = 1.0, bool looping = true])&lt;br /&gt;
                    Plays a music file using FS2Open&#039;s builtin music system. Volume should be in the 0.0 - 1.0 range, and is capped at 1.0. Files passed to this function are looped by default.&lt;br /&gt;
                    Returns: Audiohandle of the created audiostream, or -1 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil stopMusic(int audiohandle, [bool fade = false])&lt;br /&gt;
                    Stops a playing music file, provided audiohandle is valid&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Base (ba)===&lt;br /&gt;
Base FreeSpace 2 functions&lt;br /&gt;
&lt;br /&gt;
                nil print(string Message)&lt;br /&gt;
                    Prints a string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil warning(string Message)&lt;br /&gt;
                    Displays a FreeSpace warning (debug build-only) message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil error(string Message)&lt;br /&gt;
                    Displays a FreeSpace error message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation createOrientation([p/r1c1, b/r1c2, h/r1c3, r2c1, r2c2, r2c3, r3c1, r3c2, r3c3])&lt;br /&gt;
                    Given 0, 3, or 9 arguments, creates an orientation object with that orientation.&lt;br /&gt;
                    Returns: New orientation object, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector createVector([x, y, z])&lt;br /&gt;
                    Creates a vector object&lt;br /&gt;
                    Returns: Vector object&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFrametime([Do not adjust for time compression (Boolean)])&lt;br /&gt;
                    Gets how long this frame is calculated to take. Use it to for animations, physics, etc to make incremental changes.&lt;br /&gt;
                    Returns: Frame time (seconds)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                state getCurrentGameState([Depth (number)])&lt;br /&gt;
                    Gets current FreeSpace state; if a depth is specified, the state at that depth is returned. (IE at the in-game options game, a depth of 1 would give you the game state, while the function defaults to 0, which would be the options screen.&lt;br /&gt;
                    Returns: Current game state at specified depth, or invalid handle if no game state is active yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCurrentMPStatus(NIL)&lt;br /&gt;
                    Gets this computers current MP status&lt;br /&gt;
                    Returns: Current MP status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setControlMode(NIL or enumeration LE_*_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setButtonControlMode(NIL or enumeration LE_*_BUTTON_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                control info getControlInfo()&lt;br /&gt;
                    Gets the control info handle.&lt;br /&gt;
                    Returns: control info handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean postGameEvent(gameevent Event)&lt;br /&gt;
                    Sets current game event. Note that you can crash FreeSpace 2 by posting an event at an improper time, so test extensively if you use it.&lt;br /&gt;
                    Returns: True if event was posted, false if passed event was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gameevent GameEvents[] number Index/string Name&lt;br /&gt;
                    Array of game events&lt;br /&gt;
                    Returns: Game event, or invalid gameevent handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events&lt;br /&gt;
                        Returns: Number of events&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gamestate GameStates[] number Index/string Name&lt;br /&gt;
                    Array of game states&lt;br /&gt;
                    Returns: Game state, or invalid gamestate handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of states&lt;br /&gt;
                        Returns: Number of states&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CFile (cf)===&lt;br /&gt;
CFile FS2 filesystem access&lt;br /&gt;
&lt;br /&gt;
                boolean deleteFile(string Filename, string Path)&lt;br /&gt;
                    Deletes given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if deleted, false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fileExists(string Filename, [string Path = &amp;quot;&amp;quot;, boolean CheckVPs = false])&lt;br /&gt;
                    Checks if a file exists. Use a blank string for path for any directory, or a slash for the root directory.&lt;br /&gt;
                    Returns: True if file exists, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openFile(string Filename, [string Mode=&amp;quot;r&amp;quot;, string Path = &amp;quot;&amp;quot;])&lt;br /&gt;
                    Opens a file. &#039;Mode&#039; uses standard C fopen arguments. Use a blank string for path for any directory, or a slash for the root directory.Be EXTREMELY CAREFUL when using this function, as you may PERMANENTLY delete any file by accident&lt;br /&gt;
                    Returns: File handle, or invalid file handle if the specified file couldn&#039;t be opened&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openTempFile()&lt;br /&gt;
                    Opens a temp file that is automatically deleted when closed&lt;br /&gt;
                    Returns: File handle, or invalid file handle if tempfile couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renameFile(string CurrentFilename, string NewFilename, string Path)&lt;br /&gt;
                    Renames given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if file was renamed, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Controls (io)===&lt;br /&gt;
Controls library&lt;br /&gt;
&lt;br /&gt;
                number getMouseX()&lt;br /&gt;
                    Gets Mouse X pos&lt;br /&gt;
                    Returns: Mouse x position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMouseY()&lt;br /&gt;
                    Gets Mouse Y pos&lt;br /&gt;
                    Returns: Mouse y position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMouseButtonDown({MOUSE_*_BUTTON enumeration}, [..., ...])&lt;br /&gt;
                    Returns whether the specified mouse buttons are up or down&lt;br /&gt;
                    Returns: Whether specified mouse buttons are down, or false if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorImage(Image filename, [LOCK or UNLOCK])&lt;br /&gt;
                    Sets mouse cursor image, and allows you to lock/unlock the image. (A locked cursor may only be changed with the unlock parameter)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorHidden(True to hide mouse, false to show it)&lt;br /&gt;
                    Shows or hides mouse cursor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean forceMousePosition(number, number (coordinates))&lt;br /&gt;
                    function to force mouse position&lt;br /&gt;
                    Returns: if the operation succeeded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean MouseControlStatus = boolean&lt;br /&gt;
                    Gets and sets the retail mouse control status&lt;br /&gt;
                    Value: if the retail mouse is on or off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean updateTrackIR()&lt;br /&gt;
                    Updates Tracking Data. Call before using get functions&lt;br /&gt;
                    Returns: Checks if trackir is available and updates variables, returns true if successful, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRPitch()&lt;br /&gt;
                    Gets pitch axis from last update&lt;br /&gt;
                    Returns: Pitch value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRYaw()&lt;br /&gt;
                    Gets yaw axis from last update&lt;br /&gt;
                    Returns: Yaw value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRRoll()&lt;br /&gt;
                    Gets roll axis from last update&lt;br /&gt;
                    Returns: Roll value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRX()&lt;br /&gt;
                    Gets x position from last update&lt;br /&gt;
                    Returns: X value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRY()&lt;br /&gt;
                    Gets y position from last update&lt;br /&gt;
                    Returns: Y value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRZ()&lt;br /&gt;
                    Gets z position from last update&lt;br /&gt;
                    Returns: Z value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HUD (hu)===&lt;br /&gt;
HUD library&lt;br /&gt;
&lt;br /&gt;
                boolean HUDDrawn = boolean&lt;br /&gt;
                    Current HUD draw status&lt;br /&gt;
                    Value: If the HUD is drawn or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setHUDGaugeColor(number (index number of the gauge), [number red, number green, number blue, number alpha])&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: If the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number, number getHUDGaugeColor(number (index number of the gauge))&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: Red, green, blue, and alpha of the gauge&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                HudGauge getHUDGaugeHandle(string Name)&lt;br /&gt;
                    Returns a handle to a specified HUD gauge&lt;br /&gt;
                    Returns: HUD Gauge handle, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Graphics (gr)===&lt;br /&gt;
Graphics Library&lt;br /&gt;
&lt;br /&gt;
                camera Cameras[] number Index/string Name&lt;br /&gt;
                    Gets camera&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of cameras&lt;br /&gt;
                        Returns: Number of cameras&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font Fonts[] number Index/string Filename&lt;br /&gt;
                    Array of loaded fonts&lt;br /&gt;
                    Returns: Font handle, or invalid font handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of loaded fonts&lt;br /&gt;
                        Returns: Number of loaded fonts&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font CurrentFont = font&lt;br /&gt;
                    Current font&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration CurrentOpacityType = enumeration&lt;br /&gt;
                    Current alpha blending type; uses ALPHABLEND_* enumerations&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture CurrentRenderTarget = texture&lt;br /&gt;
                    Current rendering target&lt;br /&gt;
                    Value: Current rendering target, or invalid texture handle if screen is render target&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearScreen([number Red, number green, number blue, number alpha])&lt;br /&gt;
                    Clears the screen to black, or the color specified.&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                camera createCamera(string Name, [wvector Position, orientation Orientation])&lt;br /&gt;
                    Creates a new camera using the specified position and orientation (World)&lt;br /&gt;
                    Returns: Camera handle, or invalid camera handle if camera couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenWidth()&lt;br /&gt;
                    Gets screen width&lt;br /&gt;
                    Returns: Width in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenHeight()&lt;br /&gt;
                    Gets screen height&lt;br /&gt;
                    Returns: Height in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getVectorFromCoords([number X=center, number Y=center, number Depth, boolean normalize = false])&lt;br /&gt;
                    Returns a vector through screen coordinates x and y. If depth is specified, vector is extended to Depth units into spaceIf normalize is true, vector will be normalized.&lt;br /&gt;
                    Returns: Vector, or zero vector on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setTarget([texture Texture])&lt;br /&gt;
                    If texture is specified, sets current rendering surface to a texture.Otherwise, sets rendering surface back to screen.&lt;br /&gt;
                    Returns: True if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setCamera([camera handle Camera])&lt;br /&gt;
                    Sets current camera, or resets camera if none specified&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setColor(number Red, number Green, number Blue, [number Alpha])&lt;br /&gt;
                    Sets 2D drawing color; each color number should be from 0 (darkest) to 255 (brightest)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCircle(number Radius, number X, number Y)&lt;br /&gt;
                    Draws a circle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCurve(number X, number Y, number Radius)&lt;br /&gt;
                    Draws a curve&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawGradientLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with the CurrentColor that steadily fades out&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPixel(number X, number Y)&lt;br /&gt;
                    Sets pixel to CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPolygon(texture Texture, [vector Position={0,0,0}, orientation Orientation=null, number Width=1.0, number Height=1.0])&lt;br /&gt;
                    Draws a polygon&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawRectangle(number X1, number Y1, number X2, number Y2, [boolean Filled=true])&lt;br /&gt;
                    Draws a rectangle with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawSphere([number Radius = 1.0, vector Position])&lt;br /&gt;
                    Draws a sphere with radius Radius at world vector Position&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModel(model, position, orientation)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, may not work properly in all scripting hooks.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModelOOR(model Model, vector Position, matrix Orientation, integer Flags)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, designer to operate properly only in On Object Render hook.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number,number,number,number drawTargetingBrackets(object Object, [boolean draw=true, int padding=5])&lt;br /&gt;
                    Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.&lt;br /&gt;
                    Returns: Left, top, right, and bottom positions of the brackets, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number drawString(string Message, [number X1, number Y1, number X2, number Y2])&lt;br /&gt;
                    Draws a string. Use x1/y1 to control position, x2/y2 to limit textbox size.Text will automatically move onto new lines, if x2/y2 is specified.Additionally, calling drawString with only a string argument will automaticallydraw that string below the previously drawn string (or 0,0 if no stringshave been drawn yet&lt;br /&gt;
                    Returns: Number of lines drawn, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getStringWidth(string String)&lt;br /&gt;
                    Gets string width&lt;br /&gt;
                    Returns: String width, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture createTexture([number Width=512, number Height=512, enumeration Type=TEXTURE_DYNAMIC])&lt;br /&gt;
                    Creates a texture for rendering to.Types are TEXTURE_STATIC - for infrequent rendering - and TEXTURE_DYNAMIC - for frequent rendering.&lt;br /&gt;
                    Returns: New texture handle, or invalid texture handle if texture couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture loadTexture(string Filename, [boolean LoadIfAnimation, boolean NoDropFrames])&lt;br /&gt;
                    Gets a handle to a texture. If second argument is set to true, animations will also be loaded.If third argument is set to true, every other animation frame will not be loaded if system has less than 48 MB memory.&lt;br /&gt;
                    IMPORTANT: Textures will not be unload themselves unless you explicitly tell them to do so.When you are done with a texture, call the Unload() function to free up memory.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if texture couldn&#039;t be loaded&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawImage(string Filename/texture Texture, [number X1=0, Y1=0, number X2, number Y2, number UVX1 = 0.0, number UVY1 = 0.0, number UVX2=1.0, number UVY2=1.0, number alpha=1.0])&lt;br /&gt;
                    Draws an image or texture. Any image extension passed will be ignored.The UV variables specify the UV value for each corner of the image. In UV coordinates, (0,0) is the top left of the image; (1,1) is the lower right.&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawMonochromeImage(string Filename/texture Texture, number X1, number Y1, [number X2, number Y2, number alpha=1.0])&lt;br /&gt;
                    Draws a monochrome image using the current color&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageWidth(string Filename)&lt;br /&gt;
                    Gets image width&lt;br /&gt;
                    Returns: Image width, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageHeight(Image name)&lt;br /&gt;
                    Gets image height&lt;br /&gt;
                    Returns: Image height, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil flashScreen(number Red, number Green, number Blue)&lt;br /&gt;
                    Flashes the screen&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model loadModel(string Filename)&lt;br /&gt;
                    Loads the model - will not setup subsystem data, DO NOT USE FOR LOADING SHIP MODELS&lt;br /&gt;
                    Returns: Handle to a model&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasViewmode(enumeration)&lt;br /&gt;
                    Specifies if the current viemode has the specified flag, see VM_* enumeration&lt;br /&gt;
                    Returns: true if flag is present, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HookVariables (hv)===&lt;br /&gt;
Hook variables repository&lt;br /&gt;
&lt;br /&gt;
                string Globals[] number Index&lt;br /&gt;
                    Array of current HookVariable names&lt;br /&gt;
                    Returns: Hookvariable name, or empty string if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of HookVariables&lt;br /&gt;
                        Returns: Number of HookVariables&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mission (mn)===&lt;br /&gt;
Mission library&lt;br /&gt;
&lt;br /&gt;
                object getObjectFromSignature(number Signature)&lt;br /&gt;
                    Gets a handle of an object from its signature&lt;br /&gt;
                    Returns: Handle of object with signaure, invalid handle if signature is not in use&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean evaluateSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean runSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                asteroid Asteroids[] number Index&lt;br /&gt;
                    Gets asteroid&lt;br /&gt;
                    Returns: Asteroid handle, or invalid handle if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of asteroids in mission. Note that the value returned is only good until an asteroid is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of asteroids in the mission, or 0 if asteroids are not enabled&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                debris Debris[] number Index&lt;br /&gt;
                    Array of debris in the current mission&lt;br /&gt;
                    Returns: Debris handle, or invalid debris handle if index wasn&#039;t valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of debris pieces in the mission. Note that the value returned is only good until a piece of debris is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Current number of debris particles&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship EscortShips[] number Index&lt;br /&gt;
                    Gets escort ship at specified index on escort list&lt;br /&gt;
                    Returns: Specified ship, or invalid ship handle if invalid index&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of escort ships&lt;br /&gt;
                        Returns: Current number of escort ships&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                event Events[] number Index/string Name&lt;br /&gt;
                    Indexes events list&lt;br /&gt;
                    Returns: Event handle, or invalid event handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events in mission&lt;br /&gt;
                        Returns: Number of events in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sexpvariable SEXPVariables[] number Index/string Name&lt;br /&gt;
                    Array of SEXP variables. Note that you can set a sexp variable using the array, eg &#039;SEXPVariables[1] = &amp;quot;newvalue&amp;quot;&#039;&lt;br /&gt;
                    Returns: Handle to SEXP variable, or invalid sexpvariable handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of SEXP variables&lt;br /&gt;
                        Returns: Counts number of loaded SEXP Variables. May be slow.&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship Ships[] number Index/string Name&lt;br /&gt;
                    Gets ship&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ships in the mission. This function is somewhat slow, and should be set to a variable for use in looping situations. Note that the value returned is only good until a ship is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of ships in the mission, or 0 if ships haven&#039;t been initialized yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint Waypoints[] number Index&lt;br /&gt;
                    Array of waypoints in the current mission&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of waypoints in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoints in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypointlist WaypointLists[] number Index/string WaypointListName&lt;br /&gt;
                    Array of waypoint lists&lt;br /&gt;
                    Returns: Gets waypointlist handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of waypoint lists in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoint lists in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon Weapons[] number Index&lt;br /&gt;
                    Gets handle to a weapon object in the mission.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of weapon objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                beam Beams[] number Index&lt;br /&gt;
                    Gets handle to a beam object in the mission.&lt;br /&gt;
                    Returns: Beam handle, or invalid beam handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of beam objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of beam objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                wing Wings[] number Index/string WingName&lt;br /&gt;
                    Wings in the mission&lt;br /&gt;
                    Returns: Wing handle, or invalid wing handle if index or name was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of wings in mission&lt;br /&gt;
                        Returns: Number of wings in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship createShip([string Name, shipclass Class=Shipclass[1], orientation Orientation=null, vector Position={0,0,0}])&lt;br /&gt;
                    Creates a ship and returns a handle to it using the specified name, class, world orientation, and world position&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if ship couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint createWaypoint([vector Position, waypointlist List])&lt;br /&gt;
                    Creates a waypoint&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if waypoint couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon createWeapon([weaponclass Class=WeaponClass[1], orientation Orientation=null, world vector Position={0,0,0}, object Parent = nil, number Group = -1)&lt;br /&gt;
                    Creates a weapon and returns a handle to it. &#039;Group&#039; is used for lighting grouping purposes; for example, quad lasers would only need to act as one light source.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if weapon couldn&#039;t be created.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getMissionFilename()&lt;br /&gt;
                    Gets mission filename&lt;br /&gt;
                    Returns: Mission filename, or empty string if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean startMission([Filename or MISSION_* enumeration, Briefing = true])&lt;br /&gt;
                    Starts the defined mission&lt;br /&gt;
                    Returns: True, or false if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMissionTime()&lt;br /&gt;
                    Game time in seconds since the mission was started; is affected by time compression&lt;br /&gt;
                    Returns: Mission time (seconds), or 0 if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean loadMission(Mission name)&lt;br /&gt;
                    Loads a mission&lt;br /&gt;
                    Returns: True if mission was loaded, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unloadMission()&lt;br /&gt;
                    Stops the current mission and unloads it&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil simulateFrame()&lt;br /&gt;
                    Simulates mission frame&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil renderFrame()&lt;br /&gt;
                    Renders mission frame, but does not move anything&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BitOps (bit)===&lt;br /&gt;
Bitwise Operations library&lt;br /&gt;
&lt;br /&gt;
                number AND(number, number)&lt;br /&gt;
                    Values for which bitwise boolean AND operation is performed&lt;br /&gt;
                    Returns: Result of the AND operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number OR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean OR operation is performed&lt;br /&gt;
                    Returns: Result of the OR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number XOR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean XOR operation is performed&lt;br /&gt;
                    Returns: Result of the XOR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number toggleBit(number, number (bit))&lt;br /&gt;
                    Toggles the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean checkBit(number, number (bit))&lt;br /&gt;
                    Checks the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Was the bit true of false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number addBit(number, number (bit))&lt;br /&gt;
                    Performs inclusive or (OR) operation on the set bit of the value&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Tables (tb)===&lt;br /&gt;
Tables library&lt;br /&gt;
&lt;br /&gt;
                ship ShipClasses[] number Index/string Name&lt;br /&gt;
                    Array of ship classes&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ship classes&lt;br /&gt;
                        Returns: Number of ship classes, or 0 if ship classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon WeaponClasses[] number Index/string WeaponName&lt;br /&gt;
                    Array of weapon classes&lt;br /&gt;
                    Returns: Weapon class handle, or invalid weaponclass handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon classes&lt;br /&gt;
                        Returns: Number of weapon classes, or 0 if weapon classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing (ts)===&lt;br /&gt;
Experimental or testing stuff&lt;br /&gt;
&lt;br /&gt;
                nil avdTest()&lt;br /&gt;
                    Test the AVD Physics code&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                particle createParticle(vector Position, vector Velocity, number Lifetime, number Radius, enumeration Type, [number Tracer length=-1, boolean Reverse=false, texture Texture=Nil, object Attached Object=Nil])&lt;br /&gt;
                    Creates a particle. Use PARTICLE_* enumerations for type.Reverse reverse animation, if one is specifiedAttached object specifies object that Position will be (and always be) relative to.&lt;br /&gt;
                    Returns: Handle to the created particle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getStack()&lt;br /&gt;
                    Generates an ADE stackdump&lt;br /&gt;
                    Returns: Current Lua stack&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isCurrentPlayerMulti()&lt;br /&gt;
                    Returns whether current player is a multiplayer pilot or not.&lt;br /&gt;
                    Returns: Whether current player is a multiplayer pilot or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPXOEnabled()&lt;br /&gt;
                    Returns whether PXO is currently enabled in the configuration.&lt;br /&gt;
                    Returns: Whether PXO is enabled or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enumerations==&lt;br /&gt;
        ALPHABLEND_FILTER&lt;br /&gt;
        ALPHABLEND_NONE&lt;br /&gt;
        CFILE_TYPE_NORMAL&lt;br /&gt;
        CFILE_TYPE_MEMORY_MAPPED&lt;br /&gt;
        MOUSE_LEFT_BUTTON&lt;br /&gt;
        MOUSE_RIGHT_BUTTON&lt;br /&gt;
        MOUSE_MIDDLE_BUTTON&lt;br /&gt;
        ORDER_ATTACK&lt;br /&gt;
        ORDER_ATTACK_ANY&lt;br /&gt;
        ORDER_DEPART&lt;br /&gt;
        ORDER_DISABLE&lt;br /&gt;
        ORDER_DISARM&lt;br /&gt;
        ORDER_DOCK&lt;br /&gt;
        ORDER_EVADE&lt;br /&gt;
        ORDER_FLY_TO&lt;br /&gt;
        ORDER_FORM_ON_WING&lt;br /&gt;
        ORDER_GUARD&lt;br /&gt;
        ORDER_IGNORE_SHIP&lt;br /&gt;
        ORDER_KEEP_SAFE_DISTANCE&lt;br /&gt;
        ORDER_PLAY_DEAD&lt;br /&gt;
        ORDER_REARM&lt;br /&gt;
        ORDER_STAY_NEAR&lt;br /&gt;
        ORDER_STAY_STILL&lt;br /&gt;
        ORDER_UNDOCK&lt;br /&gt;
        ORDER_WAYPOINTS&lt;br /&gt;
        ORDER_WAYPOINTS_ONCE&lt;br /&gt;
        PARTICLE_DEBUG&lt;br /&gt;
        PARTICLE_BITMAP&lt;br /&gt;
        PARTICLE_FIRE&lt;br /&gt;
        PARTICLE_SMOKE&lt;br /&gt;
        PARTICLE_SMOKE2&lt;br /&gt;
        PARTICLE_PERSISTENT_BITMAP&lt;br /&gt;
        SEXPVAR_CAMPAIGN_PERSISTENT&lt;br /&gt;
        SEXPVAR_NOT_PERSISTENT&lt;br /&gt;
        SEXPVAR_PLAYER_PERSISTENT&lt;br /&gt;
        SEXPVAR_TYPE_NUMBER&lt;br /&gt;
        SEXPVAR_TYPE_STRING&lt;br /&gt;
        TEXTURE_STATIC&lt;br /&gt;
        TEXTURE_DYNAMIC&lt;br /&gt;
        LOCK&lt;br /&gt;
        UNLOCK&lt;br /&gt;
        NONE&lt;br /&gt;
        SHIELD_FRONT&lt;br /&gt;
        SHIELD_LEFT&lt;br /&gt;
        SHIELD_RIGHT&lt;br /&gt;
        SHIELD_BACK&lt;br /&gt;
        MISSION_REPEAT&lt;br /&gt;
        NORMAL_CONTROLS&lt;br /&gt;
        LUA_STEERING_CONTROLS&lt;br /&gt;
        LUA_FULL_CONTROLS&lt;br /&gt;
        NORMAL_BUTTON_CONTROLS&lt;br /&gt;
        LUA_ADDITIVE_BUTTON_CONTROL&lt;br /&gt;
        LUA_OVERRIDE_BUTTON_CONTROL&lt;br /&gt;
        VM_INTERNAL&lt;br /&gt;
        VM_EXTERNAL&lt;br /&gt;
        VM_TRACK&lt;br /&gt;
        VM_DEAD_VIEW&lt;br /&gt;
        VM_CHASE&lt;br /&gt;
        VM_OTHER_SHIP&lt;br /&gt;
        VM_EXTERNAL_CAMERA_LOCKED&lt;br /&gt;
        VM_WARP_CHASE&lt;br /&gt;
        VM_PADLOCK_UP&lt;br /&gt;
        VM_PADLOCK_REAR&lt;br /&gt;
        VM_PADLOCK_LEFT&lt;br /&gt;
        VM_PADLOCK_RIGHT&lt;br /&gt;
        VM_WARPIN_ANCHOR&lt;br /&gt;
        VM_TOPDOWN&lt;br /&gt;
        VM_FREECAMERA&lt;/div&gt;</summary>
		<author><name>Aginor</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38977</id>
		<title>Scripting functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38977"/>
		<updated>2012-07-15T12:03:49Z</updated>

		<summary type="html">&lt;p&gt;Aginor: /* HudGauge */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains all the functions mentioned in the scripting.html file, including their syntax, remarks on their use and common errors modders may encounter when they use them.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Script Output - FSO v3.6.13 (FS2_Open Scripting)&lt;br /&gt;
&lt;br /&gt;
==Conditional Hooks==&lt;br /&gt;
&lt;br /&gt;
===Conditions===&lt;br /&gt;
*State&lt;br /&gt;
*Campaign&lt;br /&gt;
*Mission&lt;br /&gt;
*Object Type&lt;br /&gt;
*Ship&lt;br /&gt;
*Ship class&lt;br /&gt;
*Ship type&lt;br /&gt;
*Weapon class&lt;br /&gt;
*KeyPress&lt;br /&gt;
*Version&lt;br /&gt;
*Application&lt;br /&gt;
**&#039;&#039;Usually: $Application: FS2_Open&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Actions===&lt;br /&gt;
*On Game Init&lt;br /&gt;
*On Splash Screen&lt;br /&gt;
*On State Start&lt;br /&gt;
*On Frame&lt;br /&gt;
*On Key Pressed&lt;br /&gt;
*On Key Released&lt;br /&gt;
*On Mouse Moved&lt;br /&gt;
*On Mouse Pressed&lt;br /&gt;
*On Mouse Released&lt;br /&gt;
*On State End&lt;br /&gt;
*On Mission Start&lt;br /&gt;
*On HUD Draw&lt;br /&gt;
*On Ship Collision&lt;br /&gt;
*On Weapon Collision&lt;br /&gt;
*On Debris Collision&lt;br /&gt;
*On Asteroid Collision&lt;br /&gt;
*On Object Render&lt;br /&gt;
*On Warp In&lt;br /&gt;
*On Warp Out&lt;br /&gt;
*On Death&lt;br /&gt;
*On Mission End&lt;br /&gt;
*On Weapon Delete&lt;br /&gt;
*On Weapon Equipped&lt;br /&gt;
*On Weapon Fired&lt;br /&gt;
*On Weapon Selected&lt;br /&gt;
*On Weapon Deselected&lt;br /&gt;
*On Gameplay Start&lt;br /&gt;
*On Turret Fired&lt;br /&gt;
*On Primary Fire&lt;br /&gt;
*On Secondary Fire&lt;br /&gt;
&lt;br /&gt;
==Types==&lt;br /&gt;
===vector===&lt;br /&gt;
:&#039;&#039;&#039;Vector object&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number [] x,y,z or 1-3&#039;&#039;&lt;br /&gt;
::*Vector component&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Value at index, or 0 if vector handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] + number/vector&#039;&#039;&lt;br /&gt;
::*Adds vector by another vector, or adds all axes by value&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] - number/vector&#039;&#039;&lt;br /&gt;
::*Subtracts vector from another vector, or subtracts all axes by value&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] * number/vector&#039;&#039;&lt;br /&gt;
::*Scales vector object (Multiplies all axes by number), or multiplies each axes by the other vector&#039;s axes.&lt;br /&gt;
::*&#039;&#039;&#039; Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]] / number/vector&#039;&#039;&lt;br /&gt;
::*Scales vector object (Divide all axes by number), or divides each axes by the dividing vector&#039;s axes.&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Final vector, or null vector if error occurs&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string (string)&#039;&#039;&lt;br /&gt;
::*Converts a vector to string with format &amp;quot;(x,y,z)&amp;quot;&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Vector as string, or empty string if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#orientation|orientation]]&#039;&#039; &#039;&#039;&#039;getOrientation()&#039;&#039;&#039;&lt;br /&gt;
::*Returns orientation object representing the direction of the vector. Does not require vector to be normalized.&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Orientation object, or null orientation object if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getMagnitude()&#039;&#039;&#039;&lt;br /&gt;
::*Returns the magnitude of a vector (Total regardless of direction)&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Magnitude of vector, or 0 if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getDistance(&#039;&#039;&#039;&#039;&#039;Vector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Distance&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Returns distance from another vector&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number&#039;&#039; &#039;&#039;&#039;getDotProduct(&#039;&#039;&#039;&#039;&#039;vector OtherVector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Returns dot product of vector object with vector argument&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Dot product, or 0 if a handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;[[Scripting_functions#vector|vector]]&#039;&#039; &#039;&#039;&#039;getCrossProduct(&#039;&#039;&#039;&#039;&#039;vector OtherVector&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
::*Returns cross product of vector object with vector argument&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Cross product, or null vector if a handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;number,number&#039;&#039; &#039;&#039;&#039;getScreenCoords()&#039;&#039;&#039;&lt;br /&gt;
::*Gets screen cordinates of a world vector&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; X (number), Y (number), or false if off-screen&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;vector&#039;&#039; &#039;&#039;&#039;getNormalized()&#039;&#039;&#039;&lt;br /&gt;
::*Returns a normalized version of the vector&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Normalized Vector, or NIL if invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===orientation===&lt;br /&gt;
Orientation matrix object&lt;br /&gt;
&lt;br /&gt;
                number [] p,b,h or 1-9&lt;br /&gt;
                    Orientation component - pitch, bank, heading, or index into 3x3 matrix (1-9)&lt;br /&gt;
                    Returns: Number at the specified index, or 0 if index is invalid.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation * orientation&lt;br /&gt;
                    Multiplies two matrix objects)&lt;br /&gt;
                    Returns: matrix, or empty matrix if unsuccessful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Converts a matrix to a string with format &amp;quot;[r1c1 r2c1 r3c1 | r1c2 r2c2 r3c2| r1c3 r2c3 r3c3]&amp;quot;&lt;br /&gt;
                    Returns: Formatted string or &amp;quot;&lt;br /&gt;
                      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getInterpolated(orientation Final, number Factor)&lt;br /&gt;
                    Returns orientation that has been interpolated to Final by Factor (0.0-1.0)&lt;br /&gt;
                    Returns: Interpolated orientation, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getTranspose()&lt;br /&gt;
                    Returns a transpose version of the specified orientation&lt;br /&gt;
                    Returns: Transpose matrix, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector rotateVector(vector Input)&lt;br /&gt;
                    Returns rotated version of given vector&lt;br /&gt;
                    Returns: Rotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector unrotateVector(vector Input)&lt;br /&gt;
                    Returns unrotated version of given vector&lt;br /&gt;
                    Returns: Unrotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
===enumeration===&lt;br /&gt;
Enumeration object&lt;br /&gt;
&lt;br /&gt;
                enumeration = enumeration&lt;br /&gt;
                    Sets enumeration to specified value (if it is not a global&lt;br /&gt;
                    Returns: enumeration&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns enumeration name&lt;br /&gt;
                    Returns: Enumeration name, or &amp;quot;&amp;quot; if invalid&lt;br /&gt;
                      &lt;br /&gt;
===event===&lt;br /&gt;
Mission event handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Mission event name&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveText = string&lt;br /&gt;
                    Directive text&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveKeypressText = string&lt;br /&gt;
                    Raw directive keypress text, as seen in FRED.&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Interval = number&lt;br /&gt;
                    Time for event to repeat (in seconds)&lt;br /&gt;
                    Value: Repeat time, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ObjectCount = number&lt;br /&gt;
                    Number of objects left for event&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RepeatCount = number&lt;br /&gt;
                    Event repeat count&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Score = number&lt;br /&gt;
                    Event score&lt;br /&gt;
                    Value: Event score, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===file===&lt;br /&gt;
File handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil close()&lt;br /&gt;
                    Instantly closes file and invalidates all file handles&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean flush()&lt;br /&gt;
                    Flushes file buffer to disk.&lt;br /&gt;
                    Returns: True for success, false on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getPath()&lt;br /&gt;
                    Determines path of the given file&lt;br /&gt;
                    Returns: Path string of the file handle, or an empty string if it doesn&#039;t have one, or the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number or string, ... read(number or string, ...)&lt;br /&gt;
                    Reads part of or all of a file, depending on arguments passed. Based on basic Lua file:read function.Returns nil when the end of the file is reached.&lt;br /&gt;
&lt;br /&gt;
                        * &amp;quot;*n&amp;quot; - Reads a number.&lt;br /&gt;
                        * &amp;quot;*a&amp;quot; - Reads the rest of the file and returns it as a string.&lt;br /&gt;
                        * &amp;quot;*l&amp;quot; - Reads a line. Skips the end of line markers.&lt;br /&gt;
                        * (number) - Reads given number of characters, then returns them as a string.&lt;br /&gt;
&lt;br /&gt;
                    Returns: Requested data, or nil if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number seek([string Whence=&amp;quot;cur&amp;quot;, number Offset=0])&lt;br /&gt;
                  # Changes position of file, or gets location.Whence can be:&amp;quot;set&amp;quot; - File start.&lt;br /&gt;
                  # &amp;quot;cur&amp;quot; - Current position in file.&lt;br /&gt;
                  # &amp;quot;end&amp;quot; - File end.&lt;br /&gt;
                    Returns: new offset, or false or nil on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number write(string or number, ...)&lt;br /&gt;
                    Writes a series of Lua strings or numbers to the current file.&lt;br /&gt;
                    Returns: Number of items successfully written.&lt;br /&gt;
                     &lt;br /&gt;
===font===&lt;br /&gt;
font handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Filename of font&lt;br /&gt;
                    Returns: Font filename, or an empty string if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Filename of font (including extension)&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Height = number&lt;br /&gt;
                    Height of font (in pixels)&lt;br /&gt;
                    Value: Font height, or 0 if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
===gameevent===&lt;br /&gt;
Game event&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Returns: Game event name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Value: Game event name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===gamestate===&lt;br /&gt;
Game state&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Game state name&lt;br /&gt;
                    Returns: Game state name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Game state name&lt;br /&gt;
                    Value: Game state name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===HudGauge===&lt;br /&gt;
:&#039;&#039;&#039;HUD Gauge handle&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Name = string&#039;&#039;&lt;br /&gt;
::*Custom HUD Gauge name&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Custom HUD Gauge name, or nil if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;string Text = string&#039;&#039;&lt;br /&gt;
::*Custom HUD Gauge text&lt;br /&gt;
::*&#039;&#039;&#039;Returns:&#039;&#039;&#039; Value: Custom HUD Gauge text, or nil if handle is invalid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===eyepoint===&lt;br /&gt;
Eyepoint handle&lt;br /&gt;
&lt;br /&gt;
                vector Normal = vector&lt;br /&gt;
                    Eyepoint normal&lt;br /&gt;
                    Value: Eyepoint normal, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Eyepoint location (Local vector)&lt;br /&gt;
                    Value: Eyepoint location, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean IsValid()&lt;br /&gt;
                    Detect whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===model===&lt;br /&gt;
3D Model (POF) handle&lt;br /&gt;
&lt;br /&gt;
                modeltextures_h Textures = modeltextures_h&lt;br /&gt;
                    Model textures&lt;br /&gt;
                    Value: Model textures, or an invalid modeltextures handle if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusters Thrusters = thrusters&lt;br /&gt;
                    Model thrusters&lt;br /&gt;
                    Value: Thrusters of the model or invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoints Eyepoints = eyepoints&lt;br /&gt;
                    Model eyepoints&lt;br /&gt;
                    Value: Array of eyepoints or invalid handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMax = vector&lt;br /&gt;
                    Model bounding box maximum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMin = vector&lt;br /&gt;
                    Model bounding box minimum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Model filename&lt;br /&gt;
                    Value: Model filename, or an empty string if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Model mass&lt;br /&gt;
                    Value: Model mass, or 0 if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation MomentOfInertia = orientation&lt;br /&gt;
                    Model moment of inertia&lt;br /&gt;
                    Value: Moment of Inertia matrix or identity matrix if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    Model radius (Used for collision &amp;amp; culling detection)&lt;br /&gt;
                    Value: Model Radius or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
===modeltextures_h===&lt;br /&gt;
Array of materials&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on model&lt;br /&gt;
                    Returns: Number of model textures&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] texture&lt;br /&gt;
                    number Index/string TextureName&lt;br /&gt;
                    Returns: Model textures, or invalid modeltextures handle if model handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===eyepoints===&lt;br /&gt;
Array of model eye points&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Gets the number of eyepoints on this model&lt;br /&gt;
                    Returns: Number of eyepoints on this model or 0 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoint [] eyepoint&lt;br /&gt;
                    Gets en eyepoint handle&lt;br /&gt;
                    Returns: eye handle or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid or not&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===thrusters===&lt;br /&gt;
The thrusters of a model&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thruster banks on the model&lt;br /&gt;
                    Returns: Number of thrusterbanks&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusterbank [] number Index&lt;br /&gt;
                    Array of all thrusterbanks on this thruster&lt;br /&gt;
                    Returns: Handle to the thrusterbank or invalid handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===thrusterbank===&lt;br /&gt;
A model thrusterbank&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thrusters on this thrusterbank&lt;br /&gt;
                    Returns: Number of thrusters on this bank or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                glowpoint [] number Index&lt;br /&gt;
                    Array of glowpoint&lt;br /&gt;
                    Returns: Glowpoint, or invalid glowpoint handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detectes if this handle is valid&lt;br /&gt;
                    Returns: true if this handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===glowpoint===&lt;br /&gt;
A model glowpoint&lt;br /&gt;
&lt;br /&gt;
                vector Position&lt;br /&gt;
                    The (local) vector to the position of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius&lt;br /&gt;
                    The radius of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Returns wether this handle is valid or not&lt;br /&gt;
                    Returns: True if handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===order===&lt;br /&gt;
order handle&lt;br /&gt;
&lt;br /&gt;
                boolean remove()&lt;br /&gt;
                    Removes the given order from the ship&#039;s priority queue.&lt;br /&gt;
                    Returns: True if order was successfully removed, otherwise false or nil.&lt;br /&gt;
                     &lt;br /&gt;
===shiporders===&lt;br /&gt;
Ship orders&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                order [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship orders&lt;br /&gt;
                    Returns: Order, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===physics===&lt;br /&gt;
Physics handle&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerAccelerationTime = number&lt;br /&gt;
                    Afterburner acceleration time&lt;br /&gt;
                    Value: Afterburner acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector AfterburnerVelocityMax = vector&lt;br /&gt;
                    Afterburner max velocity (Local vector)&lt;br /&gt;
                    Value: Afterburner max velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number BankingConstant = number&lt;br /&gt;
                    Banking constant&lt;br /&gt;
                    Value: Banking constant, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardAccelerationTime = number&lt;br /&gt;
                    Forward acceleration time&lt;br /&gt;
                    Value: Forward acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardDecelerationTime = number&lt;br /&gt;
                    Forward deceleration time&lt;br /&gt;
                    Value: Forward decleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardThrust = number&lt;br /&gt;
                    Forward thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Forward thrust, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Object mass&lt;br /&gt;
                    Value: Object mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocity = vector&lt;br /&gt;
                    Rotational velocity (Local vector)&lt;br /&gt;
                    Value: Rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDamping = number&lt;br /&gt;
                    Rotational damping, ie derivative of rotational speed&lt;br /&gt;
                    Value: Rotational damping, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDesired = lvector&lt;br /&gt;
                    Desired rotational velocity&lt;br /&gt;
                    Value: Desired rotational velocity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocityMax = vector&lt;br /&gt;
                    Maximum rotational velocity (Local vector)&lt;br /&gt;
                    Value: Maximum rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShockwaveShakeAmplitude = number&lt;br /&gt;
                    How much shaking from shockwaves is applied to object&lt;br /&gt;
                    Value: Shockwave shake amplitude, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SideThrust = number&lt;br /&gt;
                    Side thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Side thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideAccelerationTime = number&lt;br /&gt;
                    Time to accelerate to maximum slide velocity&lt;br /&gt;
                    Value: Sliding acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideDecelerationTime = number&lt;br /&gt;
                    Time to decelerate from maximum slide speed&lt;br /&gt;
                    Value: Sliding deceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    Object world velocity (World vector)&lt;br /&gt;
                    Value: Object velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityDesired = vector&lt;br /&gt;
                    Desired velocity (World vector)&lt;br /&gt;
                    Value: Desired velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityMax = vector&lt;br /&gt;
                    Object max local velocity (Local vector)&lt;br /&gt;
                    Value: Maximum velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number VerticalThrust = number&lt;br /&gt;
                    Vertical thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Vertical thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AfterburnerActive = boolean&lt;br /&gt;
                    Specifies if the afterburner is active or not&lt;br /&gt;
                    Value: true if afterburner is active false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSpeed()&lt;br /&gt;
                    Gets total speed as of last frame&lt;br /&gt;
                    Returns: Total speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getForwardSpeed()&lt;br /&gt;
                    Gets total speed in the ship&#039;s &#039;forward&#039; direction as of last frame&lt;br /&gt;
                    Returns: Total forward speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isAfterburnerActive()&lt;br /&gt;
                    True if Afterburners are on, false or nil if not&lt;br /&gt;
                    Returns: Detects whether afterburner is active&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isGliding()&lt;br /&gt;
                    True if glide mode is on, false or nil if not&lt;br /&gt;
                    Returns: Detects if ship is gliding&lt;br /&gt;
                     &lt;br /&gt;
===sexpvariable===&lt;br /&gt;
SEXP Variable handle&lt;br /&gt;
&lt;br /&gt;
                enumeration Persistence = enumeration&lt;br /&gt;
                    SEXP Variable persistance, uses SEXPVAR_*_PERSISTENT enumerations&lt;br /&gt;
                    Value: SEXPVAR_*_PERSISTENT enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration Type = enumeration&lt;br /&gt;
                    SEXP Variable type, uses SEXPVAR_TYPE_* enumerations&lt;br /&gt;
                    Value: SEXPVAR_TYPE_* enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Value = number/string&lt;br /&gt;
                    SEXP variable value&lt;br /&gt;
                    Value: SEXP variable contents, or nil if the variable is of an invalid type or the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns SEXP name&lt;br /&gt;
                    Returns: SEXP name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean delete()&lt;br /&gt;
                    Deletes a SEXP Variable&lt;br /&gt;
                    Returns: True if successful, false if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===shields===&lt;br /&gt;
Shields handle&lt;br /&gt;
&lt;br /&gt;
                number [] enumeration/number&lt;br /&gt;
                    Gets or sets shield quadrant strength. Use &amp;quot;SHIELD_*&amp;quot; enumeration or 1-4 for a specific quadrant, or NONE for the entire shield&lt;br /&gt;
                    Returns: Quadrant/shield strength, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedLeft = number&lt;br /&gt;
                    Total shield hitpoints left (for all quadrants combined)&lt;br /&gt;
                    Value: Combined shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedMax = number&lt;br /&gt;
                    Maximum shield hitpoints (for all quadrants combined)&lt;br /&gt;
                    Value: Combined maximum shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===shiptype===&lt;br /&gt;
Ship type handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship type name&lt;br /&gt;
                    Value: Ship type name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===species===&lt;br /&gt;
Species handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Species name&lt;br /&gt;
                    Value: Species name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===team===&lt;br /&gt;
Team handle&lt;br /&gt;
&lt;br /&gt;
                boolean == team, team&lt;br /&gt;
                    Checks whether two teams are the same team&lt;br /&gt;
                    Returns: true if equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Team name&lt;br /&gt;
                    Value: Team name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getColor()&lt;br /&gt;
                    Gets the IFF color of the specified Team&lt;br /&gt;
                    Returns: rgb color for the specified team or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===texture===&lt;br /&gt;
Texture handle&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Auto-deletes texture&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean == texture, texture&lt;br /&gt;
                    Checks if two texture handles refer to the same texture&lt;br /&gt;
                    Returns: True if textures are equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number&lt;br /&gt;
                    Returns texture handle to specified frame number in current texture&#039;s animation.This means that [1] will always return the first frame in an animation, no matter what frame an animation is.You cannot change a texture animation frame.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unload()&lt;br /&gt;
                    Unloads a texture from memory&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns filename for texture&lt;br /&gt;
                    Returns: Filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWidth()&lt;br /&gt;
                    Gets texture width&lt;br /&gt;
                    Returns: Texture width, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getHeight()&lt;br /&gt;
                    Gets texture height&lt;br /&gt;
                    Returns: Texture height, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFPS()&lt;br /&gt;
                    Gets frames-per-second of texture&lt;br /&gt;
                    Returns: Texture FPS, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFramesLeft()&lt;br /&gt;
                    Gets number of frames left, from handle&#039;s position in animation&lt;br /&gt;
                    Returns: Frames left, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===material===&lt;br /&gt;
Texture map, including diffuse, glow, and specular textures&lt;br /&gt;
&lt;br /&gt;
                texture BaseMap = texture&lt;br /&gt;
                    Base texture&lt;br /&gt;
                    Value: Base texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture GlowMap = texture&lt;br /&gt;
                    Glow texture&lt;br /&gt;
                    Value: Glow texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture SpecularMap = texture&lt;br /&gt;
                    Specular texture&lt;br /&gt;
                    Value: Texture handle, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
===weaponclass===&lt;br /&gt;
Weapon class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Returns: Weapon class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Value: Weapon class name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Title = string&lt;br /&gt;
                    Weapon class title&lt;br /&gt;
                    Value: Weapon class title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Weapon class description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechTitle = string&lt;br /&gt;
                    Weapon class tech title&lt;br /&gt;
                    Value: Tech title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechAnimationFilename = string&lt;br /&gt;
                    Weapon class animation filename&lt;br /&gt;
                    Value: Filename, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Weapon class tech description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Weapon class model, or invalid model handle if weaponclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ArmorFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship hull (0-1.0)&lt;br /&gt;
                    Value: Armor factor, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Damage = number&lt;br /&gt;
                    Amount of damage that weapon deals&lt;br /&gt;
                    Value: Damage amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FireWait = number&lt;br /&gt;
                    Weapon fire wait (cooldown time) in seconds&lt;br /&gt;
                    Value: Fire wait time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FreeFlightTime = number&lt;br /&gt;
                    The time the weapon will fly before turing onto its target&lt;br /&gt;
                    Value: Free flight time or emty string if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeMax = number&lt;br /&gt;
                    Life of weapon in seconds&lt;br /&gt;
                    Value: Life of weapon, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Range = number&lt;br /&gt;
                    Range of weapon in meters&lt;br /&gt;
                    Value: Weapon Range, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Weapon mass&lt;br /&gt;
                    Value: Weapon mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShieldFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship shields (0-1.0)&lt;br /&gt;
                    Value: Shield damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SubsystemFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship subsystems (0-1.0)&lt;br /&gt;
                    Value: Subsystem damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TargetLOD = number&lt;br /&gt;
                    LOD used for weapon model in the targeting computer&lt;br /&gt;
                    Value: LOD number, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Speed = number&lt;br /&gt;
                    Weapon max speed, aka $Velocity in weapons.tbl&lt;br /&gt;
                    Value: Weapon speed, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Bomb = boolean&lt;br /&gt;
                    Is weapon class flagged as bomb&lt;br /&gt;
                    Value: New flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWeaponClassIndex()&lt;br /&gt;
                    Gets the index value of the weapon class&lt;br /&gt;
                    Returns: index value of the weapon class&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isLaser()&lt;br /&gt;
                    Return true if the weapon is a laser (this includes balistic primaries)&lt;br /&gt;
                    Returns: true if the weapon is a laser, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMissile()&lt;br /&gt;
                    Return true if the weapon is a missile&lt;br /&gt;
                    Returns: true if the weapon is a missile, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isBeam()&lt;br /&gt;
                    Return true if the weapon is a beam&lt;br /&gt;
                    Returns: true if the weapon is a beam, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===collision info===&lt;br /&gt;
Information about a collision&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Removes the allocated reference of this handle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    The model this collision info is about&lt;br /&gt;
                    Value: The model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionDistance()&lt;br /&gt;
                    The distance to the closest collision point&lt;br /&gt;
                    Returns: distance or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPoint([boolean local])&lt;br /&gt;
                    The collision point of this information (local to the object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision point or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionNormal([boolean local])&lt;br /&gt;
                    The collision normal of this information (local to object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision normal or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects if this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===object===&lt;br /&gt;
Object handle&lt;br /&gt;
&lt;br /&gt;
                boolean == object, object&lt;br /&gt;
                    Checks whether two object handles are for the same object&lt;br /&gt;
                    Returns: True if equal, false if not or a handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of object (if any)&lt;br /&gt;
                    Returns: Object name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Parent = object&lt;br /&gt;
                    Parent of the object. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Parent handle, or invalid handle if object is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Object world position (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastPosition = vector&lt;br /&gt;
                    Object world position as of last frame (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Object world orientation (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation LastOrientation = orientation&lt;br /&gt;
                    Object world orientation as of last frame (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                physics Physics = physics&lt;br /&gt;
                    Physics data used to move ship between frames&lt;br /&gt;
                    Value: Physics data, or invalid physics handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Hitpoints an object has left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shields Shields = shields&lt;br /&gt;
                    Shields&lt;br /&gt;
                    Value: Shields handle, or invalid shields handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSignature()&lt;br /&gt;
                    Gets the object&#039;s unique signature&lt;br /&gt;
                    Returns: Returns the objects unique numeric signature, or -1 if invalid. useful for creating a metadata sytem&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getBreedName()&lt;br /&gt;
                    Gets object type&lt;br /&gt;
                    Returns: Object type name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CollisionGroups = number&lt;br /&gt;
                    Collision group data&lt;br /&gt;
                    Value: Current collision group signature. NOTE: This is a bitfield, NOT a normal number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getfvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current fvec.&lt;br /&gt;
                    Returns: Objects&#039; forward vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getuvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current uvec.&lt;br /&gt;
                    Returns: Objects&#039; up vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getrvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current rvec.&lt;br /&gt;
                    Returns: Objects&#039; rvec, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector, collision info checkRayCollision(vector Start Point, vector End Point, [boolean Local])&lt;br /&gt;
                    Checks the collisions between the polygons of the current object and a ray&lt;br /&gt;
                    Returns: World collision point (local if boolean is set to true) and the specific collsision info, nil if no collisions&lt;br /&gt;
                     &lt;br /&gt;
===asteroid:object===&lt;br /&gt;
Asteroid handle&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Asteroid target object; may be object derivative, such as ship.&lt;br /&gt;
                    Value: Target object, or invalid handle if asteroid handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([ship killer=nil, wvector hitpos=nil])&lt;br /&gt;
                    Kills the asteroid. Set &amp;quot;killer&amp;quot; to designate a specific ship as having been the killer, and &amp;quot;hitpos&amp;quot; to specify the world position of the hit location; if nil, the asteroid center is used.&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
===shipclass===&lt;br /&gt;
Ship class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Returns: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Value: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShortName = string&lt;br /&gt;
                    Ship class short name&lt;br /&gt;
                    Value: Ship short name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TypeString = string&lt;br /&gt;
                    Ship class type string&lt;br /&gt;
                    Value: Type string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManeuverabilityString = string&lt;br /&gt;
                    Ship class maneuverability string&lt;br /&gt;
                    Value: Maneuverability string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorString = string&lt;br /&gt;
                    Ship class armor string&lt;br /&gt;
                    Value: Armor string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManufacturerString = string&lt;br /&gt;
                    Ship class manufacturer&lt;br /&gt;
                    Value: Manufacturer, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Ship class description&lt;br /&gt;
                    Value: Description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Ship class tech description&lt;br /&gt;
                    Value: Tech description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresMax = number&lt;br /&gt;
                    Maximum number of countermeasures the ship can carry&lt;br /&gt;
                    Value: Countermeasure capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Ship class model, or invalid model handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model CockpitModel = model&lt;br /&gt;
                    Model used for first-person cockpit&lt;br /&gt;
                    Value: Cockpit model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Ship class hitpoints&lt;br /&gt;
                    Value: Hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                species Species = Species&lt;br /&gt;
                    Ship class species&lt;br /&gt;
                    Value: Ship class species, or invalid species handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptype Type = shiptype&lt;br /&gt;
                    Ship class type&lt;br /&gt;
                    Value: Ship type, or invalid handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isInTechroom()&lt;br /&gt;
                    Gets whether or not the ship class is available in the techroom&lt;br /&gt;
                    Returns: Whether ship has been revealed in the techroom, false if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel(X1, Y1, X2, Y2, [Rotation %, Pitch %, Bank %, Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel2(X1, Y1, X2, Y2, orientation Orientation=null, [Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isModelLoaded([boolean Load = false])&lt;br /&gt;
                    Checks if the model used for this shipclass is loaded or not and optionally loads the model, which might be a slow operation.&lt;br /&gt;
                    Returns: If the model is loaded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getShipClassIndex()&lt;br /&gt;
                    Gets the index valus of the ship class&lt;br /&gt;
                    Returns: index value of the ship class&lt;br /&gt;
                     &lt;br /&gt;
===debris:object===&lt;br /&gt;
Debris handle&lt;br /&gt;
&lt;br /&gt;
                boolean IsHull = boolean&lt;br /&gt;
                    Whether or not debris is a piece of hull&lt;br /&gt;
                    Value: Whether debris is a hull fragment, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass OriginClass = shipclass&lt;br /&gt;
                    The shipclass of the ship this debris originates from&lt;br /&gt;
                    Value: The shipclass of the ship that created this debris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDebrisRadius()&lt;br /&gt;
                    The radius of this debris piece&lt;br /&gt;
                    Returns: The radius of this debris piece or -1 if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Return if this debris handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===waypoint:object===&lt;br /&gt;
waypoint handle&lt;br /&gt;
&lt;br /&gt;
===waypointlist===&lt;br /&gt;
waypointlist handle&lt;br /&gt;
&lt;br /&gt;
                waypoint [] number Index&lt;br /&gt;
                    Array of waypoints that are part of the waypoint list&lt;br /&gt;
                    Returns: Waypoint, or invalid handle if the index or waypointlist handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of waypoints in the list. Note that the value returned cannot be relied on for more than one frame.&lt;br /&gt;
                    Returns: Number of waypoints in the list, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Name of WaypointList&lt;br /&gt;
                    Value: Waypointlist name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
===weaponbank===&lt;br /&gt;
Ship/subystem weapons bank handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass WeaponClass = weaponclass&lt;br /&gt;
                    Class of weapon mounted in the bank&lt;br /&gt;
                    Value: Weapon class, or an invalid weaponclass handle if bank handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoLeft = number&lt;br /&gt;
                    Ammo left for the current bank&lt;br /&gt;
                    Value: Ammo left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoMax = number&lt;br /&gt;
                    Maximum ammo for the current bank&lt;br /&gt;
                    Value: Ammo capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Armed = boolean&lt;br /&gt;
                    Weapon armed status. Does not take linking into account.&lt;br /&gt;
                    Value: True if armed, false if unarmed or handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===weaponbanktype===&lt;br /&gt;
Ship/subsystem weapons bank type handle&lt;br /&gt;
&lt;br /&gt;
                weaponbank [] number Index&lt;br /&gt;
                    Array of weapon banks&lt;br /&gt;
                    Returns: Weapon bank, or invalid handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Linked = boolean&lt;br /&gt;
                    Whether bank is in linked or unlinked fire mode (Primary-only)&lt;br /&gt;
                    Value: Link status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DualFire = boolean&lt;br /&gt;
                    Whether bank is in dual fire mode (Secondary-only)&lt;br /&gt;
                    Value: Dual fire status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of weapons in the mounted bank&lt;br /&gt;
                    Returns: Number of bank weapons, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===subsystem===&lt;br /&gt;
Ship subsystem handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of subsystem&lt;br /&gt;
                    Returns: Subsystem name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSIntensity = number&lt;br /&gt;
                    Subsystem AWACS intensity&lt;br /&gt;
                    Value: AWACS intensity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSRadius = number&lt;br /&gt;
                    Subsystem AWACS radius&lt;br /&gt;
                    Value: AWACS radius, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Orientation of subobject or turret base&lt;br /&gt;
                    Value: Subsystem orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation GunOrientation = orientation&lt;br /&gt;
                    Orientation of turret gun&lt;br /&gt;
                    Value: Gun orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Subsystem hitpoints left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid. Setting a value of 0 will disable it - set a value of -1 or lower to actually blow it up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Subsystem hitpoints max&lt;br /&gt;
                    Value: Max hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Subsystem position with regards to main ship (Local Vector)&lt;br /&gt;
                    Value: Subsystem position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector GunPosition = vector&lt;br /&gt;
                    Subsystem gun position with regards to main ship (Local vector)&lt;br /&gt;
                    Value: Gun position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Subsystem name&lt;br /&gt;
                    Value: Subsystem name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getModelName()&lt;br /&gt;
                    Returns the original name of the subsystem in the model file&lt;br /&gt;
                    Returns: name or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Object targetted by this subsystem. If used to set a new target, AI targeting will be switched off.&lt;br /&gt;
                    Value: Targeted object, or invalid object handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretResets = boolean&lt;br /&gt;
                    Specifies wether this turrets resets after a certain time of inactivity&lt;br /&gt;
                    Value: true if turret resets, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurretResetDelay = number&lt;br /&gt;
                    The time (in milliseconds) after that the turret resets itself&lt;br /&gt;
                    Value: Reset delay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurnRate = number&lt;br /&gt;
                    The turn rate&lt;br /&gt;
                    Value: Turnrate or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretLocked = boolean&lt;br /&gt;
                    Whether the turret is locked. Setting to true locks the turret, setting to false frees it.&lt;br /&gt;
                    Value: True if turret is locked, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number NextFireTimestamp = number&lt;br /&gt;
                    The next time the turret may attempt to fire&lt;br /&gt;
                    Value: Mission time (seconds) or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean targetingOverride(boolean)&lt;br /&gt;
                    If set to true, AI targeting for this turret is switched off. If set to false, the AI will take over again.&lt;br /&gt;
                    Returns: Returns true if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasFired()&lt;br /&gt;
                    Determine if a subsystem has fired&lt;br /&gt;
                    Returns: true if if fired, false if not fired, or nil if invalid. resets fired flag when called.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isTurret()&lt;br /&gt;
                    Determines if this subsystem is a turret&lt;br /&gt;
                    Returns: true if subsystem is turret, false otherwise or nil on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil fireWeapon([Turret weapon index = 1, Flak range = 100])&lt;br /&gt;
                    Fires weapon on turret&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rotateTurret(vector Pos[, boolean reset=false)&lt;br /&gt;
                    Rotates the turret to face Pos or resets the turret to its original state&lt;br /&gt;
                    Returns: true on success false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getTurretHeading()&lt;br /&gt;
                    Returns the turrets forward vector&lt;br /&gt;
                    Returns: Returns a normalized version of the forward vector or null vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getFOVs()&lt;br /&gt;
                    Returns current turrets FOVs&lt;br /&gt;
                    Returns: Standard FOV, maximum barrel elevation, turret base fov.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                matrix getTurretMatrix()&lt;br /&gt;
                    Returns current subsystems turret matrix&lt;br /&gt;
                    Returns: Turret matrix.&lt;br /&gt;
                     &lt;br /&gt;
===shiptextures===&lt;br /&gt;
Ship textures handle&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship textures&lt;br /&gt;
                    Returns: Texture, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===ship:object===&lt;br /&gt;
Ship handle&lt;br /&gt;
&lt;br /&gt;
                subsystem [] string Name/number Index&lt;br /&gt;
                    Array of ship subsystems&lt;br /&gt;
                    Returns: Subsystem handle, or invalid subsystem handle if index or ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of subsystems on ship&lt;br /&gt;
                    Returns: Subsystem number, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShieldArmorClass = string&lt;br /&gt;
                    Current Armor class of the ships&#039; shield&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship name&lt;br /&gt;
                    Value: Ship name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelLeft = number&lt;br /&gt;
                    Afterburner fuel left&lt;br /&gt;
                    Value: Afterburner fuel left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner fuel capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass Class = shipclass&lt;br /&gt;
                    Ship class&lt;br /&gt;
                    Value: Ship class, or invalid shipclass handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresLeft = number&lt;br /&gt;
                    Number of countermeasures left&lt;br /&gt;
                    Value: Countermeasures left, or 0 if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponclass CountermeasureClass = weaponclass&lt;br /&gt;
                    Weapon class mounted on this ship&#039;s countermeasure point&lt;br /&gt;
                    Value: Countermeasure hardpoint weapon class, or invalid weaponclass handle if no countermeasure class or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Total hitpoints&lt;br /&gt;
                    Value: Ship maximum hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyLeft = number&lt;br /&gt;
                    Current weapon energy reserves&lt;br /&gt;
                    Value: Ship current weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyMax = number&lt;br /&gt;
                    Maximum weapon energy&lt;br /&gt;
                    Value: Ship maximum weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean PrimaryTriggerDown = boolean&lt;br /&gt;
                    Determines if primary trigger is pressed or not&lt;br /&gt;
                    Value: True if pressed, false if not, nil if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype TertiaryBanks = weaponbanktype&lt;br /&gt;
                    Array of tertiary weapon banks&lt;br /&gt;
                    Value: Tertiary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of ship. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Target object, or invalid object handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Target subsystem of ship.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Ship&#039;s team&lt;br /&gt;
                    Value: Ship team, or invalid team handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptextures Textures = shiptextures&lt;br /&gt;
                    Gets ship textures&lt;br /&gt;
                    Value: Ship textures, or invalid shiptextures handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean FlagAffectedByGravity = boolean&lt;br /&gt;
                    Checks for the &amp;quot;affected-by-gravity&amp;quot; flag&lt;br /&gt;
                    Value: True if flag is set, false if flag is not set and nil on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Disabled = boolean&lt;br /&gt;
                    The disabled state of this ship&lt;br /&gt;
                    Value: true if ship is diabled, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([object Killer])&lt;br /&gt;
                    Kills the ship. Set &amp;quot;Killer&amp;quot; to the ship you are killing to self-destruct&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean addShipEffect(string name, int duration (in milliseconds))&lt;br /&gt;
                    Activates an effect for this ship. Effect names are defined in Post_processing.tbl, and need to be implemented in the main shader. This functions analogous to the ship-effect sexp. NOTE: only one effect can be active at any time, adding new effects will override effects already in progress. &lt;br /&gt;
                    Returns: Returns true if the effect was successfully added, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number hasShipExploded()&lt;br /&gt;
                    Checks if the ship explosion event has already happened&lt;br /&gt;
                    Returns: Returns 1 if first explosion timestamp is passed, 2 if second is passed, 0 otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fireCountermeasure()&lt;br /&gt;
                    Launches a countermeasure from the ship&lt;br /&gt;
                    Returns: Whether countermeasure was launched or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number firePrimary()&lt;br /&gt;
                    Fires ship primary bank(s)&lt;br /&gt;
                    Returns: Number of primary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number fireSecondary()&lt;br /&gt;
                    Fires ship secondary bank(s)&lt;br /&gt;
                    Returns: Number of secondary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getAnimationDoneTime(number Type, number Subtype)&lt;br /&gt;
                    Gets time that animation will be done&lt;br /&gt;
                    Returns: Time (seconds), or 0 if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean clearOrders()&lt;br /&gt;
                    Clears a ship&#039;s orders list&lt;br /&gt;
                    Returns: True if successful, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean giveOrder(enumeration Order, [object Target=nil, subsystem TargetSubsystem=nil, number Priority=1.0])&lt;br /&gt;
                    Uses the goal code to execute orders&lt;br /&gt;
                    Returns: True if order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean doManeuver(number Duration, number Heading, number Pitch, number Bank, boolean Force Rotation, number Vertical, number Horizontal, number Forward, boolean Force Movement)&lt;br /&gt;
                    Sets ship maneuver over the defined time period&lt;br /&gt;
                    Returns: True if maneuver order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean triggerAnimation(string Type, [number Subtype, boolean Forwards])&lt;br /&gt;
                    Triggers an animation. Type is the string name of the animation type, Subtype is the subtype number, such as weapon bank #, and Forwards is boolean.&lt;br /&gt;
                    IMPORTANT: Function is in testing and should not be used with official mod releases&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpIn()&lt;br /&gt;
                    Warps ship in&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpOut()&lt;br /&gt;
                    Warps ship out&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isWarpingIn()&lt;br /&gt;
                    Checks if ship is warping in&lt;br /&gt;
                    Returns: True if the ship is warping in, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getEMP()&lt;br /&gt;
                    Returns the current emp effect strength acting on the object&lt;br /&gt;
                    Returns: Current EMP effect strength or NIL if object is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTimeUntilExplosion()&lt;br /&gt;
                    Returns the time in seconds until the ship explodes&lt;br /&gt;
                    Returns: Time until explosion or -1, if invalid handle or ship isn&#039;t exploding&lt;br /&gt;
                     &lt;br /&gt;
===weapon:object===&lt;br /&gt;
Weapon handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DestroyedByWeapon = boolean&lt;br /&gt;
                    Whether weapon was destroyed by another weapon&lt;br /&gt;
                    Value: True if weapon was destroyed by another weapon, false if weapon was destroyed by another object or if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeLeft = number&lt;br /&gt;
                    Weapon life left (in seconds)&lt;br /&gt;
                    Value: Life left (seconds) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FlakDetonationRange = number&lt;br /&gt;
                    Range at which flak will detonate (meters)&lt;br /&gt;
                    Value: Detonation range (meters) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of weapon. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Weapon target, or invalid object handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentTurret = subsystem&lt;br /&gt;
                    Turret which fired this weapon.&lt;br /&gt;
                    Value: Turret subsystem handle, or an invalid handle if the weapon not fired from a turret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object HomingObject = object&lt;br /&gt;
                    Object that weapon will home in on. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;&lt;br /&gt;
                    Value: Object that weapon is homing in on, or an invalid object handle if weapon is not homing or the weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector HomingPosition = vector&lt;br /&gt;
                    Position that weapon will home in on (World vector)&lt;br /&gt;
                    Value: Homing point, or null vector if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem HomingSubsystem = subsystem&lt;br /&gt;
                    Subsystem that weapon will home in on.&lt;br /&gt;
                    Value: Homing subsystem, or invalid subsystem handle if weapon is not homing or weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Weapon&#039;s team&lt;br /&gt;
                    Value: Weapon team, or invalid team handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isArmed([boolean Hit target])&lt;br /&gt;
                    Checks if the weapon is armed.&lt;br /&gt;
                    Returns: boolean value of the weapon arming status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation()&lt;br /&gt;
                    Returns the collision information for this weapon&lt;br /&gt;
                    Returns: The collision information or invalid handle if none&lt;br /&gt;
                     &lt;br /&gt;
===beam:object===&lt;br /&gt;
Beam handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastShot = vector&lt;br /&gt;
                    End point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastStart = vector&lt;br /&gt;
                    Start point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of beam. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Beam target, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is targeting.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object ParentShip = object&lt;br /&gt;
                    Parent of the beam.&lt;br /&gt;
                    Value: Beam parent, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is fired from.&lt;br /&gt;
                    Value: Parent subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionCount()&lt;br /&gt;
                    Get the number of collisions in frame.&lt;br /&gt;
                    Returns: Number of beam collisions&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPosition(number)&lt;br /&gt;
                    Get the position of the defined collision.&lt;br /&gt;
                    Returns: World vector&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation(number)&lt;br /&gt;
                    Get the collision information of the specified collision&lt;br /&gt;
                    Returns: handle to information or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object getCollisionObject(number)&lt;br /&gt;
                    Get the target of the defined collision.&lt;br /&gt;
                    Returns: Object the beam collided with&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isExitCollision(number)&lt;br /&gt;
                    Checks if the defined collision was exit collision.&lt;br /&gt;
                    Returns: True if the collision was exit collision, false if entry, nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getStartDirectionInfo()&lt;br /&gt;
                    Gets the start information about the direction. The vector is a normalized vector from LastStart showing the start direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getEndDirectionInfo()&lt;br /&gt;
                    Gets the end information about the direction. The vector is a normalized vector from LastStart showing the end direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
===wing===&lt;br /&gt;
Wing handle&lt;br /&gt;
&lt;br /&gt;
                ship [] number Index&lt;br /&gt;
                    Array of ships in the wing&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invawing handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of wings in mission&lt;br /&gt;
                    Returns: Number of wings in mission&lt;br /&gt;
                     &lt;br /&gt;
===player===&lt;br /&gt;
Player handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getName()&lt;br /&gt;
                    Gets current player name&lt;br /&gt;
                    Returns: Player name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCampaignFilename()&lt;br /&gt;
                    Gets current player campaign filename&lt;br /&gt;
                    Returns: Campaign name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getImageFilename()&lt;br /&gt;
                    Gets current player image filename&lt;br /&gt;
                    Returns: Player image filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMainHall()&lt;br /&gt;
                    Gets player&#039;s main hall number&lt;br /&gt;
                    Returns: Main hall index, or 1 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getSquadronName()&lt;br /&gt;
                    Gets current player squad name&lt;br /&gt;
                    Returns: Squadron name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
===camera===&lt;br /&gt;
Camera handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Camera name&lt;br /&gt;
                    Returns: Camera name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    New camera name&lt;br /&gt;
                    Value: Camera name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FOV = number&lt;br /&gt;
                    New camera FOV (in radians)&lt;br /&gt;
                    Value: Camera FOV (in radians)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    New camera orientation&lt;br /&gt;
                    Value: Camera orientation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    New camera position&lt;br /&gt;
                    Value: Camera position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Self = object&lt;br /&gt;
                    New mount object&lt;br /&gt;
                    Value: Camera object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem SelfSubsystem = subsystem&lt;br /&gt;
                    New mount object subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is mounted on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    New target object&lt;br /&gt;
                    Value: Camera target object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    New target subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is pointed at&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setFOV([number FOV, number Zoom Time, number Zoom Acceleration Time, number Zoom deceleration Time])&lt;br /&gt;
                    Sets camera FOV&lt;br /&gt;
                    FOV is the final field of view, in radians, of the camera.&lt;br /&gt;
                    Zoom Time is the total time to take zooming in or out.&lt;br /&gt;
                    Acceleration Time is the total time it should take the camera to get up to full zoom speed.&lt;br /&gt;
                    Deceleration Time is the total time it should take the camera to slow down from full zoom speed.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setOrientation([world orientation Orientation, number Rotation Time, number Acceleration Time, number Deceleration time])&lt;br /&gt;
                    Sets camera orientation and velocity data.&lt;br /&gt;
                    Orientation is the final orientation for the camera, after it has finished moving. If not specified, the camera will simply stop at its current orientation.&lt;br /&gt;
                    Rotation time is how long total, including acceleration, the camera should take to rotate. If it is not specified, the camera will jump to the specified orientation.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition([wvector Position, number Translation Time, number Acceleration Time, number Deceleration Time])&lt;br /&gt;
                    Sets camera position and velocity data.&lt;br /&gt;
                    Position is the final position for the camera. If not specified, the camera will simply stop at its current position.&lt;br /&gt;
                    Translation time is how long total, including acceleration, the camera should take to move. If it is not specified, the camera will jump to the specified position.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
===soundentry===&lt;br /&gt;
sounds.tbl table entry handle&lt;br /&gt;
&lt;br /&gt;
                number DefaultVolume = number&lt;br /&gt;
                    The default volume of this game sound&lt;br /&gt;
                    Value: Volume in the range from 1 to 0 or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns the filename of this sound&lt;br /&gt;
                    Returns: filename or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDuration()&lt;br /&gt;
                    Gives the length of the sound in seconds.&lt;br /&gt;
                    Returns: the length, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number get3DValues(vector Postion[, number radius=0.0])&lt;br /&gt;
                    Computes the volume and the panning of the sound when it would be played from the specified position.&lt;br /&gt;
                    If range is given then the volume will diminish when the listener is withing that distance to the source.&lt;br /&gt;
                    The position of the listener is always the the current viewing position.&lt;br /&gt;
                    Returns: The volume and the panning, in that sequence, or both -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===sound===&lt;br /&gt;
sound instance handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of sound, from 100 to 100000&lt;br /&gt;
                    Value: Pitch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getRemainingTime()&lt;br /&gt;
                    The remaining time of this sound handle&lt;br /&gt;
                    Returns: Remaining time, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setVolume(number)&lt;br /&gt;
                    Sets the volume of this sound instance&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPanning(number)&lt;br /&gt;
                    Sets the panning of this sound. Argument ranges from -1 for left to 1 for right&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition(number[,boolean = true])&lt;br /&gt;
                    Sets the absolute position of the sound. If boolean argument is true then the value is given as a percentage&lt;br /&gt;
                    Returns: true if successfull, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rewind(number)&lt;br /&gt;
                    Rewinds the sound by the given number of seconds&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean skip(number)&lt;br /&gt;
                    Skips the given number of seconds of the sound&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPlaying()&lt;br /&gt;
                    Specifies if this handle is currently playing&lt;br /&gt;
                    Returns: true if playing, false if otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean stop()&lt;br /&gt;
                    Stops the sound of this handle&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
===3Dsound:sound===&lt;br /&gt;
3D sound instance handle&lt;br /&gt;
&lt;br /&gt;
                boolean updatePosition(vector Position[, number radius = 0.0])&lt;br /&gt;
                    Updates the given 3D sound with the specified position and an optional range value&lt;br /&gt;
                    Returns: true if succeesed, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
===control info===&lt;br /&gt;
control info handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of the player ship&lt;br /&gt;
                    Value: Pitch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Heading = number&lt;br /&gt;
                    Heading of the player ship&lt;br /&gt;
                    Value: Heading&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Bank = number&lt;br /&gt;
                    Bank of the player ship&lt;br /&gt;
                    Value: Bank&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Vertical = number&lt;br /&gt;
                    Vertical control of the player ship&lt;br /&gt;
                    Value: Vertical control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Sideways = number&lt;br /&gt;
                    Sideways control of the player ship&lt;br /&gt;
                    Value: Sideways control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Forward = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardCruise = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number PrimaryCount = number&lt;br /&gt;
                    Number of primary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SecondaryCount = number&lt;br /&gt;
                    Number of secondary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasureCount = number&lt;br /&gt;
                    Number of countermeasures that will launch&lt;br /&gt;
                    Value: Number of countermeasures to launch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearLuaButtonInfo()&lt;br /&gt;
                    Clears the lua button control info&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number getButtonInfo()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number accessButtonInfo(number, number, number, number)&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil useButtonControl(number, string)&lt;br /&gt;
                    Adds the defined button control to lua button control data, if number is -1 it tries to use the string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getButtonControlName(number)&lt;br /&gt;
                    Gives the name of the command corresponding with the given number&lt;br /&gt;
                    Returns: Name of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getButtonControlNumber(string)&lt;br /&gt;
                    Gives the number of the command corresponding with the given string&lt;br /&gt;
                    Returns: Number of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AllButtonPolling = boolean&lt;br /&gt;
                    Toggles the all button polling for lua&lt;br /&gt;
                    Value: If the all button polling is enabled or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number pollAllButtons()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
===particle===&lt;br /&gt;
Handle to a particle&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    The current position of the particle (world vector)&lt;br /&gt;
                    Value: The current position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    The current velocity of the particle (world vector)&lt;br /&gt;
                    Value: The current velocity&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Age = number&lt;br /&gt;
                    The time this particle already lives&lt;br /&gt;
                    Value: The current age or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number MaximumLife = number&lt;br /&gt;
                    The time this particle can live&lt;br /&gt;
                    Value: The maximal life or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    The radius of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TracerLength = number&lt;br /&gt;
                    The tracer legth of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object AttachedObject = object&lt;br /&gt;
                    The object this particle is attached to. If valid the position will be relativ to this object and the velocity will be ignored.&lt;br /&gt;
                    Value: Attached object or invalid object handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false if not&lt;br /&gt;
                     &lt;br /&gt;
==Libraries==&lt;br /&gt;
===Audio (ad)===&lt;br /&gt;
Sound/Music Library&lt;br /&gt;
&lt;br /&gt;
                soundentry getSoundentry(string/number)&lt;br /&gt;
                    Return a sound entry matching the specified index or name. If you are using a number then the first valid index is 1&lt;br /&gt;
                    Returns: soundentry or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playSound(soundentry)&lt;br /&gt;
                    Plays the specified sound entry handle&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playLoopingSound(soundentry)&lt;br /&gt;
                    Plays the specified sound as a looping sound&lt;br /&gt;
                    Returns: A handle to the playing sound or invalid handle if playback failed&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                3Dsound play3DSound(soundentry[, vector source[, vector listener]])&lt;br /&gt;
                    Plays the specified sound entry handle. Source if by default 0, 0, 0 and listener is by default the current viewposition&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playGameSound(Sound index, [Panning (-1.0 left to 1.0 right), Volume %, Priority 0-3, Voice Message?])&lt;br /&gt;
                    Plays a sound from #Game Sounds in sounds.tbl. A priority of 0 indicates that the song must play; 1-3 will specify the maximum number of that sound that can be played&lt;br /&gt;
                    Returns: True if sound was played, false if not (Replaced with a sound instance object in the future)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playInterfaceSound(Sound index)&lt;br /&gt;
                    Plays a sound from #Interface Sounds in sounds.tbl&lt;br /&gt;
                    Returns: True if sound was played, false if not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number playMusic(string Filename, [float volume = 1.0, bool looping = true])&lt;br /&gt;
                    Plays a music file using FS2Open&#039;s builtin music system. Volume should be in the 0.0 - 1.0 range, and is capped at 1.0. Files passed to this function are looped by default.&lt;br /&gt;
                    Returns: Audiohandle of the created audiostream, or -1 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil stopMusic(int audiohandle, [bool fade = false])&lt;br /&gt;
                    Stops a playing music file, provided audiohandle is valid&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Base (ba)===&lt;br /&gt;
Base FreeSpace 2 functions&lt;br /&gt;
&lt;br /&gt;
                nil print(string Message)&lt;br /&gt;
                    Prints a string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil warning(string Message)&lt;br /&gt;
                    Displays a FreeSpace warning (debug build-only) message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil error(string Message)&lt;br /&gt;
                    Displays a FreeSpace error message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation createOrientation([p/r1c1, b/r1c2, h/r1c3, r2c1, r2c2, r2c3, r3c1, r3c2, r3c3])&lt;br /&gt;
                    Given 0, 3, or 9 arguments, creates an orientation object with that orientation.&lt;br /&gt;
                    Returns: New orientation object, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector createVector([x, y, z])&lt;br /&gt;
                    Creates a vector object&lt;br /&gt;
                    Returns: Vector object&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFrametime([Do not adjust for time compression (Boolean)])&lt;br /&gt;
                    Gets how long this frame is calculated to take. Use it to for animations, physics, etc to make incremental changes.&lt;br /&gt;
                    Returns: Frame time (seconds)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                state getCurrentGameState([Depth (number)])&lt;br /&gt;
                    Gets current FreeSpace state; if a depth is specified, the state at that depth is returned. (IE at the in-game options game, a depth of 1 would give you the game state, while the function defaults to 0, which would be the options screen.&lt;br /&gt;
                    Returns: Current game state at specified depth, or invalid handle if no game state is active yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCurrentMPStatus(NIL)&lt;br /&gt;
                    Gets this computers current MP status&lt;br /&gt;
                    Returns: Current MP status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setControlMode(NIL or enumeration LE_*_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setButtonControlMode(NIL or enumeration LE_*_BUTTON_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                control info getControlInfo()&lt;br /&gt;
                    Gets the control info handle.&lt;br /&gt;
                    Returns: control info handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean postGameEvent(gameevent Event)&lt;br /&gt;
                    Sets current game event. Note that you can crash FreeSpace 2 by posting an event at an improper time, so test extensively if you use it.&lt;br /&gt;
                    Returns: True if event was posted, false if passed event was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gameevent GameEvents[] number Index/string Name&lt;br /&gt;
                    Array of game events&lt;br /&gt;
                    Returns: Game event, or invalid gameevent handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events&lt;br /&gt;
                        Returns: Number of events&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gamestate GameStates[] number Index/string Name&lt;br /&gt;
                    Array of game states&lt;br /&gt;
                    Returns: Game state, or invalid gamestate handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of states&lt;br /&gt;
                        Returns: Number of states&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CFile (cf)===&lt;br /&gt;
CFile FS2 filesystem access&lt;br /&gt;
&lt;br /&gt;
                boolean deleteFile(string Filename, string Path)&lt;br /&gt;
                    Deletes given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if deleted, false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fileExists(string Filename, [string Path = &amp;quot;&amp;quot;, boolean CheckVPs = false])&lt;br /&gt;
                    Checks if a file exists. Use a blank string for path for any directory, or a slash for the root directory.&lt;br /&gt;
                    Returns: True if file exists, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openFile(string Filename, [string Mode=&amp;quot;r&amp;quot;, string Path = &amp;quot;&amp;quot;])&lt;br /&gt;
                    Opens a file. &#039;Mode&#039; uses standard C fopen arguments. Use a blank string for path for any directory, or a slash for the root directory.Be EXTREMELY CAREFUL when using this function, as you may PERMANENTLY delete any file by accident&lt;br /&gt;
                    Returns: File handle, or invalid file handle if the specified file couldn&#039;t be opened&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openTempFile()&lt;br /&gt;
                    Opens a temp file that is automatically deleted when closed&lt;br /&gt;
                    Returns: File handle, or invalid file handle if tempfile couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renameFile(string CurrentFilename, string NewFilename, string Path)&lt;br /&gt;
                    Renames given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if file was renamed, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Controls (io)===&lt;br /&gt;
Controls library&lt;br /&gt;
&lt;br /&gt;
                number getMouseX()&lt;br /&gt;
                    Gets Mouse X pos&lt;br /&gt;
                    Returns: Mouse x position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMouseY()&lt;br /&gt;
                    Gets Mouse Y pos&lt;br /&gt;
                    Returns: Mouse y position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMouseButtonDown({MOUSE_*_BUTTON enumeration}, [..., ...])&lt;br /&gt;
                    Returns whether the specified mouse buttons are up or down&lt;br /&gt;
                    Returns: Whether specified mouse buttons are down, or false if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorImage(Image filename, [LOCK or UNLOCK])&lt;br /&gt;
                    Sets mouse cursor image, and allows you to lock/unlock the image. (A locked cursor may only be changed with the unlock parameter)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorHidden(True to hide mouse, false to show it)&lt;br /&gt;
                    Shows or hides mouse cursor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean forceMousePosition(number, number (coordinates))&lt;br /&gt;
                    function to force mouse position&lt;br /&gt;
                    Returns: if the operation succeeded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean MouseControlStatus = boolean&lt;br /&gt;
                    Gets and sets the retail mouse control status&lt;br /&gt;
                    Value: if the retail mouse is on or off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean updateTrackIR()&lt;br /&gt;
                    Updates Tracking Data. Call before using get functions&lt;br /&gt;
                    Returns: Checks if trackir is available and updates variables, returns true if successful, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRPitch()&lt;br /&gt;
                    Gets pitch axis from last update&lt;br /&gt;
                    Returns: Pitch value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRYaw()&lt;br /&gt;
                    Gets yaw axis from last update&lt;br /&gt;
                    Returns: Yaw value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRRoll()&lt;br /&gt;
                    Gets roll axis from last update&lt;br /&gt;
                    Returns: Roll value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRX()&lt;br /&gt;
                    Gets x position from last update&lt;br /&gt;
                    Returns: X value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRY()&lt;br /&gt;
                    Gets y position from last update&lt;br /&gt;
                    Returns: Y value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRZ()&lt;br /&gt;
                    Gets z position from last update&lt;br /&gt;
                    Returns: Z value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HUD (hu)===&lt;br /&gt;
HUD library&lt;br /&gt;
&lt;br /&gt;
                boolean HUDDrawn = boolean&lt;br /&gt;
                    Current HUD draw status&lt;br /&gt;
                    Value: If the HUD is drawn or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setHUDGaugeColor(number (index number of the gauge), [number red, number green, number blue, number alpha])&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: If the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number, number getHUDGaugeColor(number (index number of the gauge))&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: Red, green, blue, and alpha of the gauge&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                HudGauge getHUDGaugeHandle(string Name)&lt;br /&gt;
                    Returns a handle to a specified HUD gauge&lt;br /&gt;
                    Returns: HUD Gauge handle, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Graphics (gr)===&lt;br /&gt;
Graphics Library&lt;br /&gt;
&lt;br /&gt;
                camera Cameras[] number Index/string Name&lt;br /&gt;
                    Gets camera&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of cameras&lt;br /&gt;
                        Returns: Number of cameras&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font Fonts[] number Index/string Filename&lt;br /&gt;
                    Array of loaded fonts&lt;br /&gt;
                    Returns: Font handle, or invalid font handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of loaded fonts&lt;br /&gt;
                        Returns: Number of loaded fonts&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font CurrentFont = font&lt;br /&gt;
                    Current font&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration CurrentOpacityType = enumeration&lt;br /&gt;
                    Current alpha blending type; uses ALPHABLEND_* enumerations&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture CurrentRenderTarget = texture&lt;br /&gt;
                    Current rendering target&lt;br /&gt;
                    Value: Current rendering target, or invalid texture handle if screen is render target&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearScreen([number Red, number green, number blue, number alpha])&lt;br /&gt;
                    Clears the screen to black, or the color specified.&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                camera createCamera(string Name, [wvector Position, orientation Orientation])&lt;br /&gt;
                    Creates a new camera using the specified position and orientation (World)&lt;br /&gt;
                    Returns: Camera handle, or invalid camera handle if camera couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenWidth()&lt;br /&gt;
                    Gets screen width&lt;br /&gt;
                    Returns: Width in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenHeight()&lt;br /&gt;
                    Gets screen height&lt;br /&gt;
                    Returns: Height in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getVectorFromCoords([number X=center, number Y=center, number Depth, boolean normalize = false])&lt;br /&gt;
                    Returns a vector through screen coordinates x and y. If depth is specified, vector is extended to Depth units into spaceIf normalize is true, vector will be normalized.&lt;br /&gt;
                    Returns: Vector, or zero vector on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setTarget([texture Texture])&lt;br /&gt;
                    If texture is specified, sets current rendering surface to a texture.Otherwise, sets rendering surface back to screen.&lt;br /&gt;
                    Returns: True if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setCamera([camera handle Camera])&lt;br /&gt;
                    Sets current camera, or resets camera if none specified&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setColor(number Red, number Green, number Blue, [number Alpha])&lt;br /&gt;
                    Sets 2D drawing color; each color number should be from 0 (darkest) to 255 (brightest)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCircle(number Radius, number X, number Y)&lt;br /&gt;
                    Draws a circle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCurve(number X, number Y, number Radius)&lt;br /&gt;
                    Draws a curve&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawGradientLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with the CurrentColor that steadily fades out&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPixel(number X, number Y)&lt;br /&gt;
                    Sets pixel to CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPolygon(texture Texture, [vector Position={0,0,0}, orientation Orientation=null, number Width=1.0, number Height=1.0])&lt;br /&gt;
                    Draws a polygon&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawRectangle(number X1, number Y1, number X2, number Y2, [boolean Filled=true])&lt;br /&gt;
                    Draws a rectangle with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawSphere([number Radius = 1.0, vector Position])&lt;br /&gt;
                    Draws a sphere with radius Radius at world vector Position&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModel(model, position, orientation)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, may not work properly in all scripting hooks.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModelOOR(model Model, vector Position, matrix Orientation, integer Flags)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, designer to operate properly only in On Object Render hook.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number,number,number,number drawTargetingBrackets(object Object, [boolean draw=true, int padding=5])&lt;br /&gt;
                    Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.&lt;br /&gt;
                    Returns: Left, top, right, and bottom positions of the brackets, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number drawString(string Message, [number X1, number Y1, number X2, number Y2])&lt;br /&gt;
                    Draws a string. Use x1/y1 to control position, x2/y2 to limit textbox size.Text will automatically move onto new lines, if x2/y2 is specified.Additionally, calling drawString with only a string argument will automaticallydraw that string below the previously drawn string (or 0,0 if no stringshave been drawn yet&lt;br /&gt;
                    Returns: Number of lines drawn, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getStringWidth(string String)&lt;br /&gt;
                    Gets string width&lt;br /&gt;
                    Returns: String width, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture createTexture([number Width=512, number Height=512, enumeration Type=TEXTURE_DYNAMIC])&lt;br /&gt;
                    Creates a texture for rendering to.Types are TEXTURE_STATIC - for infrequent rendering - and TEXTURE_DYNAMIC - for frequent rendering.&lt;br /&gt;
                    Returns: New texture handle, or invalid texture handle if texture couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture loadTexture(string Filename, [boolean LoadIfAnimation, boolean NoDropFrames])&lt;br /&gt;
                    Gets a handle to a texture. If second argument is set to true, animations will also be loaded.If third argument is set to true, every other animation frame will not be loaded if system has less than 48 MB memory.&lt;br /&gt;
                    IMPORTANT: Textures will not be unload themselves unless you explicitly tell them to do so.When you are done with a texture, call the Unload() function to free up memory.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if texture couldn&#039;t be loaded&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawImage(string Filename/texture Texture, [number X1=0, Y1=0, number X2, number Y2, number UVX1 = 0.0, number UVY1 = 0.0, number UVX2=1.0, number UVY2=1.0, number alpha=1.0])&lt;br /&gt;
                    Draws an image or texture. Any image extension passed will be ignored.The UV variables specify the UV value for each corner of the image. In UV coordinates, (0,0) is the top left of the image; (1,1) is the lower right.&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawMonochromeImage(string Filename/texture Texture, number X1, number Y1, [number X2, number Y2, number alpha=1.0])&lt;br /&gt;
                    Draws a monochrome image using the current color&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageWidth(string Filename)&lt;br /&gt;
                    Gets image width&lt;br /&gt;
                    Returns: Image width, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageHeight(Image name)&lt;br /&gt;
                    Gets image height&lt;br /&gt;
                    Returns: Image height, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil flashScreen(number Red, number Green, number Blue)&lt;br /&gt;
                    Flashes the screen&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model loadModel(string Filename)&lt;br /&gt;
                    Loads the model - will not setup subsystem data, DO NOT USE FOR LOADING SHIP MODELS&lt;br /&gt;
                    Returns: Handle to a model&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasViewmode(enumeration)&lt;br /&gt;
                    Specifies if the current viemode has the specified flag, see VM_* enumeration&lt;br /&gt;
                    Returns: true if flag is present, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HookVariables (hv)===&lt;br /&gt;
Hook variables repository&lt;br /&gt;
&lt;br /&gt;
                string Globals[] number Index&lt;br /&gt;
                    Array of current HookVariable names&lt;br /&gt;
                    Returns: Hookvariable name, or empty string if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of HookVariables&lt;br /&gt;
                        Returns: Number of HookVariables&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mission (mn)===&lt;br /&gt;
Mission library&lt;br /&gt;
&lt;br /&gt;
                object getObjectFromSignature(number Signature)&lt;br /&gt;
                    Gets a handle of an object from its signature&lt;br /&gt;
                    Returns: Handle of object with signaure, invalid handle if signature is not in use&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean evaluateSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean runSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                asteroid Asteroids[] number Index&lt;br /&gt;
                    Gets asteroid&lt;br /&gt;
                    Returns: Asteroid handle, or invalid handle if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of asteroids in mission. Note that the value returned is only good until an asteroid is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of asteroids in the mission, or 0 if asteroids are not enabled&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                debris Debris[] number Index&lt;br /&gt;
                    Array of debris in the current mission&lt;br /&gt;
                    Returns: Debris handle, or invalid debris handle if index wasn&#039;t valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of debris pieces in the mission. Note that the value returned is only good until a piece of debris is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Current number of debris particles&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship EscortShips[] number Index&lt;br /&gt;
                    Gets escort ship at specified index on escort list&lt;br /&gt;
                    Returns: Specified ship, or invalid ship handle if invalid index&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of escort ships&lt;br /&gt;
                        Returns: Current number of escort ships&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                event Events[] number Index/string Name&lt;br /&gt;
                    Indexes events list&lt;br /&gt;
                    Returns: Event handle, or invalid event handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events in mission&lt;br /&gt;
                        Returns: Number of events in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sexpvariable SEXPVariables[] number Index/string Name&lt;br /&gt;
                    Array of SEXP variables. Note that you can set a sexp variable using the array, eg &#039;SEXPVariables[1] = &amp;quot;newvalue&amp;quot;&#039;&lt;br /&gt;
                    Returns: Handle to SEXP variable, or invalid sexpvariable handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of SEXP variables&lt;br /&gt;
                        Returns: Counts number of loaded SEXP Variables. May be slow.&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship Ships[] number Index/string Name&lt;br /&gt;
                    Gets ship&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ships in the mission. This function is somewhat slow, and should be set to a variable for use in looping situations. Note that the value returned is only good until a ship is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of ships in the mission, or 0 if ships haven&#039;t been initialized yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint Waypoints[] number Index&lt;br /&gt;
                    Array of waypoints in the current mission&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of waypoints in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoints in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypointlist WaypointLists[] number Index/string WaypointListName&lt;br /&gt;
                    Array of waypoint lists&lt;br /&gt;
                    Returns: Gets waypointlist handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of waypoint lists in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoint lists in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon Weapons[] number Index&lt;br /&gt;
                    Gets handle to a weapon object in the mission.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of weapon objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                beam Beams[] number Index&lt;br /&gt;
                    Gets handle to a beam object in the mission.&lt;br /&gt;
                    Returns: Beam handle, or invalid beam handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of beam objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of beam objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                wing Wings[] number Index/string WingName&lt;br /&gt;
                    Wings in the mission&lt;br /&gt;
                    Returns: Wing handle, or invalid wing handle if index or name was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of wings in mission&lt;br /&gt;
                        Returns: Number of wings in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship createShip([string Name, shipclass Class=Shipclass[1], orientation Orientation=null, vector Position={0,0,0}])&lt;br /&gt;
                    Creates a ship and returns a handle to it using the specified name, class, world orientation, and world position&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if ship couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint createWaypoint([vector Position, waypointlist List])&lt;br /&gt;
                    Creates a waypoint&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if waypoint couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon createWeapon([weaponclass Class=WeaponClass[1], orientation Orientation=null, world vector Position={0,0,0}, object Parent = nil, number Group = -1)&lt;br /&gt;
                    Creates a weapon and returns a handle to it. &#039;Group&#039; is used for lighting grouping purposes; for example, quad lasers would only need to act as one light source.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if weapon couldn&#039;t be created.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getMissionFilename()&lt;br /&gt;
                    Gets mission filename&lt;br /&gt;
                    Returns: Mission filename, or empty string if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean startMission([Filename or MISSION_* enumeration, Briefing = true])&lt;br /&gt;
                    Starts the defined mission&lt;br /&gt;
                    Returns: True, or false if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMissionTime()&lt;br /&gt;
                    Game time in seconds since the mission was started; is affected by time compression&lt;br /&gt;
                    Returns: Mission time (seconds), or 0 if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean loadMission(Mission name)&lt;br /&gt;
                    Loads a mission&lt;br /&gt;
                    Returns: True if mission was loaded, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unloadMission()&lt;br /&gt;
                    Stops the current mission and unloads it&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil simulateFrame()&lt;br /&gt;
                    Simulates mission frame&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil renderFrame()&lt;br /&gt;
                    Renders mission frame, but does not move anything&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BitOps (bit)===&lt;br /&gt;
Bitwise Operations library&lt;br /&gt;
&lt;br /&gt;
                number AND(number, number)&lt;br /&gt;
                    Values for which bitwise boolean AND operation is performed&lt;br /&gt;
                    Returns: Result of the AND operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number OR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean OR operation is performed&lt;br /&gt;
                    Returns: Result of the OR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number XOR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean XOR operation is performed&lt;br /&gt;
                    Returns: Result of the XOR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number toggleBit(number, number (bit))&lt;br /&gt;
                    Toggles the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean checkBit(number, number (bit))&lt;br /&gt;
                    Checks the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Was the bit true of false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number addBit(number, number (bit))&lt;br /&gt;
                    Performs inclusive or (OR) operation on the set bit of the value&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Tables (tb)===&lt;br /&gt;
Tables library&lt;br /&gt;
&lt;br /&gt;
                ship ShipClasses[] number Index/string Name&lt;br /&gt;
                    Array of ship classes&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ship classes&lt;br /&gt;
                        Returns: Number of ship classes, or 0 if ship classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon WeaponClasses[] number Index/string WeaponName&lt;br /&gt;
                    Array of weapon classes&lt;br /&gt;
                    Returns: Weapon class handle, or invalid weaponclass handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon classes&lt;br /&gt;
                        Returns: Number of weapon classes, or 0 if weapon classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing (ts)===&lt;br /&gt;
Experimental or testing stuff&lt;br /&gt;
&lt;br /&gt;
                nil avdTest()&lt;br /&gt;
                    Test the AVD Physics code&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                particle createParticle(vector Position, vector Velocity, number Lifetime, number Radius, enumeration Type, [number Tracer length=-1, boolean Reverse=false, texture Texture=Nil, object Attached Object=Nil])&lt;br /&gt;
                    Creates a particle. Use PARTICLE_* enumerations for type.Reverse reverse animation, if one is specifiedAttached object specifies object that Position will be (and always be) relative to.&lt;br /&gt;
                    Returns: Handle to the created particle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getStack()&lt;br /&gt;
                    Generates an ADE stackdump&lt;br /&gt;
                    Returns: Current Lua stack&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isCurrentPlayerMulti()&lt;br /&gt;
                    Returns whether current player is a multiplayer pilot or not.&lt;br /&gt;
                    Returns: Whether current player is a multiplayer pilot or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPXOEnabled()&lt;br /&gt;
                    Returns whether PXO is currently enabled in the configuration.&lt;br /&gt;
                    Returns: Whether PXO is enabled or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enumerations==&lt;br /&gt;
        ALPHABLEND_FILTER&lt;br /&gt;
        ALPHABLEND_NONE&lt;br /&gt;
        CFILE_TYPE_NORMAL&lt;br /&gt;
        CFILE_TYPE_MEMORY_MAPPED&lt;br /&gt;
        MOUSE_LEFT_BUTTON&lt;br /&gt;
        MOUSE_RIGHT_BUTTON&lt;br /&gt;
        MOUSE_MIDDLE_BUTTON&lt;br /&gt;
        ORDER_ATTACK&lt;br /&gt;
        ORDER_ATTACK_ANY&lt;br /&gt;
        ORDER_DEPART&lt;br /&gt;
        ORDER_DISABLE&lt;br /&gt;
        ORDER_DISARM&lt;br /&gt;
        ORDER_DOCK&lt;br /&gt;
        ORDER_EVADE&lt;br /&gt;
        ORDER_FLY_TO&lt;br /&gt;
        ORDER_FORM_ON_WING&lt;br /&gt;
        ORDER_GUARD&lt;br /&gt;
        ORDER_IGNORE_SHIP&lt;br /&gt;
        ORDER_KEEP_SAFE_DISTANCE&lt;br /&gt;
        ORDER_PLAY_DEAD&lt;br /&gt;
        ORDER_REARM&lt;br /&gt;
        ORDER_STAY_NEAR&lt;br /&gt;
        ORDER_STAY_STILL&lt;br /&gt;
        ORDER_UNDOCK&lt;br /&gt;
        ORDER_WAYPOINTS&lt;br /&gt;
        ORDER_WAYPOINTS_ONCE&lt;br /&gt;
        PARTICLE_DEBUG&lt;br /&gt;
        PARTICLE_BITMAP&lt;br /&gt;
        PARTICLE_FIRE&lt;br /&gt;
        PARTICLE_SMOKE&lt;br /&gt;
        PARTICLE_SMOKE2&lt;br /&gt;
        PARTICLE_PERSISTENT_BITMAP&lt;br /&gt;
        SEXPVAR_CAMPAIGN_PERSISTENT&lt;br /&gt;
        SEXPVAR_NOT_PERSISTENT&lt;br /&gt;
        SEXPVAR_PLAYER_PERSISTENT&lt;br /&gt;
        SEXPVAR_TYPE_NUMBER&lt;br /&gt;
        SEXPVAR_TYPE_STRING&lt;br /&gt;
        TEXTURE_STATIC&lt;br /&gt;
        TEXTURE_DYNAMIC&lt;br /&gt;
        LOCK&lt;br /&gt;
        UNLOCK&lt;br /&gt;
        NONE&lt;br /&gt;
        SHIELD_FRONT&lt;br /&gt;
        SHIELD_LEFT&lt;br /&gt;
        SHIELD_RIGHT&lt;br /&gt;
        SHIELD_BACK&lt;br /&gt;
        MISSION_REPEAT&lt;br /&gt;
        NORMAL_CONTROLS&lt;br /&gt;
        LUA_STEERING_CONTROLS&lt;br /&gt;
        LUA_FULL_CONTROLS&lt;br /&gt;
        NORMAL_BUTTON_CONTROLS&lt;br /&gt;
        LUA_ADDITIVE_BUTTON_CONTROL&lt;br /&gt;
        LUA_OVERRIDE_BUTTON_CONTROL&lt;br /&gt;
        VM_INTERNAL&lt;br /&gt;
        VM_EXTERNAL&lt;br /&gt;
        VM_TRACK&lt;br /&gt;
        VM_DEAD_VIEW&lt;br /&gt;
        VM_CHASE&lt;br /&gt;
        VM_OTHER_SHIP&lt;br /&gt;
        VM_EXTERNAL_CAMERA_LOCKED&lt;br /&gt;
        VM_WARP_CHASE&lt;br /&gt;
        VM_PADLOCK_UP&lt;br /&gt;
        VM_PADLOCK_REAR&lt;br /&gt;
        VM_PADLOCK_LEFT&lt;br /&gt;
        VM_PADLOCK_RIGHT&lt;br /&gt;
        VM_WARPIN_ANCHOR&lt;br /&gt;
        VM_TOPDOWN&lt;br /&gt;
        VM_FREECAMERA&lt;/div&gt;</summary>
		<author><name>Aginor</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38955</id>
		<title>Scripting functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Scripting_functions&amp;diff=38955"/>
		<updated>2012-07-13T12:47:53Z</updated>

		<summary type="html">&lt;p&gt;Aginor: Added a complete scripting.html. Needs format changes and links. But it is ready for editing remarks in.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains all the functions mentioned in the scripting.html file, including their syntax, remarks on their use and common errors modders may encounter when they use them.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Script Output - FSO v3.6.13 (FS2_Open Scripting)&lt;br /&gt;
&lt;br /&gt;
Conditional Hooks&lt;br /&gt;
&lt;br /&gt;
    Conditions&lt;br /&gt;
        State&lt;br /&gt;
        Campaign&lt;br /&gt;
        Mission&lt;br /&gt;
        Object Type&lt;br /&gt;
        Ship&lt;br /&gt;
        Ship class&lt;br /&gt;
        Ship type&lt;br /&gt;
        Weapon class&lt;br /&gt;
        KeyPress&lt;br /&gt;
        Version&lt;br /&gt;
        Application&lt;br /&gt;
    Actions&lt;br /&gt;
        On Game Init&lt;br /&gt;
        On Splash Screen&lt;br /&gt;
        On State Start&lt;br /&gt;
        On Frame&lt;br /&gt;
        On Key Pressed&lt;br /&gt;
        On Key Released&lt;br /&gt;
        On Mouse Moved&lt;br /&gt;
        On Mouse Pressed&lt;br /&gt;
        On Mouse Released&lt;br /&gt;
        On State End&lt;br /&gt;
        On Mission Start&lt;br /&gt;
        On HUD Draw&lt;br /&gt;
        On Ship Collision&lt;br /&gt;
        On Weapon Collision&lt;br /&gt;
        On Debris Collision&lt;br /&gt;
        On Asteroid Collision&lt;br /&gt;
        On Object Render&lt;br /&gt;
        On Warp In&lt;br /&gt;
        On Warp Out&lt;br /&gt;
        On Death&lt;br /&gt;
        On Mission End&lt;br /&gt;
        On Weapon Delete&lt;br /&gt;
        On Weapon Equipped&lt;br /&gt;
        On Weapon Fired&lt;br /&gt;
        On Weapon Selected&lt;br /&gt;
        On Weapon Deselected&lt;br /&gt;
        On Gameplay Start&lt;br /&gt;
        On Turret Fired&lt;br /&gt;
        On Primary Fire&lt;br /&gt;
        On Secondary Fire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scripting languages&lt;br /&gt;
    Lua&lt;br /&gt;
&lt;br /&gt;
Lua&lt;br /&gt;
&lt;br /&gt;
    Libraries&lt;br /&gt;
        Audio (ad) - Sound/Music Library &lt;br /&gt;
        Base (ba) - Base FreeSpace 2 functions &lt;br /&gt;
        CFile (cf) - CFile FS2 filesystem access &lt;br /&gt;
        Controls (io) - Controls library &lt;br /&gt;
        HUD (hu) - HUD library &lt;br /&gt;
        Graphics (gr) - Graphics Library &lt;br /&gt;
        HookVariables (hv) - Hook variables repository &lt;br /&gt;
        Mission (mn) - Mission library &lt;br /&gt;
        BitOps (bit) - Bitwise Operations library &lt;br /&gt;
        Tables (tb) - Tables library &lt;br /&gt;
        Testing (ts) - Experimental or testing stuff &lt;br /&gt;
    Types&lt;br /&gt;
        vector - Vector object &lt;br /&gt;
        orientation - Orientation matrix object &lt;br /&gt;
        enumeration - Enumeration object &lt;br /&gt;
        event - Mission event handle &lt;br /&gt;
        file - File handle &lt;br /&gt;
        font - font handle &lt;br /&gt;
        gameevent - Game event &lt;br /&gt;
        gamestate - Game state &lt;br /&gt;
        HudGauge - HUD Gauge handle &lt;br /&gt;
        eyepoint - Eyepoint handle &lt;br /&gt;
        model - 3D Model (POF) handle &lt;br /&gt;
        modeltextures_h - Array of materials &lt;br /&gt;
        eyepoints - Array of model eye points &lt;br /&gt;
        thrusters - The thrusters of a model &lt;br /&gt;
        thrusterbank - A model thrusterbank &lt;br /&gt;
        glowpoint - A model glowpoint &lt;br /&gt;
        order - order handle &lt;br /&gt;
        shiporders - Ship orders &lt;br /&gt;
        physics - Physics handle &lt;br /&gt;
        sexpvariable - SEXP Variable handle &lt;br /&gt;
        shields - Shields handle &lt;br /&gt;
        shiptype - Ship type handle &lt;br /&gt;
        species - Species handle &lt;br /&gt;
        team - Team handle &lt;br /&gt;
        texture - Texture handle &lt;br /&gt;
        material - Texture map, including diffuse, glow, and specular textures &lt;br /&gt;
        weaponclass - Weapon class handle &lt;br /&gt;
        collision info - Information about a collision &lt;br /&gt;
        object - Object handle &lt;br /&gt;
        asteroid - Asteroid handle &lt;br /&gt;
        shipclass - Ship class handle &lt;br /&gt;
        debris - Debris handle &lt;br /&gt;
        waypoint - waypoint handle &lt;br /&gt;
        waypointlist - waypointlist handle &lt;br /&gt;
        weaponbank - Ship/subystem weapons bank handle &lt;br /&gt;
        weaponbanktype - Ship/subsystem weapons bank type handle &lt;br /&gt;
        subsystem - Ship subsystem handle &lt;br /&gt;
        shiptextures - Ship textures handle &lt;br /&gt;
        ship - Ship handle &lt;br /&gt;
        weapon - Weapon handle &lt;br /&gt;
        beam - Beam handle &lt;br /&gt;
        wing - Wing handle &lt;br /&gt;
        player - Player handle &lt;br /&gt;
        camera - Camera handle &lt;br /&gt;
        soundentry - sounds.tbl table entry handle &lt;br /&gt;
        sound - sound instance handle &lt;br /&gt;
        3Dsound - 3D sound instance handle &lt;br /&gt;
        control info - control info handle &lt;br /&gt;
        particle - Handle to a particle &lt;br /&gt;
    Enumerations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        vector&lt;br /&gt;
            Vector object&lt;br /&gt;
&lt;br /&gt;
                number [] x,y,z or 1-3&lt;br /&gt;
                    Vector component&lt;br /&gt;
                    Returns: Value at index, or 0 if vector handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector + number/vector&lt;br /&gt;
                    Adds vector by another vector, or adds all axes by value&lt;br /&gt;
                    Returns: Final vector, or null vector if error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector - number/vector&lt;br /&gt;
                    Subtracts vector from another vector, or subtracts all axes by value&lt;br /&gt;
                    Returns: Final vector, or null vector if error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector * number/vector&lt;br /&gt;
                    Scales vector object (Multiplies all axes by number), or multiplies each axes by the other vector&#039;s axes.&lt;br /&gt;
                    Returns: Final vector, or null vector if error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector / number/vector&lt;br /&gt;
                    Scales vector object (Divide all axes by number), or divides each axes by the dividing vector&#039;s axes.&lt;br /&gt;
                    Returns: Final vector, or null vector if error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Converts a vector to string with format &amp;quot;(x,y,z)&amp;quot;&lt;br /&gt;
                    Returns: Vector as string, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getOrientation()&lt;br /&gt;
                    Returns orientation object representing the direction of the vector. Does not require vector to be normalized.&lt;br /&gt;
                    Returns: Orientation object, or null orientation object if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMagnitude()&lt;br /&gt;
                    Returns the magnitude of a vector (Total regardless of direction)&lt;br /&gt;
                    Returns: Magnitude of vector, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDistance(Vector)&lt;br /&gt;
                    Distance&lt;br /&gt;
                    Returns: Returns distance from another vector&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDotProduct(vector OtherVector)&lt;br /&gt;
                    Returns dot product of vector object with vector argument&lt;br /&gt;
                    Returns: Dot product, or 0 if a handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCrossProduct(vector OtherVector)&lt;br /&gt;
                    Returns cross product of vector object with vector argument&lt;br /&gt;
                    Returns: Cross product, or null vector if a handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number,number getScreenCoords()&lt;br /&gt;
                    Gets screen cordinates of a world vector&lt;br /&gt;
                    Returns: X (number), Y (number), or false if off-screen&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getNormalized()&lt;br /&gt;
                    Returns a normalized version of the vector&lt;br /&gt;
                    Returns: Normalized Vector, or NIL if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        orientation&lt;br /&gt;
            Orientation matrix object&lt;br /&gt;
&lt;br /&gt;
                number [] p,b,h or 1-9&lt;br /&gt;
                    Orientation component - pitch, bank, heading, or index into 3x3 matrix (1-9)&lt;br /&gt;
                    Returns: Number at the specified index, or 0 if index is invalid.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation * orientation&lt;br /&gt;
                    Multiplies two matrix objects)&lt;br /&gt;
                    Returns: matrix, or empty matrix if unsuccessful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Converts a matrix to a string with format &amp;quot;[r1c1 r2c1 r3c1 | r1c2 r2c2 r3c2| r1c3 r2c3 r3c3]&amp;quot;&lt;br /&gt;
                    Returns: Formatted string or &amp;quot;&lt;br /&gt;
                      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getInterpolated(orientation Final, number Factor)&lt;br /&gt;
                    Returns orientation that has been interpolated to Final by Factor (0.0-1.0)&lt;br /&gt;
                    Returns: Interpolated orientation, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation getTranspose()&lt;br /&gt;
                    Returns a transpose version of the specified orientation&lt;br /&gt;
                    Returns: Transpose matrix, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector rotateVector(vector Input)&lt;br /&gt;
                    Returns rotated version of given vector&lt;br /&gt;
                    Returns: Rotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector unrotateVector(vector Input)&lt;br /&gt;
                    Returns unrotated version of given vector&lt;br /&gt;
                    Returns: Unrotated vector, or empty vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        enumeration&lt;br /&gt;
            Enumeration object&lt;br /&gt;
&lt;br /&gt;
                enumeration = enumeration&lt;br /&gt;
                    Sets enumeration to specified value (if it is not a global&lt;br /&gt;
                    Returns: enumeration&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns enumeration name&lt;br /&gt;
                    Returns: Enumeration name, or &amp;quot;&amp;quot; if invalid&lt;br /&gt;
                      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        event&lt;br /&gt;
            Mission event handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Mission event name&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveText = string&lt;br /&gt;
                    Directive text&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string DirectiveKeypressText = string&lt;br /&gt;
                    Raw directive keypress text, as seen in FRED.&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Interval = number&lt;br /&gt;
                    Time for event to repeat (in seconds)&lt;br /&gt;
                    Value: Repeat time, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ObjectCount = number&lt;br /&gt;
                    Number of objects left for event&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RepeatCount = number&lt;br /&gt;
                    Event repeat count&lt;br /&gt;
                    Value: Repeat count, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Score = number&lt;br /&gt;
                    Event score&lt;br /&gt;
                    Value: Event score, or 0 if invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        file&lt;br /&gt;
            File handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil close()&lt;br /&gt;
                    Instantly closes file and invalidates all file handles&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean flush()&lt;br /&gt;
                    Flushes file buffer to disk.&lt;br /&gt;
                    Returns: True for success, false on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getPath()&lt;br /&gt;
                    Determines path of the given file&lt;br /&gt;
                    Returns: Path string of the file handle, or an empty string if it doesn&#039;t have one, or the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number or string, ... read(number or string, ...)&lt;br /&gt;
                    Reads part of or all of a file, depending on arguments passed. Based on basic Lua file:read function.Returns nil when the end of the file is reached.&lt;br /&gt;
&lt;br /&gt;
                        * &amp;quot;*n&amp;quot; - Reads a number.&lt;br /&gt;
                        * &amp;quot;*a&amp;quot; - Reads the rest of the file and returns it as a string.&lt;br /&gt;
                        * &amp;quot;*l&amp;quot; - Reads a line. Skips the end of line markers.&lt;br /&gt;
                        * (number) - Reads given number of characters, then returns them as a string.&lt;br /&gt;
&lt;br /&gt;
                    Returns: Requested data, or nil if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number seek([string Whence=&amp;quot;cur&amp;quot;, number Offset=0])&lt;br /&gt;
                  # Changes position of file, or gets location.Whence can be:&amp;quot;set&amp;quot; - File start.&lt;br /&gt;
                  # &amp;quot;cur&amp;quot; - Current position in file.&lt;br /&gt;
                  # &amp;quot;end&amp;quot; - File end.&lt;br /&gt;
                    Returns: new offset, or false or nil on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number write(string or number, ...)&lt;br /&gt;
                    Writes a series of Lua strings or numbers to the current file.&lt;br /&gt;
                    Returns: Number of items successfully written.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        font&lt;br /&gt;
            font handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Filename of font&lt;br /&gt;
                    Returns: Font filename, or an empty string if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Filename of font (including extension)&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Height = number&lt;br /&gt;
                    Height of font (in pixels)&lt;br /&gt;
                    Value: Font height, or 0 if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        gameevent&lt;br /&gt;
            Game event&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Returns: Game event name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Game event name&lt;br /&gt;
                    Value: Game event name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        gamestate&lt;br /&gt;
            Game state&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Game state name&lt;br /&gt;
                    Returns: Game state name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Game state name&lt;br /&gt;
                    Value: Game state name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        HudGauge&lt;br /&gt;
            HUD Gauge handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Custom HUD Gauge name&lt;br /&gt;
                    Value: Custom HUD Gauge name, or nil if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Text = string&lt;br /&gt;
                    Custom HUD Gauge text&lt;br /&gt;
                    Value: Custom HUD Gauge text, or nil if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        eyepoint&lt;br /&gt;
            Eyepoint handle&lt;br /&gt;
&lt;br /&gt;
                vector Normal = vector&lt;br /&gt;
                    Eyepoint normal&lt;br /&gt;
                    Value: Eyepoint normal, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Eyepoint location (Local vector)&lt;br /&gt;
                    Value: Eyepoint location, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean IsValid()&lt;br /&gt;
                    Detect whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        model&lt;br /&gt;
            3D Model (POF) handle&lt;br /&gt;
&lt;br /&gt;
                modeltextures_h Textures = modeltextures_h&lt;br /&gt;
                    Model textures&lt;br /&gt;
                    Value: Model textures, or an invalid modeltextures handle if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusters Thrusters = thrusters&lt;br /&gt;
                    Model thrusters&lt;br /&gt;
                    Value: Thrusters of the model or invalid handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoints Eyepoints = eyepoints&lt;br /&gt;
                    Model eyepoints&lt;br /&gt;
                    Value: Array of eyepoints or invalid handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMax = vector&lt;br /&gt;
                    Model bounding box maximum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector BoundingBoxMin = vector&lt;br /&gt;
                    Model bounding box minimum&lt;br /&gt;
                    Value: Model bounding box, or an empty vector if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Filename = string&lt;br /&gt;
                    Model filename&lt;br /&gt;
                    Value: Model filename, or an empty string if the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Model mass&lt;br /&gt;
                    Value: Model mass, or 0 if the model handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation MomentOfInertia = orientation&lt;br /&gt;
                    Model moment of inertia&lt;br /&gt;
                    Value: Moment of Inertia matrix or identity matrix if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    Model radius (Used for collision &amp;amp; culling detection)&lt;br /&gt;
                    Value: Model Radius or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        modeltextures_h&lt;br /&gt;
            Array of materials&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on model&lt;br /&gt;
                    Returns: Number of model textures&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] texture&lt;br /&gt;
                    number Index/string TextureName&lt;br /&gt;
                    Returns: Model textures, or invalid modeltextures handle if model handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        eyepoints&lt;br /&gt;
            Array of model eye points&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Gets the number of eyepoints on this model&lt;br /&gt;
                    Returns: Number of eyepoints on this model or 0 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                eyepoint [] eyepoint&lt;br /&gt;
                    Gets en eyepoint handle&lt;br /&gt;
                    Returns: eye handle or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid or not&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        thrusters&lt;br /&gt;
            The thrusters of a model&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thruster banks on the model&lt;br /&gt;
                    Returns: Number of thrusterbanks&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                thrusterbank [] number Index&lt;br /&gt;
                    Array of all thrusterbanks on this thruster&lt;br /&gt;
                    Returns: Handle to the thrusterbank or invalid handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        thrusterbank&lt;br /&gt;
            A model thrusterbank&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of thrusters on this thrusterbank&lt;br /&gt;
                    Returns: Number of thrusters on this bank or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                glowpoint [] number Index&lt;br /&gt;
                    Array of glowpoint&lt;br /&gt;
                    Returns: Glowpoint, or invalid glowpoint handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detectes if this handle is valid&lt;br /&gt;
                    Returns: true if this handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        glowpoint&lt;br /&gt;
            A model glowpoint&lt;br /&gt;
&lt;br /&gt;
                vector Position&lt;br /&gt;
                    The (local) vector to the position of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius&lt;br /&gt;
                    The radius of the glowpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Returns wether this handle is valid or not&lt;br /&gt;
                    Returns: True if handle is valid, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        order&lt;br /&gt;
            order handle&lt;br /&gt;
&lt;br /&gt;
                boolean remove()&lt;br /&gt;
                    Removes the given order from the ship&#039;s priority queue.&lt;br /&gt;
                    Returns: True if order was successfully removed, otherwise false or nil.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        shiporders&lt;br /&gt;
            Ship orders&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                order [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship orders&lt;br /&gt;
                    Returns: Order, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        physics&lt;br /&gt;
            Physics handle&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerAccelerationTime = number&lt;br /&gt;
                    Afterburner acceleration time&lt;br /&gt;
                    Value: Afterburner acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector AfterburnerVelocityMax = vector&lt;br /&gt;
                    Afterburner max velocity (Local vector)&lt;br /&gt;
                    Value: Afterburner max velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number BankingConstant = number&lt;br /&gt;
                    Banking constant&lt;br /&gt;
                    Value: Banking constant, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardAccelerationTime = number&lt;br /&gt;
                    Forward acceleration time&lt;br /&gt;
                    Value: Forward acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardDecelerationTime = number&lt;br /&gt;
                    Forward deceleration time&lt;br /&gt;
                    Value: Forward decleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardThrust = number&lt;br /&gt;
                    Forward thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Forward thrust, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Object mass&lt;br /&gt;
                    Value: Object mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocity = vector&lt;br /&gt;
                    Rotational velocity (Local vector)&lt;br /&gt;
                    Value: Rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDamping = number&lt;br /&gt;
                    Rotational damping, ie derivative of rotational speed&lt;br /&gt;
                    Value: Rotational damping, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number RotationalVelocityDesired = lvector&lt;br /&gt;
                    Desired rotational velocity&lt;br /&gt;
                    Value: Desired rotational velocity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector RotationalVelocityMax = vector&lt;br /&gt;
                    Maximum rotational velocity (Local vector)&lt;br /&gt;
                    Value: Maximum rotational velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShockwaveShakeAmplitude = number&lt;br /&gt;
                    How much shaking from shockwaves is applied to object&lt;br /&gt;
                    Value: Shockwave shake amplitude, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SideThrust = number&lt;br /&gt;
                    Side thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Side thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideAccelerationTime = number&lt;br /&gt;
                    Time to accelerate to maximum slide velocity&lt;br /&gt;
                    Value: Sliding acceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SlideDecelerationTime = number&lt;br /&gt;
                    Time to decelerate from maximum slide speed&lt;br /&gt;
                    Value: Sliding deceleration time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    Object world velocity (World vector)&lt;br /&gt;
                    Value: Object velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityDesired = vector&lt;br /&gt;
                    Desired velocity (World vector)&lt;br /&gt;
                    Value: Desired velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector VelocityMax = vector&lt;br /&gt;
                    Object max local velocity (Local vector)&lt;br /&gt;
                    Value: Maximum velocity, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number VerticalThrust = number&lt;br /&gt;
                    Vertical thrust amount (0-1), used primarily for thruster graphics&lt;br /&gt;
                    Value: Vertical thrust amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AfterburnerActive = boolean&lt;br /&gt;
                    Specifies if the afterburner is active or not&lt;br /&gt;
                    Value: true if afterburner is active false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: Detects whether handle is valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSpeed()&lt;br /&gt;
                    Gets total speed as of last frame&lt;br /&gt;
                    Returns: Total speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getForwardSpeed()&lt;br /&gt;
                    Gets total speed in the ship&#039;s &#039;forward&#039; direction as of last frame&lt;br /&gt;
                    Returns: Total forward speed, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isAfterburnerActive()&lt;br /&gt;
                    True if Afterburners are on, false or nil if not&lt;br /&gt;
                    Returns: Detects whether afterburner is active&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isGliding()&lt;br /&gt;
                    True if glide mode is on, false or nil if not&lt;br /&gt;
                    Returns: Detects if ship is gliding&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        sexpvariable&lt;br /&gt;
            SEXP Variable handle&lt;br /&gt;
&lt;br /&gt;
                enumeration Persistence = enumeration&lt;br /&gt;
                    SEXP Variable persistance, uses SEXPVAR_*_PERSISTENT enumerations&lt;br /&gt;
                    Value: SEXPVAR_*_PERSISTENT enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration Type = enumeration&lt;br /&gt;
                    SEXP Variable type, uses SEXPVAR_TYPE_* enumerations&lt;br /&gt;
                    Value: SEXPVAR_TYPE_* enumeration, or invalid numeration if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Value = number/string&lt;br /&gt;
                    SEXP variable value&lt;br /&gt;
                    Value: SEXP variable contents, or nil if the variable is of an invalid type or the handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns SEXP name&lt;br /&gt;
                    Returns: SEXP name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean delete()&lt;br /&gt;
                    Deletes a SEXP Variable&lt;br /&gt;
                    Returns: True if successful, false if the handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        shields&lt;br /&gt;
            Shields handle&lt;br /&gt;
&lt;br /&gt;
                number [] enumeration/number&lt;br /&gt;
                    Gets or sets shield quadrant strength. Use &amp;quot;SHIELD_*&amp;quot; enumeration or 1-4 for a specific quadrant, or NONE for the entire shield&lt;br /&gt;
                    Returns: Quadrant/shield strength, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedLeft = number&lt;br /&gt;
                    Total shield hitpoints left (for all quadrants combined)&lt;br /&gt;
                    Value: Combined shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CombinedMax = number&lt;br /&gt;
                    Maximum shield hitpoints (for all quadrants combined)&lt;br /&gt;
                    Value: Combined maximum shield strength, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        shiptype&lt;br /&gt;
            Ship type handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship type name&lt;br /&gt;
                    Value: Ship type name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        species&lt;br /&gt;
            Species handle&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Species name&lt;br /&gt;
                    Value: Species name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        team&lt;br /&gt;
            Team handle&lt;br /&gt;
&lt;br /&gt;
                boolean == team, team&lt;br /&gt;
                    Checks whether two teams are the same team&lt;br /&gt;
                    Returns: true if equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Team name&lt;br /&gt;
                    Value: Team name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getColor()&lt;br /&gt;
                    Gets the IFF color of the specified Team&lt;br /&gt;
                    Returns: rgb color for the specified team or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        texture&lt;br /&gt;
            Texture handle&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Auto-deletes texture&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean == texture, texture&lt;br /&gt;
                    Checks if two texture handles refer to the same texture&lt;br /&gt;
                    Returns: True if textures are equal&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number&lt;br /&gt;
                    Returns texture handle to specified frame number in current texture&#039;s animation.This means that [1] will always return the first frame in an animation, no matter what frame an animation is.You cannot change a texture animation frame.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unload()&lt;br /&gt;
                    Unloads a texture from memory&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns filename for texture&lt;br /&gt;
                    Returns: Filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWidth()&lt;br /&gt;
                    Gets texture width&lt;br /&gt;
                    Returns: Texture width, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getHeight()&lt;br /&gt;
                    Gets texture height&lt;br /&gt;
                    Returns: Texture height, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFPS()&lt;br /&gt;
                    Gets frames-per-second of texture&lt;br /&gt;
                    Returns: Texture FPS, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFramesLeft()&lt;br /&gt;
                    Gets number of frames left, from handle&#039;s position in animation&lt;br /&gt;
                    Returns: Frames left, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        material&lt;br /&gt;
            Texture map, including diffuse, glow, and specular textures&lt;br /&gt;
&lt;br /&gt;
                texture BaseMap = texture&lt;br /&gt;
                    Base texture&lt;br /&gt;
                    Value: Base texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture GlowMap = texture&lt;br /&gt;
                    Glow texture&lt;br /&gt;
                    Value: Glow texture, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture SpecularMap = texture&lt;br /&gt;
                    Specular texture&lt;br /&gt;
                    Value: Texture handle, or invalid texture handle if material handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        weaponclass&lt;br /&gt;
            Weapon class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Returns: Weapon class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Weapon class name&lt;br /&gt;
                    Value: Weapon class name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Title = string&lt;br /&gt;
                    Weapon class title&lt;br /&gt;
                    Value: Weapon class title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Weapon class description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechTitle = string&lt;br /&gt;
                    Weapon class tech title&lt;br /&gt;
                    Value: Tech title, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechAnimationFilename = string&lt;br /&gt;
                    Weapon class animation filename&lt;br /&gt;
                    Value: Filename, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Weapon class tech description string&lt;br /&gt;
                    Value: Description string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Weapon class model, or invalid model handle if weaponclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ArmorFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship hull (0-1.0)&lt;br /&gt;
                    Value: Armor factor, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Damage = number&lt;br /&gt;
                    Amount of damage that weapon deals&lt;br /&gt;
                    Value: Damage amount, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FireWait = number&lt;br /&gt;
                    Weapon fire wait (cooldown time) in seconds&lt;br /&gt;
                    Value: Fire wait time, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FreeFlightTime = number&lt;br /&gt;
                    The time the weapon will fly before turing onto its target&lt;br /&gt;
                    Value: Free flight time or emty string if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeMax = number&lt;br /&gt;
                    Life of weapon in seconds&lt;br /&gt;
                    Value: Life of weapon, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Range = number&lt;br /&gt;
                    Range of weapon in meters&lt;br /&gt;
                    Value: Weapon Range, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Mass = number&lt;br /&gt;
                    Weapon mass&lt;br /&gt;
                    Value: Weapon mass, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ShieldFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship shields (0-1.0)&lt;br /&gt;
                    Value: Shield damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SubsystemFactor = number&lt;br /&gt;
                    Amount of weapon damage applied to ship subsystems (0-1.0)&lt;br /&gt;
                    Value: Subsystem damage factor, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TargetLOD = number&lt;br /&gt;
                    LOD used for weapon model in the targeting computer&lt;br /&gt;
                    Value: LOD number, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Speed = number&lt;br /&gt;
                    Weapon max speed, aka $Velocity in weapons.tbl&lt;br /&gt;
                    Value: Weapon speed, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Bomb = boolean&lt;br /&gt;
                    Is weapon class flagged as bomb&lt;br /&gt;
                    Value: New flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getWeaponClassIndex()&lt;br /&gt;
                    Gets the index value of the weapon class&lt;br /&gt;
                    Returns: index value of the weapon class&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isLaser()&lt;br /&gt;
                    Return true if the weapon is a laser (this includes balistic primaries)&lt;br /&gt;
                    Returns: true if the weapon is a laser, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMissile()&lt;br /&gt;
                    Return true if the weapon is a missile&lt;br /&gt;
                    Returns: true if the weapon is a missile, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isBeam()&lt;br /&gt;
                    Return true if the weapon is a beam&lt;br /&gt;
                    Returns: true if the weapon is a beam, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        collision info&lt;br /&gt;
            Information about a collision&lt;br /&gt;
&lt;br /&gt;
                nil __gc&lt;br /&gt;
                    Removes the allocated reference of this handle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    The model this collision info is about&lt;br /&gt;
                    Value: The model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionDistance()&lt;br /&gt;
                    The distance to the closest collision point&lt;br /&gt;
                    Returns: distance or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPoint([boolean local])&lt;br /&gt;
                    The collision point of this information (local to the object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision point or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionNormal([boolean local])&lt;br /&gt;
                    The collision normal of this information (local to object if boolean is set to true)&lt;br /&gt;
                    Returns: The collision normal or nil of none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects if this handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        object&lt;br /&gt;
            Object handle&lt;br /&gt;
&lt;br /&gt;
                boolean == object, object&lt;br /&gt;
                    Checks whether two object handles are for the same object&lt;br /&gt;
                    Returns: True if equal, false if not or a handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of object (if any)&lt;br /&gt;
                    Returns: Object name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Parent = object&lt;br /&gt;
                    Parent of the object. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Parent handle, or invalid handle if object is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Object world position (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastPosition = vector&lt;br /&gt;
                    Object world position as of last frame (World vector)&lt;br /&gt;
                    Value: World position, or null vector if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Object world orientation (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation LastOrientation = orientation&lt;br /&gt;
                    Object world orientation as of last frame (World orientation)&lt;br /&gt;
                    Value: Orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                physics Physics = physics&lt;br /&gt;
                    Physics data used to move ship between frames&lt;br /&gt;
                    Value: Physics data, or invalid physics handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Hitpoints an object has left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shields Shields = shields&lt;br /&gt;
                    Shields&lt;br /&gt;
                    Value: Shields handle, or invalid shields handle if object handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getSignature()&lt;br /&gt;
                    Gets the object&#039;s unique signature&lt;br /&gt;
                    Returns: Returns the objects unique numeric signature, or -1 if invalid. useful for creating a metadata sytem&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getBreedName()&lt;br /&gt;
                    Gets object type&lt;br /&gt;
                    Returns: Object type name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CollisionGroups = number&lt;br /&gt;
                    Collision group data&lt;br /&gt;
                    Value: Current collision group signature. NOTE: This is a bitfield, NOT a normal number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getfvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current fvec.&lt;br /&gt;
                    Returns: Objects&#039; forward vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getuvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current uvec.&lt;br /&gt;
                    Returns: Objects&#039; up vector, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getrvec([boolean normalize])&lt;br /&gt;
                    Returns the objects&#039; current rvec.&lt;br /&gt;
                    Returns: Objects&#039; rvec, or nil if invalid. If called with a true argument, vector will be normalized.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector, collision info checkRayCollision(vector Start Point, vector End Point, [boolean Local])&lt;br /&gt;
                    Checks the collisions between the polygons of the current object and a ray&lt;br /&gt;
                    Returns: World collision point (local if boolean is set to true) and the specific collsision info, nil if no collisions&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        asteroid:object&lt;br /&gt;
            Asteroid handle&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Asteroid target object; may be object derivative, such as ship.&lt;br /&gt;
                    Value: Target object, or invalid handle if asteroid handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([ship killer=nil, wvector hitpos=nil])&lt;br /&gt;
                    Kills the asteroid. Set &amp;quot;killer&amp;quot; to designate a specific ship as having been the killer, and &amp;quot;hitpos&amp;quot; to specify the world position of the hit location; if nil, the asteroid center is used.&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        shipclass&lt;br /&gt;
            Ship class handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Returns: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship class name&lt;br /&gt;
                    Value: Ship class name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShortName = string&lt;br /&gt;
                    Ship class short name&lt;br /&gt;
                    Value: Ship short name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TypeString = string&lt;br /&gt;
                    Ship class type string&lt;br /&gt;
                    Value: Type string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManeuverabilityString = string&lt;br /&gt;
                    Ship class maneuverability string&lt;br /&gt;
                    Value: Maneuverability string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorString = string&lt;br /&gt;
                    Ship class armor string&lt;br /&gt;
                    Value: Armor string, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ManufacturerString = string&lt;br /&gt;
                    Ship class manufacturer&lt;br /&gt;
                    Value: Manufacturer, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Description = string&lt;br /&gt;
                    Ship class description&lt;br /&gt;
                    Value: Description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string TechDescription = string&lt;br /&gt;
                    Ship class tech description&lt;br /&gt;
                    Value: Tech description, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresMax = number&lt;br /&gt;
                    Maximum number of countermeasures the ship can carry&lt;br /&gt;
                    Value: Countermeasure capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model Model = model&lt;br /&gt;
                    Model&lt;br /&gt;
                    Value: Ship class model, or invalid model handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model CockpitModel = model&lt;br /&gt;
                    Model used for first-person cockpit&lt;br /&gt;
                    Value: Cockpit model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Ship class hitpoints&lt;br /&gt;
                    Value: Hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                species Species = Species&lt;br /&gt;
                    Ship class species&lt;br /&gt;
                    Value: Ship class species, or invalid species handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptype Type = shiptype&lt;br /&gt;
                    Ship class type&lt;br /&gt;
                    Value: Ship type, or invalid handle if shipclass handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isInTechroom()&lt;br /&gt;
                    Gets whether or not the ship class is available in the techroom&lt;br /&gt;
                    Returns: Whether ship has been revealed in the techroom, false if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel(X1, Y1, X2, Y2, [Rotation %, Pitch %, Bank %, Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renderTechModel2(X1, Y1, X2, Y2, orientation Orientation=null, [Zoom multiplier])&lt;br /&gt;
                    Draws ship model as if in techroom&lt;br /&gt;
                    Returns: Whether ship was rendered&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isModelLoaded([boolean Load = false])&lt;br /&gt;
                    Checks if the model used for this shipclass is loaded or not and optionally loads the model, which might be a slow operation.&lt;br /&gt;
                    Returns: If the model is loaded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getShipClassIndex()&lt;br /&gt;
                    Gets the index valus of the ship class&lt;br /&gt;
                    Returns: index value of the ship class&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        debris:object&lt;br /&gt;
            Debris handle&lt;br /&gt;
&lt;br /&gt;
                boolean IsHull = boolean&lt;br /&gt;
                    Whether or not debris is a piece of hull&lt;br /&gt;
                    Value: Whether debris is a hull fragment, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass OriginClass = shipclass&lt;br /&gt;
                    The shipclass of the ship this debris originates from&lt;br /&gt;
                    Value: The shipclass of the ship that created this debris&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDebrisRadius()&lt;br /&gt;
                    The radius of this debris piece&lt;br /&gt;
                    Returns: The radius of this debris piece or -1 if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Return if this debris handle is valid&lt;br /&gt;
                    Returns: true if valid false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        waypoint:object&lt;br /&gt;
            waypoint handle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        waypointlist&lt;br /&gt;
            waypointlist handle&lt;br /&gt;
&lt;br /&gt;
                waypoint [] number Index&lt;br /&gt;
                    Array of waypoints that are part of the waypoint list&lt;br /&gt;
                    Returns: Waypoint, or invalid handle if the index or waypointlist handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of waypoints in the list. Note that the value returned cannot be relied on for more than one frame.&lt;br /&gt;
                    Returns: Number of waypoints in the list, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Name of WaypointList&lt;br /&gt;
                    Value: Waypointlist name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        weaponbank&lt;br /&gt;
            Ship/subystem weapons bank handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass WeaponClass = weaponclass&lt;br /&gt;
                    Class of weapon mounted in the bank&lt;br /&gt;
                    Value: Weapon class, or an invalid weaponclass handle if bank handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoLeft = number&lt;br /&gt;
                    Ammo left for the current bank&lt;br /&gt;
                    Value: Ammo left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AmmoMax = number&lt;br /&gt;
                    Maximum ammo for the current bank&lt;br /&gt;
                    Value: Ammo capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Armed = boolean&lt;br /&gt;
                    Weapon armed status. Does not take linking into account.&lt;br /&gt;
                    Value: True if armed, false if unarmed or handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        weaponbanktype&lt;br /&gt;
            Ship/subsystem weapons bank type handle&lt;br /&gt;
&lt;br /&gt;
                weaponbank [] number Index&lt;br /&gt;
                    Array of weapon banks&lt;br /&gt;
                    Returns: Weapon bank, or invalid handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Linked = boolean&lt;br /&gt;
                    Whether bank is in linked or unlinked fire mode (Primary-only)&lt;br /&gt;
                    Value: Link status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DualFire = boolean&lt;br /&gt;
                    Whether bank is in dual fire mode (Secondary-only)&lt;br /&gt;
                    Value: Dual fire status, or false if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of weapons in the mounted bank&lt;br /&gt;
                    Returns: Number of bank weapons, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        subsystem&lt;br /&gt;
            Ship subsystem handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Returns name of subsystem&lt;br /&gt;
                    Returns: Subsystem name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSIntensity = number&lt;br /&gt;
                    Subsystem AWACS intensity&lt;br /&gt;
                    Value: AWACS intensity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AWACSRadius = number&lt;br /&gt;
                    Subsystem AWACS radius&lt;br /&gt;
                    Value: AWACS radius, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    Orientation of subobject or turret base&lt;br /&gt;
                    Value: Subsystem orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation GunOrientation = orientation&lt;br /&gt;
                    Orientation of turret gun&lt;br /&gt;
                    Value: Gun orientation, or null orientation if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsLeft = number&lt;br /&gt;
                    Subsystem hitpoints left&lt;br /&gt;
                    Value: Hitpoints left, or 0 if handle is invalid. Setting a value of 0 will disable it - set a value of -1 or lower to actually blow it up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Subsystem hitpoints max&lt;br /&gt;
                    Value: Max hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    Subsystem position with regards to main ship (Local Vector)&lt;br /&gt;
                    Value: Subsystem position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector GunPosition = vector&lt;br /&gt;
                    Subsystem gun position with regards to main ship (Local vector)&lt;br /&gt;
                    Value: Gun position, or null vector if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Subsystem name&lt;br /&gt;
                    Value: Subsystem name, or an empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getModelName()&lt;br /&gt;
                    Returns the original name of the subsystem in the model file&lt;br /&gt;
                    Returns: name or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary banks, or invalid weaponbanktype handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Object targetted by this subsystem. If used to set a new target, AI targeting will be switched off.&lt;br /&gt;
                    Value: Targeted object, or invalid object handle if subsystem handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretResets = boolean&lt;br /&gt;
                    Specifies wether this turrets resets after a certain time of inactivity&lt;br /&gt;
                    Value: true if turret resets, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurretResetDelay = number&lt;br /&gt;
                    The time (in milliseconds) after that the turret resets itself&lt;br /&gt;
                    Value: Reset delay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TurnRate = number&lt;br /&gt;
                    The turn rate&lt;br /&gt;
                    Value: Turnrate or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean TurretLocked = boolean&lt;br /&gt;
                    Whether the turret is locked. Setting to true locks the turret, setting to false frees it.&lt;br /&gt;
                    Value: True if turret is locked, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number NextFireTimestamp = number&lt;br /&gt;
                    The next time the turret may attempt to fire&lt;br /&gt;
                    Value: Mission time (seconds) or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean targetingOverride(boolean)&lt;br /&gt;
                    If set to true, AI targeting for this turret is switched off. If set to false, the AI will take over again.&lt;br /&gt;
                    Returns: Returns true if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasFired()&lt;br /&gt;
                    Determine if a subsystem has fired&lt;br /&gt;
                    Returns: true if if fired, false if not fired, or nil if invalid. resets fired flag when called.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isTurret()&lt;br /&gt;
                    Determines if this subsystem is a turret&lt;br /&gt;
                    Returns: true if subsystem is turret, false otherwise or nil on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil fireWeapon([Turret weapon index = 1, Flak range = 100])&lt;br /&gt;
                    Fires weapon on turret&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rotateTurret(vector Pos[, boolean reset=false)&lt;br /&gt;
                    Rotates the turret to face Pos or resets the turret to its original state&lt;br /&gt;
                    Returns: true on success false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getTurretHeading()&lt;br /&gt;
                    Returns the turrets forward vector&lt;br /&gt;
                    Returns: Returns a normalized version of the forward vector or null vector on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number getFOVs()&lt;br /&gt;
                    Returns current turrets FOVs&lt;br /&gt;
                    Returns: Standard FOV, maximum barrel elevation, turret base fov.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                matrix getTurretMatrix()&lt;br /&gt;
                    Returns current subsystems turret matrix&lt;br /&gt;
                    Returns: Turret matrix.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        shiptextures&lt;br /&gt;
            Ship textures handle&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of textures on ship&lt;br /&gt;
                    Returns: Number of textures on ship, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture [] number Index/string TextureFilename&lt;br /&gt;
                    Array of ship textures&lt;br /&gt;
                    Returns: Texture, or invalid texture handle on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ship:object&lt;br /&gt;
            Ship handle&lt;br /&gt;
&lt;br /&gt;
                subsystem [] string Name/number Index&lt;br /&gt;
                    Array of ship subsystems&lt;br /&gt;
                    Returns: Subsystem handle, or invalid subsystem handle if index or ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of subsystems on ship&lt;br /&gt;
                    Returns: Subsystem number, or 0 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ShieldArmorClass = string&lt;br /&gt;
                    Current Armor class of the ships&#039; shield&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string ArmorClass = string&lt;br /&gt;
                    Current Armor class&lt;br /&gt;
                    Value: Armor class name, or empty string if none is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    Ship name&lt;br /&gt;
                    Value: Ship name, or empty string if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelLeft = number&lt;br /&gt;
                    Afterburner fuel left&lt;br /&gt;
                    Value: Afterburner fuel left, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number AfterburnerFuelMax = number&lt;br /&gt;
                    Afterburner fuel capacity&lt;br /&gt;
                    Value: Afterburner fuel capacity, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shipclass Class = shipclass&lt;br /&gt;
                    Ship class&lt;br /&gt;
                    Value: Ship class, or invalid shipclass handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasuresLeft = number&lt;br /&gt;
                    Number of countermeasures left&lt;br /&gt;
                    Value: Countermeasures left, or 0 if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponclass CountermeasureClass = weaponclass&lt;br /&gt;
                    Weapon class mounted on this ship&#039;s countermeasure point&lt;br /&gt;
                    Value: Countermeasure hardpoint weapon class, or invalid weaponclass handle if no countermeasure class or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number HitpointsMax = number&lt;br /&gt;
                    Total hitpoints&lt;br /&gt;
                    Value: Ship maximum hitpoints, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyLeft = number&lt;br /&gt;
                    Current weapon energy reserves&lt;br /&gt;
                    Value: Ship current weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number WeaponEnergyMax = number&lt;br /&gt;
                    Maximum weapon energy&lt;br /&gt;
                    Value: Ship maximum weapon energy reserve level, or 0 if invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean PrimaryTriggerDown = boolean&lt;br /&gt;
                    Determines if primary trigger is pressed or not&lt;br /&gt;
                    Value: True if pressed, false if not, nil if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype PrimaryBanks = weaponbanktype&lt;br /&gt;
                    Array of primary weapon banks&lt;br /&gt;
                    Value: Primary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype SecondaryBanks = weaponbanktype&lt;br /&gt;
                    Array of secondary weapon banks&lt;br /&gt;
                    Value: Secondary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weaponbanktype TertiaryBanks = weaponbanktype&lt;br /&gt;
                    Array of tertiary weapon banks&lt;br /&gt;
                    Value: Tertiary weapon banks, or invalid weaponbanktype handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of ship. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Target object, or invalid object handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Target subsystem of ship.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if no target or ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Ship&#039;s team&lt;br /&gt;
                    Value: Ship team, or invalid team handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                shiptextures Textures = shiptextures&lt;br /&gt;
                    Gets ship textures&lt;br /&gt;
                    Value: Ship textures, or invalid shiptextures handle if ship handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean FlagAffectedByGravity = boolean&lt;br /&gt;
                    Checks for the &amp;quot;affected-by-gravity&amp;quot; flag&lt;br /&gt;
                    Value: True if flag is set, false if flag is not set and nil on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean Disabled = boolean&lt;br /&gt;
                    The disabled state of this ship&lt;br /&gt;
                    Value: true if ship is diabled, false otherwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean kill([object Killer])&lt;br /&gt;
                    Kills the ship. Set &amp;quot;Killer&amp;quot; to the ship you are killing to self-destruct&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean addShipEffect(string name, int duration (in milliseconds))&lt;br /&gt;
                    Activates an effect for this ship. Effect names are defined in Post_processing.tbl, and need to be implemented in the main shader. This functions analogous to the ship-effect sexp. NOTE: only one effect can be active at any time, adding new effects will override effects already in progress. &lt;br /&gt;
                    Returns: Returns true if the effect was successfully added, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number hasShipExploded()&lt;br /&gt;
                    Checks if the ship explosion event has already happened&lt;br /&gt;
                    Returns: Returns 1 if first explosion timestamp is passed, 2 if second is passed, 0 otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fireCountermeasure()&lt;br /&gt;
                    Launches a countermeasure from the ship&lt;br /&gt;
                    Returns: Whether countermeasure was launched or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number firePrimary()&lt;br /&gt;
                    Fires ship primary bank(s)&lt;br /&gt;
                    Returns: Number of primary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number fireSecondary()&lt;br /&gt;
                    Fires ship secondary bank(s)&lt;br /&gt;
                    Returns: Number of secondary banks fired&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getAnimationDoneTime(number Type, number Subtype)&lt;br /&gt;
                    Gets time that animation will be done&lt;br /&gt;
                    Returns: Time (seconds), or 0 if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean clearOrders()&lt;br /&gt;
                    Clears a ship&#039;s orders list&lt;br /&gt;
                    Returns: True if successful, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean giveOrder(enumeration Order, [object Target=nil, subsystem TargetSubsystem=nil, number Priority=1.0])&lt;br /&gt;
                    Uses the goal code to execute orders&lt;br /&gt;
                    Returns: True if order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean doManeuver(number Duration, number Heading, number Pitch, number Bank, boolean Force Rotation, number Vertical, number Horizontal, number Forward, boolean Force Movement)&lt;br /&gt;
                    Sets ship maneuver over the defined time period&lt;br /&gt;
                    Returns: True if maneuver order was given, otherwise false or nil&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean triggerAnimation(string Type, [number Subtype, boolean Forwards])&lt;br /&gt;
                    Triggers an animation. Type is the string name of the animation type, Subtype is the subtype number, such as weapon bank #, and Forwards is boolean.&lt;br /&gt;
                    IMPORTANT: Function is in testing and should not be used with official mod releases&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpIn()&lt;br /&gt;
                    Warps ship in&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean warpOut()&lt;br /&gt;
                    Warps ship out&lt;br /&gt;
                    Returns: True if successful, or nil if ship handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isWarpingIn()&lt;br /&gt;
                    Checks if ship is warping in&lt;br /&gt;
                    Returns: True if the ship is warping in, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getEMP()&lt;br /&gt;
                    Returns the current emp effect strength acting on the object&lt;br /&gt;
                    Returns: Current EMP effect strength or NIL if object is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTimeUntilExplosion()&lt;br /&gt;
                    Returns the time in seconds until the ship explodes&lt;br /&gt;
                    Returns: Time until explosion or -1, if invalid handle or ship isn&#039;t exploding&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        weapon:object&lt;br /&gt;
            Weapon handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean DestroyedByWeapon = boolean&lt;br /&gt;
                    Whether weapon was destroyed by another weapon&lt;br /&gt;
                    Value: True if weapon was destroyed by another weapon, false if weapon was destroyed by another object or if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number LifeLeft = number&lt;br /&gt;
                    Weapon life left (in seconds)&lt;br /&gt;
                    Value: Life left (seconds) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FlakDetonationRange = number&lt;br /&gt;
                    Range at which flak will detonate (meters)&lt;br /&gt;
                    Value: Detonation range (meters) or 0 if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of weapon. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Weapon target, or invalid object handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentTurret = subsystem&lt;br /&gt;
                    Turret which fired this weapon.&lt;br /&gt;
                    Value: Turret subsystem handle, or an invalid handle if the weapon not fired from a turret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object HomingObject = object&lt;br /&gt;
                    Object that weapon will home in on. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;&lt;br /&gt;
                    Value: Object that weapon is homing in on, or an invalid object handle if weapon is not homing or the weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector HomingPosition = vector&lt;br /&gt;
                    Position that weapon will home in on (World vector)&lt;br /&gt;
                    Value: Homing point, or null vector if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem HomingSubsystem = subsystem&lt;br /&gt;
                    Subsystem that weapon will home in on.&lt;br /&gt;
                    Value: Homing subsystem, or invalid subsystem handle if weapon is not homing or weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                team Team = team&lt;br /&gt;
                    Weapon&#039;s team&lt;br /&gt;
                    Value: Weapon team, or invalid team handle if weapon handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isArmed([boolean Hit target])&lt;br /&gt;
                    Checks if the weapon is armed.&lt;br /&gt;
                    Returns: boolean value of the weapon arming status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation()&lt;br /&gt;
                    Returns the collision information for this weapon&lt;br /&gt;
                    Returns: The collision information or invalid handle if none&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        beam:object&lt;br /&gt;
            Beam handle&lt;br /&gt;
&lt;br /&gt;
                weaponclass Class = weaponclass&lt;br /&gt;
                    Weapon&#039;s class&lt;br /&gt;
                    Value: Weapon class, or invalid weaponclass handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastShot = vector&lt;br /&gt;
                    End point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector LastStart = vector&lt;br /&gt;
                    Start point of the beam&lt;br /&gt;
                    Value: vector or null vector if beam handle is not valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    Target of beam. Value may also be a deriviative of the &#039;object&#039; class, such as &#039;ship&#039;.&lt;br /&gt;
                    Value: Beam target, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is targeting.&lt;br /&gt;
                    Value: Target subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object ParentShip = object&lt;br /&gt;
                    Parent of the beam.&lt;br /&gt;
                    Value: Beam parent, or invalid object handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem ParentSubsystem = subsystem&lt;br /&gt;
                    Subsystem that beam is fired from.&lt;br /&gt;
                    Value: Parent subsystem, or invalid subsystem handle if beam handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getCollisionCount()&lt;br /&gt;
                    Get the number of collisions in frame.&lt;br /&gt;
                    Returns: Number of beam collisions&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getCollisionPosition(number)&lt;br /&gt;
                    Get the position of the defined collision.&lt;br /&gt;
                    Returns: World vector&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                collision info getCollisionInformation(number)&lt;br /&gt;
                    Get the collision information of the specified collision&lt;br /&gt;
                    Returns: handle to information or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object getCollisionObject(number)&lt;br /&gt;
                    Get the target of the defined collision.&lt;br /&gt;
                    Returns: Object the beam collided with&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isExitCollision(number)&lt;br /&gt;
                    Checks if the defined collision was exit collision.&lt;br /&gt;
                    Returns: True if the collision was exit collision, false if entry, nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getStartDirectionInfo()&lt;br /&gt;
                    Gets the start information about the direction. The vector is a normalized vector from LastStart showing the start direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getEndDirectionInfo()&lt;br /&gt;
                    Gets the end information about the direction. The vector is a normalized vector from LastStart showing the end direction of a slashing beam&lt;br /&gt;
                    Returns: The start direction or null vector if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        wing&lt;br /&gt;
            Wing handle&lt;br /&gt;
&lt;br /&gt;
                ship [] number Index&lt;br /&gt;
                    Array of ships in the wing&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invawing handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number #&lt;br /&gt;
                    Number of wings in mission&lt;br /&gt;
                    Returns: Number of wings in mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        player&lt;br /&gt;
            Player handle&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getName()&lt;br /&gt;
                    Gets current player name&lt;br /&gt;
                    Returns: Player name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCampaignFilename()&lt;br /&gt;
                    Gets current player campaign filename&lt;br /&gt;
                    Returns: Campaign name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getImageFilename()&lt;br /&gt;
                    Gets current player image filename&lt;br /&gt;
                    Returns: Player image filename, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMainHall()&lt;br /&gt;
                    Gets player&#039;s main hall number&lt;br /&gt;
                    Returns: Main hall index, or 1 if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getSquadronName()&lt;br /&gt;
                    Gets current player squad name&lt;br /&gt;
                    Returns: Squadron name, or empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        camera&lt;br /&gt;
            Camera handle&lt;br /&gt;
&lt;br /&gt;
                string (string)&lt;br /&gt;
                    Camera name&lt;br /&gt;
                    Returns: Camera name, or an empty string if handle is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    True if valid, false or nil if not&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string Name = string&lt;br /&gt;
                    New camera name&lt;br /&gt;
                    Value: Camera name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number FOV = number&lt;br /&gt;
                    New camera FOV (in radians)&lt;br /&gt;
                    Value: Camera FOV (in radians)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation Orientation = orientation&lt;br /&gt;
                    New camera orientation&lt;br /&gt;
                    Value: Camera orientation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    New camera position&lt;br /&gt;
                    Value: Camera position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Self = object&lt;br /&gt;
                    New mount object&lt;br /&gt;
                    Value: Camera object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem SelfSubsystem = subsystem&lt;br /&gt;
                    New mount object subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is mounted on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object Target = object&lt;br /&gt;
                    New target object&lt;br /&gt;
                    Value: Camera target object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                subsystem TargetSubsystem = subsystem&lt;br /&gt;
                    New target subsystem&lt;br /&gt;
                    Value: Subsystem that the camera is pointed at&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setFOV([number FOV, number Zoom Time, number Zoom Acceleration Time, number Zoom deceleration Time])&lt;br /&gt;
                    Sets camera FOV&lt;br /&gt;
                    FOV is the final field of view, in radians, of the camera.&lt;br /&gt;
                    Zoom Time is the total time to take zooming in or out.&lt;br /&gt;
                    Acceleration Time is the total time it should take the camera to get up to full zoom speed.&lt;br /&gt;
                    Deceleration Time is the total time it should take the camera to slow down from full zoom speed.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setOrientation([world orientation Orientation, number Rotation Time, number Acceleration Time, number Deceleration time])&lt;br /&gt;
                    Sets camera orientation and velocity data.&lt;br /&gt;
                    Orientation is the final orientation for the camera, after it has finished moving. If not specified, the camera will simply stop at its current orientation.&lt;br /&gt;
                    Rotation time is how long total, including acceleration, the camera should take to rotate. If it is not specified, the camera will jump to the specified orientation.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition([wvector Position, number Translation Time, number Acceleration Time, number Deceleration Time])&lt;br /&gt;
                    Sets camera position and velocity data.&lt;br /&gt;
                    Position is the final position for the camera. If not specified, the camera will simply stop at its current position.&lt;br /&gt;
                    Translation time is how long total, including acceleration, the camera should take to move. If it is not specified, the camera will jump to the specified position.&lt;br /&gt;
                    Acceleration time is how long it should take the camera to get &#039;up to speed&#039;. If not specified, the camera will instantly start moving.&lt;br /&gt;
                    Deceleration time is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        soundentry&lt;br /&gt;
            sounds.tbl table entry handle&lt;br /&gt;
&lt;br /&gt;
                number DefaultVolume = number&lt;br /&gt;
                    The default volume of this game sound&lt;br /&gt;
                    Value: Volume in the range from 1 to 0 or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getFilename()&lt;br /&gt;
                    Returns the filename of this sound&lt;br /&gt;
                    Returns: filename or empty string on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getDuration()&lt;br /&gt;
                    Gives the length of the sound in seconds.&lt;br /&gt;
                    Returns: the length, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number get3DValues(vector Postion[, number radius=0.0])&lt;br /&gt;
                    Computes the volume and the panning of the sound when it would be played from the specified position.&lt;br /&gt;
                    If range is given then the volume will diminish when the listener is withing that distance to the source.&lt;br /&gt;
                    The position of the listener is always the the current viewing position.&lt;br /&gt;
                    Returns: The volume and the panning, in that sequence, or both -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        sound&lt;br /&gt;
            sound instance handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of sound, from 100 to 100000&lt;br /&gt;
                    Value: Pitch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getRemainingTime()&lt;br /&gt;
                    The remaining time of this sound handle&lt;br /&gt;
                    Returns: Remaining time, or -1 on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setVolume(number)&lt;br /&gt;
                    Sets the volume of this sound instance&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPanning(number)&lt;br /&gt;
                    Sets the panning of this sound. Argument ranges from -1 for left to 1 for right&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setPosition(number[,boolean = true])&lt;br /&gt;
                    Sets the absolute position of the sound. If boolean argument is true then the value is given as a percentage&lt;br /&gt;
                    Returns: true if successfull, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean rewind(number)&lt;br /&gt;
                    Rewinds the sound by the given number of seconds&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean skip(number)&lt;br /&gt;
                    Skips the given number of seconds of the sound&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPlaying()&lt;br /&gt;
                    Specifies if this handle is currently playing&lt;br /&gt;
                    Returns: true if playing, false if otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean stop()&lt;br /&gt;
                    Stops the sound of this handle&lt;br /&gt;
                    Returns: true if succeeded, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether handle is valid&lt;br /&gt;
                    Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        3Dsound:sound&lt;br /&gt;
            3D sound instance handle&lt;br /&gt;
&lt;br /&gt;
                boolean updatePosition(vector Position[, number radius = 0.0])&lt;br /&gt;
                    Updates the given 3D sound with the specified position and an optional range value&lt;br /&gt;
                    Returns: true if succeesed, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        control info&lt;br /&gt;
            control info handle&lt;br /&gt;
&lt;br /&gt;
                number Pitch = number&lt;br /&gt;
                    Pitch of the player ship&lt;br /&gt;
                    Value: Pitch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Heading = number&lt;br /&gt;
                    Heading of the player ship&lt;br /&gt;
                    Value: Heading&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Bank = number&lt;br /&gt;
                    Bank of the player ship&lt;br /&gt;
                    Value: Bank&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Vertical = number&lt;br /&gt;
                    Vertical control of the player ship&lt;br /&gt;
                    Value: Vertical control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Sideways = number&lt;br /&gt;
                    Sideways control of the player ship&lt;br /&gt;
                    Value: Sideways control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Forward = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number ForwardCruise = number&lt;br /&gt;
                    Forward control of the player ship&lt;br /&gt;
                    Value: Forward&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number PrimaryCount = number&lt;br /&gt;
                    Number of primary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number SecondaryCount = number&lt;br /&gt;
                    Number of secondary weapons that will fire&lt;br /&gt;
                    Value: Number of weapons to fire, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number CountermeasureCount = number&lt;br /&gt;
                    Number of countermeasures that will launch&lt;br /&gt;
                    Value: Number of countermeasures to launch, or 0 if handle is invalid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearLuaButtonInfo()&lt;br /&gt;
                    Clears the lua button control info&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number getButtonInfo()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number accessButtonInfo(number, number, number, number)&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil useButtonControl(number, string)&lt;br /&gt;
                    Adds the defined button control to lua button control data, if number is -1 it tries to use the string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getButtonControlName(number)&lt;br /&gt;
                    Gives the name of the command corresponding with the given number&lt;br /&gt;
                    Returns: Name of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getButtonControlNumber(string)&lt;br /&gt;
                    Gives the number of the command corresponding with the given string&lt;br /&gt;
                    Returns: Number of the command&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean AllButtonPolling = boolean&lt;br /&gt;
                    Toggles the all button polling for lua&lt;br /&gt;
                    Value: If the all button polling is enabled or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number,number pollAllButtons()&lt;br /&gt;
                    Access the four bitfields containing the button info&lt;br /&gt;
                    Returns: Four bitfields&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        particle&lt;br /&gt;
            Handle to a particle&lt;br /&gt;
&lt;br /&gt;
                vector Position = vector&lt;br /&gt;
                    The current position of the particle (world vector)&lt;br /&gt;
                    Value: The current position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector Velocity = vector&lt;br /&gt;
                    The current velocity of the particle (world vector)&lt;br /&gt;
                    Value: The current velocity&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Age = number&lt;br /&gt;
                    The time this particle already lives&lt;br /&gt;
                    Value: The current age or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number MaximumLife = number&lt;br /&gt;
                    The time this particle can live&lt;br /&gt;
                    Value: The maximal life or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number Radius = number&lt;br /&gt;
                    The radius of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number TracerLength = number&lt;br /&gt;
                    The tracer legth of the particle&lt;br /&gt;
                    Value: The radius or -1 on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                object AttachedObject = object&lt;br /&gt;
                    The object this particle is attached to. If valid the position will be relativ to this object and the velocity will be ignored.&lt;br /&gt;
                    Value: Attached object or invalid object handle on error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isValid()&lt;br /&gt;
                    Detects whether this handle is valid&lt;br /&gt;
                    Returns: true if valid false if not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Audio (ad)&lt;br /&gt;
            Sound/Music Library&lt;br /&gt;
&lt;br /&gt;
                soundentry getSoundentry(string/number)&lt;br /&gt;
                    Return a sound entry matching the specified index or name. If you are using a number then the first valid index is 1&lt;br /&gt;
                    Returns: soundentry or invalid handle on error&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playSound(soundentry)&lt;br /&gt;
                    Plays the specified sound entry handle&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sound playLoopingSound(soundentry)&lt;br /&gt;
                    Plays the specified sound as a looping sound&lt;br /&gt;
                    Returns: A handle to the playing sound or invalid handle if playback failed&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                3Dsound play3DSound(soundentry[, vector source[, vector listener]])&lt;br /&gt;
                    Plays the specified sound entry handle. Source if by default 0, 0, 0 and listener is by default the current viewposition&lt;br /&gt;
                    Returns: A handle to the playing sound&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playGameSound(Sound index, [Panning (-1.0 left to 1.0 right), Volume %, Priority 0-3, Voice Message?])&lt;br /&gt;
                    Plays a sound from #Game Sounds in sounds.tbl. A priority of 0 indicates that the song must play; 1-3 will specify the maximum number of that sound that can be played&lt;br /&gt;
                    Returns: True if sound was played, false if not (Replaced with a sound instance object in the future)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean playInterfaceSound(Sound index)&lt;br /&gt;
                    Plays a sound from #Interface Sounds in sounds.tbl&lt;br /&gt;
                    Returns: True if sound was played, false if not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number playMusic(string Filename, [float volume = 1.0, bool looping = true])&lt;br /&gt;
                    Plays a music file using FS2Open&#039;s builtin music system. Volume should be in the 0.0 - 1.0 range, and is capped at 1.0. Files passed to this function are looped by default.&lt;br /&gt;
                    Returns: Audiohandle of the created audiostream, or -1 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil stopMusic(int audiohandle, [bool fade = false])&lt;br /&gt;
                    Stops a playing music file, provided audiohandle is valid&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Base (ba)&lt;br /&gt;
            Base FreeSpace 2 functions&lt;br /&gt;
&lt;br /&gt;
                nil print(string Message)&lt;br /&gt;
                    Prints a string&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil warning(string Message)&lt;br /&gt;
                    Displays a FreeSpace warning (debug build-only) message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil error(string Message)&lt;br /&gt;
                    Displays a FreeSpace error message with the string provided&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                orientation createOrientation([p/r1c1, b/r1c2, h/r1c3, r2c1, r2c2, r2c3, r3c1, r3c2, r3c3])&lt;br /&gt;
                    Given 0, 3, or 9 arguments, creates an orientation object with that orientation.&lt;br /&gt;
                    Returns: New orientation object, or null orientation on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector createVector([x, y, z])&lt;br /&gt;
                    Creates a vector object&lt;br /&gt;
                    Returns: Vector object&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getFrametime([Do not adjust for time compression (Boolean)])&lt;br /&gt;
                    Gets how long this frame is calculated to take. Use it to for animations, physics, etc to make incremental changes.&lt;br /&gt;
                    Returns: Frame time (seconds)&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                state getCurrentGameState([Depth (number)])&lt;br /&gt;
                    Gets current FreeSpace state; if a depth is specified, the state at that depth is returned. (IE at the in-game options game, a depth of 1 would give you the game state, while the function defaults to 0, which would be the options screen.&lt;br /&gt;
                    Returns: Current game state at specified depth, or invalid handle if no game state is active yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getCurrentMPStatus(NIL)&lt;br /&gt;
                    Gets this computers current MP status&lt;br /&gt;
                    Returns: Current MP status&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setControlMode(NIL or enumeration LE_*_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string setButtonControlMode(NIL or enumeration LE_*_BUTTON_CONTROL)&lt;br /&gt;
                    Sets the current control mode for the game.&lt;br /&gt;
                    Returns: Current control mode&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                control info getControlInfo()&lt;br /&gt;
                    Gets the control info handle.&lt;br /&gt;
                    Returns: control info handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean postGameEvent(gameevent Event)&lt;br /&gt;
                    Sets current game event. Note that you can crash FreeSpace 2 by posting an event at an improper time, so test extensively if you use it.&lt;br /&gt;
                    Returns: True if event was posted, false if passed event was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gameevent GameEvents[] number Index/string Name&lt;br /&gt;
                    Array of game events&lt;br /&gt;
                    Returns: Game event, or invalid gameevent handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events&lt;br /&gt;
                        Returns: Number of events&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                gamestate GameStates[] number Index/string Name&lt;br /&gt;
                    Array of game states&lt;br /&gt;
                    Returns: Game state, or invalid gamestate handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of states&lt;br /&gt;
                        Returns: Number of states&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        CFile (cf)&lt;br /&gt;
            CFile FS2 filesystem access&lt;br /&gt;
&lt;br /&gt;
                boolean deleteFile(string Filename, string Path)&lt;br /&gt;
                    Deletes given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if deleted, false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean fileExists(string Filename, [string Path = &amp;quot;&amp;quot;, boolean CheckVPs = false])&lt;br /&gt;
                    Checks if a file exists. Use a blank string for path for any directory, or a slash for the root directory.&lt;br /&gt;
                    Returns: True if file exists, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openFile(string Filename, [string Mode=&amp;quot;r&amp;quot;, string Path = &amp;quot;&amp;quot;])&lt;br /&gt;
                    Opens a file. &#039;Mode&#039; uses standard C fopen arguments. Use a blank string for path for any directory, or a slash for the root directory.Be EXTREMELY CAREFUL when using this function, as you may PERMANENTLY delete any file by accident&lt;br /&gt;
                    Returns: File handle, or invalid file handle if the specified file couldn&#039;t be opened&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                file openTempFile()&lt;br /&gt;
                    Opens a temp file that is automatically deleted when closed&lt;br /&gt;
                    Returns: File handle, or invalid file handle if tempfile couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean renameFile(string CurrentFilename, string NewFilename, string Path)&lt;br /&gt;
                    Renames given file. Path must be specified. Use a slash for the root directory.&lt;br /&gt;
                    Returns: True if file was renamed, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Controls (io)&lt;br /&gt;
            Controls library&lt;br /&gt;
&lt;br /&gt;
                number getMouseX()&lt;br /&gt;
                    Gets Mouse X pos&lt;br /&gt;
                    Returns: Mouse x position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMouseY()&lt;br /&gt;
                    Gets Mouse Y pos&lt;br /&gt;
                    Returns: Mouse y position, or 0 if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isMouseButtonDown({MOUSE_*_BUTTON enumeration}, [..., ...])&lt;br /&gt;
                    Returns whether the specified mouse buttons are up or down&lt;br /&gt;
                    Returns: Whether specified mouse buttons are down, or false if mouse is not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorImage(Image filename, [LOCK or UNLOCK])&lt;br /&gt;
                    Sets mouse cursor image, and allows you to lock/unlock the image. (A locked cursor may only be changed with the unlock parameter)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setCursorHidden(True to hide mouse, false to show it)&lt;br /&gt;
                    Shows or hides mouse cursor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean forceMousePosition(number, number (coordinates))&lt;br /&gt;
                    function to force mouse position&lt;br /&gt;
                    Returns: if the operation succeeded or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean MouseControlStatus = boolean&lt;br /&gt;
                    Gets and sets the retail mouse control status&lt;br /&gt;
                    Value: if the retail mouse is on or off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean updateTrackIR()&lt;br /&gt;
                    Updates Tracking Data. Call before using get functions&lt;br /&gt;
                    Returns: Checks if trackir is available and updates variables, returns true if successful, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRPitch()&lt;br /&gt;
                    Gets pitch axis from last update&lt;br /&gt;
                    Returns: Pitch value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRYaw()&lt;br /&gt;
                    Gets yaw axis from last update&lt;br /&gt;
                    Returns: Yaw value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRRoll()&lt;br /&gt;
                    Gets roll axis from last update&lt;br /&gt;
                    Returns: Roll value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRX()&lt;br /&gt;
                    Gets x position from last update&lt;br /&gt;
                    Returns: X value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRY()&lt;br /&gt;
                    Gets y position from last update&lt;br /&gt;
                    Returns: Y value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getTrackIRZ()&lt;br /&gt;
                    Gets z position from last update&lt;br /&gt;
                    Returns: Z value -1 to 1, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        HUD (hu)&lt;br /&gt;
            HUD library&lt;br /&gt;
&lt;br /&gt;
                boolean HUDDrawn = boolean&lt;br /&gt;
                    Current HUD draw status&lt;br /&gt;
                    Value: If the HUD is drawn or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setHUDGaugeColor(number (index number of the gauge), [number red, number green, number blue, number alpha])&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: If the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number, number, number, number getHUDGaugeColor(number (index number of the gauge))&lt;br /&gt;
                    Color used to draw the gauge&lt;br /&gt;
                    Returns: Red, green, blue, and alpha of the gauge&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                HudGauge getHUDGaugeHandle(string Name)&lt;br /&gt;
                    Returns a handle to a specified HUD gauge&lt;br /&gt;
                    Returns: HUD Gauge handle, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Graphics (gr)&lt;br /&gt;
            Graphics Library&lt;br /&gt;
&lt;br /&gt;
                camera Cameras[] number Index/string Name&lt;br /&gt;
                    Gets camera&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of cameras&lt;br /&gt;
                        Returns: Number of cameras&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font Fonts[] number Index/string Filename&lt;br /&gt;
                    Array of loaded fonts&lt;br /&gt;
                    Returns: Font handle, or invalid font handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of loaded fonts&lt;br /&gt;
                        Returns: Number of loaded fonts&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                font CurrentFont = font&lt;br /&gt;
                    Current font&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                enumeration CurrentOpacityType = enumeration&lt;br /&gt;
                    Current alpha blending type; uses ALPHABLEND_* enumerations&lt;br /&gt;
                    Value: (null)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture CurrentRenderTarget = texture&lt;br /&gt;
                    Current rendering target&lt;br /&gt;
                    Value: Current rendering target, or invalid texture handle if screen is render target&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil clearScreen([number Red, number green, number blue, number alpha])&lt;br /&gt;
                    Clears the screen to black, or the color specified.&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                camera createCamera(string Name, [wvector Position, orientation Orientation])&lt;br /&gt;
                    Creates a new camera using the specified position and orientation (World)&lt;br /&gt;
                    Returns: Camera handle, or invalid camera handle if camera couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenWidth()&lt;br /&gt;
                    Gets screen width&lt;br /&gt;
                    Returns: Width in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getScreenHeight()&lt;br /&gt;
                    Gets screen height&lt;br /&gt;
                    Returns: Height in pixels, or 0 if graphics are not initialized yet&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                vector getVectorFromCoords([number X=center, number Y=center, number Depth, boolean normalize = false])&lt;br /&gt;
                    Returns a vector through screen coordinates x and y. If depth is specified, vector is extended to Depth units into spaceIf normalize is true, vector will be normalized.&lt;br /&gt;
                    Returns: Vector, or zero vector on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setTarget([texture Texture])&lt;br /&gt;
                    If texture is specified, sets current rendering surface to a texture.Otherwise, sets rendering surface back to screen.&lt;br /&gt;
                    Returns: True if successful, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean setCamera([camera handle Camera])&lt;br /&gt;
                    Sets current camera, or resets camera if none specified&lt;br /&gt;
                    Returns: true if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil setColor(number Red, number Green, number Blue, [number Alpha])&lt;br /&gt;
                    Sets 2D drawing color; each color number should be from 0 (darkest) to 255 (brightest)&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCircle(number Radius, number X, number Y)&lt;br /&gt;
                    Draws a circle&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawCurve(number X, number Y, number Radius)&lt;br /&gt;
                    Draws a curve&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawGradientLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with the CurrentColor that steadily fades out&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawLine(number X1, number Y1, number X2, number Y2)&lt;br /&gt;
                    Draws a line from (x1,y1) to (x2,y2) with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPixel(number X, number Y)&lt;br /&gt;
                    Sets pixel to CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawPolygon(texture Texture, [vector Position={0,0,0}, orientation Orientation=null, number Width=1.0, number Height=1.0])&lt;br /&gt;
                    Draws a polygon&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil drawRectangle(number X1, number Y1, number X2, number Y2, [boolean Filled=true])&lt;br /&gt;
                    Draws a rectangle with CurrentColor&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawSphere([number Radius = 1.0, vector Position])&lt;br /&gt;
                    Draws a sphere with radius Radius at world vector Position&lt;br /&gt;
                    Returns: True if successful, false or nil otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModel(model, position, orientation)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, may not work properly in all scripting hooks.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                int drawModelOOR(model Model, vector Position, matrix Orientation, integer Flags)&lt;br /&gt;
                    Draws the given model with the specified position and orientation - Use with extreme care, designer to operate properly only in On Object Render hook.&lt;br /&gt;
                    Returns: Zero if successful, otherwise an integer error code&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number,number,number,number drawTargetingBrackets(object Object, [boolean draw=true, int padding=5])&lt;br /&gt;
                    Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.&lt;br /&gt;
                    Returns: Left, top, right, and bottom positions of the brackets, or nil if invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number drawString(string Message, [number X1, number Y1, number X2, number Y2])&lt;br /&gt;
                    Draws a string. Use x1/y1 to control position, x2/y2 to limit textbox size.Text will automatically move onto new lines, if x2/y2 is specified.Additionally, calling drawString with only a string argument will automaticallydraw that string below the previously drawn string (or 0,0 if no stringshave been drawn yet&lt;br /&gt;
                    Returns: Number of lines drawn, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getStringWidth(string String)&lt;br /&gt;
                    Gets string width&lt;br /&gt;
                    Returns: String width, or 0 on failure&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture createTexture([number Width=512, number Height=512, enumeration Type=TEXTURE_DYNAMIC])&lt;br /&gt;
                    Creates a texture for rendering to.Types are TEXTURE_STATIC - for infrequent rendering - and TEXTURE_DYNAMIC - for frequent rendering.&lt;br /&gt;
                    Returns: New texture handle, or invalid texture handle if texture couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                texture loadTexture(string Filename, [boolean LoadIfAnimation, boolean NoDropFrames])&lt;br /&gt;
                    Gets a handle to a texture. If second argument is set to true, animations will also be loaded.If third argument is set to true, every other animation frame will not be loaded if system has less than 48 MB memory.&lt;br /&gt;
                    IMPORTANT: Textures will not be unload themselves unless you explicitly tell them to do so.When you are done with a texture, call the Unload() function to free up memory.&lt;br /&gt;
                    Returns: Texture handle, or invalid texture handle if texture couldn&#039;t be loaded&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawImage(string Filename/texture Texture, [number X1=0, Y1=0, number X2, number Y2, number UVX1 = 0.0, number UVY1 = 0.0, number UVX2=1.0, number UVY2=1.0, number alpha=1.0])&lt;br /&gt;
                    Draws an image or texture. Any image extension passed will be ignored.The UV variables specify the UV value for each corner of the image. In UV coordinates, (0,0) is the top left of the image; (1,1) is the lower right.&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean drawMonochromeImage(string Filename/texture Texture, number X1, number Y1, [number X2, number Y2, number alpha=1.0])&lt;br /&gt;
                    Draws a monochrome image using the current color&lt;br /&gt;
                    Returns: Whether image was drawn&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageWidth(string Filename)&lt;br /&gt;
                    Gets image width&lt;br /&gt;
                    Returns: Image width, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getImageHeight(Image name)&lt;br /&gt;
                    Gets image height&lt;br /&gt;
                    Returns: Image height, or 0 if filename is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil flashScreen(number Red, number Green, number Blue)&lt;br /&gt;
                    Flashes the screen&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                model loadModel(string Filename)&lt;br /&gt;
                    Loads the model - will not setup subsystem data, DO NOT USE FOR LOADING SHIP MODELS&lt;br /&gt;
                    Returns: Handle to a model&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean hasViewmode(enumeration)&lt;br /&gt;
                    Specifies if the current viemode has the specified flag, see VM_* enumeration&lt;br /&gt;
                    Returns: true if flag is present, false otherwise&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        HookVariables (hv)&lt;br /&gt;
            Hook variables repository&lt;br /&gt;
&lt;br /&gt;
                string Globals[] number Index&lt;br /&gt;
                    Array of current HookVariable names&lt;br /&gt;
                    Returns: Hookvariable name, or empty string if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of HookVariables&lt;br /&gt;
                        Returns: Number of HookVariables&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Mission (mn)&lt;br /&gt;
            Mission library&lt;br /&gt;
&lt;br /&gt;
                object getObjectFromSignature(number Signature)&lt;br /&gt;
                    Gets a handle of an object from its signature&lt;br /&gt;
                    Returns: Handle of object with signaure, invalid handle if signature is not in use&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean evaluateSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean runSEXP(string)&lt;br /&gt;
                    Runs the defined SEXP script&lt;br /&gt;
                    Returns: if the operation was successful&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                asteroid Asteroids[] number Index&lt;br /&gt;
                    Gets asteroid&lt;br /&gt;
                    Returns: Asteroid handle, or invalid handle if invalid index specified&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of asteroids in mission. Note that the value returned is only good until an asteroid is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of asteroids in the mission, or 0 if asteroids are not enabled&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                debris Debris[] number Index&lt;br /&gt;
                    Array of debris in the current mission&lt;br /&gt;
                    Returns: Debris handle, or invalid debris handle if index wasn&#039;t valid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of debris pieces in the mission. Note that the value returned is only good until a piece of debris is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Current number of debris particles&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship EscortShips[] number Index&lt;br /&gt;
                    Gets escort ship at specified index on escort list&lt;br /&gt;
                    Returns: Specified ship, or invalid ship handle if invalid index&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of escort ships&lt;br /&gt;
                        Returns: Current number of escort ships&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                event Events[] number Index/string Name&lt;br /&gt;
                    Indexes events list&lt;br /&gt;
                    Returns: Event handle, or invalid event handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of events in mission&lt;br /&gt;
                        Returns: Number of events in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                sexpvariable SEXPVariables[] number Index/string Name&lt;br /&gt;
                    Array of SEXP variables. Note that you can set a sexp variable using the array, eg &#039;SEXPVariables[1] = &amp;quot;newvalue&amp;quot;&#039;&lt;br /&gt;
                    Returns: Handle to SEXP variable, or invalid sexpvariable handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Current number of SEXP variables&lt;br /&gt;
                        Returns: Counts number of loaded SEXP Variables. May be slow.&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship Ships[] number Index/string Name&lt;br /&gt;
                    Gets ship&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ships in the mission. This function is somewhat slow, and should be set to a variable for use in looping situations. Note that the value returned is only good until a ship is destroyed, and so cannot be relied on for more than one frame.&lt;br /&gt;
                        Returns: Number of ships in the mission, or 0 if ships haven&#039;t been initialized yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint Waypoints[] number Index&lt;br /&gt;
                    Array of waypoints in the current mission&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if index was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Gets number of waypoints in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoints in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypointlist WaypointLists[] number Index/string WaypointListName&lt;br /&gt;
                    Array of waypoint lists&lt;br /&gt;
                    Returns: Gets waypointlist handle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of waypoint lists in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of waypoint lists in the mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon Weapons[] number Index&lt;br /&gt;
                    Gets handle to a weapon object in the mission.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of weapon objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                beam Beams[] number Index&lt;br /&gt;
                    Gets handle to a beam object in the mission.&lt;br /&gt;
                    Returns: Beam handle, or invalid beam handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of beam objects in mission. Note that this is only accurate for one frame.&lt;br /&gt;
                        Returns: Number of beam objects in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                wing Wings[] number Index/string WingName&lt;br /&gt;
                    Wings in the mission&lt;br /&gt;
                    Returns: Wing handle, or invalid wing handle if index or name was invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of wings in mission&lt;br /&gt;
                        Returns: Number of wings in mission&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                ship createShip([string Name, shipclass Class=Shipclass[1], orientation Orientation=null, vector Position={0,0,0}])&lt;br /&gt;
                    Creates a ship and returns a handle to it using the specified name, class, world orientation, and world position&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if ship couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                waypoint createWaypoint([vector Position, waypointlist List])&lt;br /&gt;
                    Creates a waypoint&lt;br /&gt;
                    Returns: Waypoint handle, or invalid waypoint handle if waypoint couldn&#039;t be created&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon createWeapon([weaponclass Class=WeaponClass[1], orientation Orientation=null, world vector Position={0,0,0}, object Parent = nil, number Group = -1)&lt;br /&gt;
                    Creates a weapon and returns a handle to it. &#039;Group&#039; is used for lighting grouping purposes; for example, quad lasers would only need to act as one light source.&lt;br /&gt;
                    Returns: Weapon handle, or invalid weapon handle if weapon couldn&#039;t be created.&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getMissionFilename()&lt;br /&gt;
                    Gets mission filename&lt;br /&gt;
                    Returns: Mission filename, or empty string if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean startMission([Filename or MISSION_* enumeration, Briefing = true])&lt;br /&gt;
                    Starts the defined mission&lt;br /&gt;
                    Returns: True, or false if the function fails&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number getMissionTime()&lt;br /&gt;
                    Game time in seconds since the mission was started; is affected by time compression&lt;br /&gt;
                    Returns: Mission time (seconds), or 0 if game is not in a mission&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean loadMission(Mission name)&lt;br /&gt;
                    Loads a mission&lt;br /&gt;
                    Returns: True if mission was loaded, otherwise false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil unloadMission()&lt;br /&gt;
                    Stops the current mission and unloads it&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil simulateFrame()&lt;br /&gt;
                    Simulates mission frame&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                nil renderFrame()&lt;br /&gt;
                    Renders mission frame, but does not move anything&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        BitOps (bit)&lt;br /&gt;
            Bitwise Operations library&lt;br /&gt;
&lt;br /&gt;
                number AND(number, number)&lt;br /&gt;
                    Values for which bitwise boolean AND operation is performed&lt;br /&gt;
                    Returns: Result of the AND operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number OR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean OR operation is performed&lt;br /&gt;
                    Returns: Result of the OR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number XOR(number, number)&lt;br /&gt;
                    Values for which bitwise boolean XOR operation is performed&lt;br /&gt;
                    Returns: Result of the XOR operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number toggleBit(number, number (bit))&lt;br /&gt;
                    Toggles the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean checkBit(number, number (bit))&lt;br /&gt;
                    Checks the value of the set bit in the given number for 32 bit integer&lt;br /&gt;
                    Returns: Was the bit true of false&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                number addBit(number, number (bit))&lt;br /&gt;
                    Performs inclusive or (OR) operation on the set bit of the value&lt;br /&gt;
                    Returns: Result of the operation&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Tables (tb)&lt;br /&gt;
            Tables library&lt;br /&gt;
&lt;br /&gt;
                ship ShipClasses[] number Index/string Name&lt;br /&gt;
                    Array of ship classes&lt;br /&gt;
                    Returns: Ship handle, or invalid ship handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of ship classes&lt;br /&gt;
                        Returns: Number of ship classes, or 0 if ship classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                weapon WeaponClasses[] number Index/string WeaponName&lt;br /&gt;
                    Array of weapon classes&lt;br /&gt;
                    Returns: Weapon class handle, or invalid weaponclass handle if index is invalid&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    number #&lt;br /&gt;
                        Number of weapon classes&lt;br /&gt;
                        Returns: Number of weapon classes, or 0 if weapon classes haven&#039;t been loaded yet&lt;br /&gt;
                         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Testing (ts)&lt;br /&gt;
            Experimental or testing stuff&lt;br /&gt;
&lt;br /&gt;
                nil avdTest()&lt;br /&gt;
                    Test the AVD Physics code&lt;br /&gt;
                    Returns: Nothing&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                particle createParticle(vector Position, vector Velocity, number Lifetime, number Radius, enumeration Type, [number Tracer length=-1, boolean Reverse=false, texture Texture=Nil, object Attached Object=Nil])&lt;br /&gt;
                    Creates a particle. Use PARTICLE_* enumerations for type.Reverse reverse animation, if one is specifiedAttached object specifies object that Position will be (and always be) relative to.&lt;br /&gt;
                    Returns: Handle to the created particle&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                string getStack()&lt;br /&gt;
                    Generates an ADE stackdump&lt;br /&gt;
                    Returns: Current Lua stack&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isCurrentPlayerMulti()&lt;br /&gt;
                    Returns whether current player is a multiplayer pilot or not.&lt;br /&gt;
                    Returns: Whether current player is a multiplayer pilot or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                boolean isPXOEnabled()&lt;br /&gt;
                    Returns whether PXO is currently enabled in the configuration.&lt;br /&gt;
                    Returns: Whether PXO is enabled or not&lt;br /&gt;
                     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Enumerations&lt;br /&gt;
        ALPHABLEND_FILTER&lt;br /&gt;
        ALPHABLEND_NONE&lt;br /&gt;
        CFILE_TYPE_NORMAL&lt;br /&gt;
        CFILE_TYPE_MEMORY_MAPPED&lt;br /&gt;
        MOUSE_LEFT_BUTTON&lt;br /&gt;
        MOUSE_RIGHT_BUTTON&lt;br /&gt;
        MOUSE_MIDDLE_BUTTON&lt;br /&gt;
        ORDER_ATTACK&lt;br /&gt;
        ORDER_ATTACK_ANY&lt;br /&gt;
        ORDER_DEPART&lt;br /&gt;
        ORDER_DISABLE&lt;br /&gt;
        ORDER_DISARM&lt;br /&gt;
        ORDER_DOCK&lt;br /&gt;
        ORDER_EVADE&lt;br /&gt;
        ORDER_FLY_TO&lt;br /&gt;
        ORDER_FORM_ON_WING&lt;br /&gt;
        ORDER_GUARD&lt;br /&gt;
        ORDER_IGNORE_SHIP&lt;br /&gt;
        ORDER_KEEP_SAFE_DISTANCE&lt;br /&gt;
        ORDER_PLAY_DEAD&lt;br /&gt;
        ORDER_REARM&lt;br /&gt;
        ORDER_STAY_NEAR&lt;br /&gt;
        ORDER_STAY_STILL&lt;br /&gt;
        ORDER_UNDOCK&lt;br /&gt;
        ORDER_WAYPOINTS&lt;br /&gt;
        ORDER_WAYPOINTS_ONCE&lt;br /&gt;
        PARTICLE_DEBUG&lt;br /&gt;
        PARTICLE_BITMAP&lt;br /&gt;
        PARTICLE_FIRE&lt;br /&gt;
        PARTICLE_SMOKE&lt;br /&gt;
        PARTICLE_SMOKE2&lt;br /&gt;
        PARTICLE_PERSISTENT_BITMAP&lt;br /&gt;
        SEXPVAR_CAMPAIGN_PERSISTENT&lt;br /&gt;
        SEXPVAR_NOT_PERSISTENT&lt;br /&gt;
        SEXPVAR_PLAYER_PERSISTENT&lt;br /&gt;
        SEXPVAR_TYPE_NUMBER&lt;br /&gt;
        SEXPVAR_TYPE_STRING&lt;br /&gt;
        TEXTURE_STATIC&lt;br /&gt;
        TEXTURE_DYNAMIC&lt;br /&gt;
        LOCK&lt;br /&gt;
        UNLOCK&lt;br /&gt;
        NONE&lt;br /&gt;
        SHIELD_FRONT&lt;br /&gt;
        SHIELD_LEFT&lt;br /&gt;
        SHIELD_RIGHT&lt;br /&gt;
        SHIELD_BACK&lt;br /&gt;
        MISSION_REPEAT&lt;br /&gt;
        NORMAL_CONTROLS&lt;br /&gt;
        LUA_STEERING_CONTROLS&lt;br /&gt;
        LUA_FULL_CONTROLS&lt;br /&gt;
        NORMAL_BUTTON_CONTROLS&lt;br /&gt;
        LUA_ADDITIVE_BUTTON_CONTROL&lt;br /&gt;
        LUA_OVERRIDE_BUTTON_CONTROL&lt;br /&gt;
        VM_INTERNAL&lt;br /&gt;
        VM_EXTERNAL&lt;br /&gt;
        VM_TRACK&lt;br /&gt;
        VM_DEAD_VIEW&lt;br /&gt;
        VM_CHASE&lt;br /&gt;
        VM_OTHER_SHIP&lt;br /&gt;
        VM_EXTERNAL_CAMERA_LOCKED&lt;br /&gt;
        VM_WARP_CHASE&lt;br /&gt;
        VM_PADLOCK_UP&lt;br /&gt;
        VM_PADLOCK_REAR&lt;br /&gt;
        VM_PADLOCK_LEFT&lt;br /&gt;
        VM_PADLOCK_RIGHT&lt;br /&gt;
        VM_WARPIN_ANCHOR&lt;br /&gt;
        VM_TOPDOWN&lt;br /&gt;
        VM_FREECAMERA&lt;/div&gt;</summary>
		<author><name>Aginor</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Scripting.tbl&amp;diff=38954</id>
		<title>Scripting.tbl</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Scripting.tbl&amp;diff=38954"/>
		<updated>2012-07-13T11:10:55Z</updated>

		<summary type="html">&lt;p&gt;Aginor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SCP_table}}&lt;br /&gt;
&lt;br /&gt;
{{TableVersion|4500}}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The scripting table is used for scripting special features like alternate HUDs or ship viewer into the game.&lt;br /&gt;
&lt;br /&gt;
This table is one of the [[Modular Tables]] and can be extended with xxx-sct.tbm&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Useful references:&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;[[FS2 Open Lua Scripting]]&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;[[Scripting API]]&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;!---*&#039;&#039;&#039;[http://fs2source.warpcore.org/temp/scripting.html Scripting.html]&#039;&#039;&#039; - Link OOA ---&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;[[Scripting functions]]&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;[[Command-Line_Reference#-output_scripting|Command-Line Reference for creating scripting.html]]&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;[http://lua-users.org/wiki/ Lua-Users Wiki]&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;[http://www.lua.org/manual/5.0/ Reference manual for Lua 5.0]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==General Info==&lt;br /&gt;
*Scripting table consist of several sections identified by a hash mark preceeding the section name (i.g. #Global Hooks)&lt;br /&gt;
*All sections &#039;&#039;must&#039;&#039; end with #&#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
*All sections are optional&lt;br /&gt;
*Most entries are optional&lt;br /&gt;
*Scripting hooks are &#039;&#039;&#039;not&#039;&#039;&#039; executed on a separate thread (at least as of this writing). They are executed at given points in the code, and all other execution will not take place until a scripting hook has finished. Therefore, large and complicated scripts will most likely cause noticeable lag or slowdown when executed.&lt;br /&gt;
{{Template:Note|1=Information on this page does not apply to pre-3.6.10 builds}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
===Frames===&lt;br /&gt;
One of the most important things to understand when reading this guide is the concept of &amp;quot;frames&amp;quot;. (Experienced modders can probably skip this part) In gameplay, motion is achieved by making incremental changes every fraction of a second. A ship will be moved slightly, and then drawn to the screen. This happens 30-120 times a second; anything lower, and the game will become choppy and difficult to play.&lt;br /&gt;
&lt;br /&gt;
There is also a difference in the moving of objects in-game, and the moving of objects onscreen. All ships are first &amp;quot;moved&amp;quot;, in memory. This probably consists of physics calculations, that change the ship&#039;s position based on if their engines are turned on, or if they run into another object. After this, the game then renders the now-moved ships to what is referred to as a &amp;quot;backbuffer&amp;quot; - a place in memory that takes the place of the computer screen. Once rendering has finished, the backbuffer is instantly drawn to the screen. This prevents objects from flickering as they are drawn. You do not have to worry about flipping the backbuffer in scripting; FS2_Open will take care of that for you.&lt;br /&gt;
&lt;br /&gt;
For scripting, &#039;&#039;&#039;it is important to understand that each block of code will therefore be executed several times a second, but only once per frame&#039;&#039;&#039;. However, the exact number of times per second will depend on how much work the computer has to do (And therefore how much time it takes) for each frame. To determine how much time you should consider to have passed, you must use the ba.getFrametime() function; which will return the approximate time the frame will take, in seconds. In addition, if you &amp;quot;move&amp;quot; a ship after it has already been rendered, the change will not become apparent until the next frame.&lt;br /&gt;
&lt;br /&gt;
This does mean that if you want to make a block of text move across the screen, at a rate of 5 pixels per second, all you have to do is multiply the speed by the frametime:&lt;br /&gt;
&amp;lt;pre&amp;gt;#Global Hooks&lt;br /&gt;
$Global: [&lt;br /&gt;
   --If the g_WheeXPosition variable does not exist,&lt;br /&gt;
   --it means we are on the first frame.&lt;br /&gt;
   --If that is the case, set it to zero.&lt;br /&gt;
   if not g_WheeXPosition then&lt;br /&gt;
      g_WheeXPosition = 0&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   --Move the text&lt;br /&gt;
   g_WheeXPosition = g_WheeXPosition + (5 * ba.getFrametime())&lt;br /&gt;
&lt;br /&gt;
   --Draw &amp;quot;WHEE!!!&amp;quot;&lt;br /&gt;
   gr.drawString(&amp;quot;WHEE!!!&amp;quot;, g_WheeXPosition, 10)&lt;br /&gt;
]&lt;br /&gt;
#End&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hooks===&lt;br /&gt;
Scripting &amp;quot;hooks&amp;quot; form the basis of the scripting system. A &amp;quot;hook&amp;quot; simply refers to a point in the code where code to execute scripting has been added. The hook may then be added to a table, or added to a SEXP. In general usage, &amp;quot;hook&amp;quot; refers to an entry in scripting.tbl.&lt;br /&gt;
&lt;br /&gt;
All hooks take the form of an identifer (such as $Global:), followed by brackets to determine what type of scripting is being executed. A lack of brackets also indicates a type of scripting execution. All current bracket configurations are listed below. Note that &amp;quot;$Hook:&amp;quot; is used merely as a placeholder, and should be replaced with the actual hook name ($Global:, $HUD:, $On Frame:, etc).&lt;br /&gt;
#&amp;lt;pre&amp;gt;$Hook: scripting&amp;lt;/pre&amp;gt;Specifies one line of LUA scripting. In addition, the return value of that line will be passed to the interpreter and used (if applicable). Specifying a variable or value on this line will result in it being returned, as well.&lt;br /&gt;
#&amp;lt;pre&amp;gt;$Hook: [scripting]&amp;lt;/pre&amp;gt;A single set of brackets specifies a block of LUA scripting. Does not return a value unless explicitly specified. (Explicit specification is not possible at this time; but may be implemented in the future if/when more future hooks take a return value.)&lt;br /&gt;
#&amp;lt;pre&amp;gt;$Hook: [[scriptfilename.lua]]&amp;lt;/pre&amp;gt;Double brackets specify a file. This file is read out of the data/scripts directory, and must include the file extension. You may specify a compiled lua file as a target as well; this may result in crossplatform issues for a mod, however.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====+Override====&lt;br /&gt;
Some hooks additionally take a +Override: field. This field uses the same bracket configurations as above. If a hook includes a +Override field, this hook always determines whether the default FS2_Open behavior that the hook is associated with will function, or will be disabled. This should be used in cases where scripting will replace the original FS2_Open behavior. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;$HUD: [&lt;br /&gt;
    gr.setColor(255, 255, 255, 255)&lt;br /&gt;
    gr.drawString(&amp;quot;HUD Disabled&amp;quot;, 50, 50)&lt;br /&gt;
 ]&lt;br /&gt;
    +Override: true&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally, override hooks are (by convention) executed before FS2_Open behavior. The HUD hook override, for example, is executed before any part of the HUD is actually drawn.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
===#Global Hooks===&lt;br /&gt;
Global hooks are the simplest form of scripting hooks available. They are at preset locations in the code, and are generally executed every time that point is reached. Exceptions to this rule (such as the HUD hook) only depend on one or two variables to determine execution. All other scripting execution is determined by the modder.&lt;br /&gt;
Note that, as with other tables, the game expects these entries in precisely the order given here; if this is not followed, the parser will throw an error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====$Global:====&lt;br /&gt;
Script in this section is executed almost immediately before each frame is drawn. This means that any scripting elements will be drawn, or take effect, after everything else, except for the &amp;quot;On Frame&amp;quot; conditional hook. It is not used with the standalone server. In addition, note that use of this hook should generally be avoided, since all scripting will have to be processed every frame.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====$Splash:====&lt;br /&gt;
This hook is executed once, when the splash images (PreLoad and PreLoadLogo) would be drawn. This hook should generally be used only for drawing the splash screen; any initialization could should be placed in GameInit. This hook is executed before virtually any other subsystem has been loaded, aside from the graphics and filesystem subsystems, so scripting elements such as the table and mission libraries will be nonfunctional.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====+Override:=====&lt;br /&gt;
Executed just before default splash images are loaded and displayed. Note that the frame is still drawn regardless; it is not necessary to flip the backbuffer manually.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====$GameInit:====&lt;br /&gt;
This hook is executed once, after all of the Freespace2 subsystems have been initialized. It is executed before the game switches to the main hall or, in the case of standalone server mode, begins the game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====$Simulation:====&lt;br /&gt;
This hook is executed only during missions. It is executed after all damage, movement, physics, SEXPs, and other &amp;quot;physical&amp;quot; in-game changes have been applied. It is executed before anything has been rendered. This hook should be used only for damage, movement, and physics related scripting, as if the game needs to be rendered without any in-game time having been passed, this function will not be called.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====$HUD:====&lt;br /&gt;
The HUD hook is executed after the HUD has been drawn. Note that if the HUD is turned off, this hook will be disabled as well, until the HUD is turned back on.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====+Override:=====&lt;br /&gt;
Executed immediately before anything on the HUD is drawn, and controls whether the default FS2_Open is drawn.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===#State Hooks===&lt;br /&gt;
In Freespace2, a &amp;quot;state&amp;quot; more or less refers to a room. It may also refer to a separate mode - playing a mission is the GS_STATE_GAME_PLAY state. The main menu is the GS_STATE_MAIN_MENU state. This section should only exist in 3.6.9. It is included here for the sake of documentation; it has since been removed and superseded by the conditional hook system.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====$State:=====&lt;br /&gt;
Specifies the state name. A full list of states is located here: &#039;&#039;[[List of Game States]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=====$Hook:=====&lt;br /&gt;
Executed after all of the state code has been executed, but before the game frame is actually drawn.&lt;br /&gt;
&lt;br /&gt;
======+Override:======&lt;br /&gt;
Determines whether the specified state is handled at all by Freespace. If true, then none of the loading or exit code for the state will be specified as well.&lt;br /&gt;
&lt;br /&gt;
===#Conditional Hooks===&lt;br /&gt;
Scripting hooks are only available in HEAD builds. They consist of any number of conditions, followed by any number of actions. All available conditions and actions are located in the file generated by -output_scripting.&lt;br /&gt;
&lt;br /&gt;
One way to think of conditional scripting is like this: The condition specifies the object that the action will apply to, or the place that the action will occur in. All conditions must be met for their associated actions to execute. Actions are associated with a set of conditions by simply adding them after that set of conditions. (Obviously, you may want to space out each pair of action/condition sets in the TBL to make it easier to read.)&lt;br /&gt;
&lt;br /&gt;
The flexibility of conditional scripting comes in due to its inherent scalability. If you specify a mission and ship condition with a warpin action, that script will only be executed when the ship warps in on that particular mission. Removing the mission field will make that warpin scripting apply to the ship for all missions; or removing the ship field will make the warpin scripting apply to all ships in that mission.&lt;br /&gt;
&lt;br /&gt;
This prompts the question: if this is all conditional scripting does, why not just use the global hook? &lt;br /&gt;
#Organization - conditional scripting is generally easier to read and modify because it is grouped in a standardized manner.&lt;br /&gt;
#Speed - All conditions can be evaluated by FS2_Open itself, without invoking the Lua interpreter at all.&lt;br /&gt;
#Scalability - As of the time of this writing, you can only have one global hook. Modular tables will simply replace it. With conditional scripting, if you want to specify additional actions for a set of conditions in a modular table file, you may do so.&lt;br /&gt;
&lt;br /&gt;
;Format&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;$Condition:&#039;&#039;&#039;: Where &amp;quot;$Condition:&amp;quot; is one of several conditions specified in scripting.html, such as $State: or $Ship:. Takes a value representing the object the condition should be checked against (such as a state, ship, or mission name)&lt;br /&gt;
;&#039;&#039;&#039;$Condition:&#039;&#039;&#039;: ...&lt;br /&gt;
;&#039;&#039;&#039;...&#039;&#039;&#039;:&lt;br /&gt;
;&#039;&#039;&#039;$Action:&#039;&#039;&#039;: Where &amp;quot;$Action:&amp;quot; is one of several actions specified in scripting.html, such as $On Frame or $On Warp In. Takes a scripting hook, using the bracket configuration outlined at the top of this article.&lt;br /&gt;
;&#039;&#039;&#039;$Condition:&#039;&#039;&#039;: ...&lt;br /&gt;
;&#039;&#039;&#039;...&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
A brief description of all Conditions and Actions at the time of this writing:&lt;br /&gt;
&lt;br /&gt;
====Conditions====&lt;br /&gt;
&lt;br /&gt;
=====$State:=====&lt;br /&gt;
Controls execution based on what state FS2_Open is in, such as the main hall, options screen, or in a mission.&lt;br /&gt;
*The full list of states can be found here: &#039;&#039;[[List of Game States]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=====$Campaign:=====&lt;br /&gt;
Controls execution based on the current campaign&#039;s filename. (It is under consideration to change this to the campaign&#039;s name, instead).&lt;br /&gt;
&lt;br /&gt;
=====$Mission:=====&lt;br /&gt;
Controls execution based on the filename of the last mission to have started. This condition will remain true even after the mission has been exited until another mission is started.&lt;br /&gt;
&lt;br /&gt;
=====$Object Type:=====&lt;br /&gt;
Defines a specific object type that the action will apply for, such as a &amp;quot;Ship&amp;quot;, &amp;quot;Asteroid&amp;quot;, or &amp;quot;Jump Node&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=====$Ship:=====&lt;br /&gt;
Defines a specific ship (name) that the action will apply for.&lt;br /&gt;
&lt;br /&gt;
=====$Ship class:=====&lt;br /&gt;
Defines a specific ship class (name) that the action will apply for.&lt;br /&gt;
&lt;br /&gt;
=====$Ship type:=====&lt;br /&gt;
Defines a specific ship type (name) that the action will apply for.&lt;br /&gt;
&lt;br /&gt;
=====$Weapon class:=====&lt;br /&gt;
Defines a specific weapon class (name) that the action will apply for.&lt;br /&gt;
&lt;br /&gt;
=====$KeyPress:=====&lt;br /&gt;
Defines a specific key that the action will apply for.&lt;br /&gt;
*Experimental.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Actions====&lt;br /&gt;
&lt;br /&gt;
=====$On Game Init:=====&lt;br /&gt;
Executes immediately after game has been started.&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Splash Screen:=====&lt;br /&gt;
Executes when initial game splash screen is shown&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On State Start:=====&lt;br /&gt;
Executed when specified game state starts&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Frame:=====&lt;br /&gt;
Executes immediately after the global scripting hook, which is right before the frame is drawn.&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Key Pressed:=====&lt;br /&gt;
Executed when specified key is pressed&lt;br /&gt;
::* &#039;&#039;&#039;Key&#039;&#039;&#039;, The pressed key&lt;br /&gt;
&lt;br /&gt;
=====$On Key Released:=====&lt;br /&gt;
Executed when specified key is released&lt;br /&gt;
::* &#039;&#039;&#039;Key&#039;&#039;&#039;, The released key&lt;br /&gt;
&lt;br /&gt;
=====$On Mouse Moved:=====&lt;br /&gt;
Executed when mouse is moved&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Mouse Pressed:=====&lt;br /&gt;
Executed when mouse button is pressed&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Mouse Released:=====&lt;br /&gt;
Executed when mouse button is released&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On State End:=====&lt;br /&gt;
Executed when specified game state ends&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Mission Start:=====&lt;br /&gt;
Executed when mission starts&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
&lt;br /&gt;
=====$On Gameplay Start:=====&lt;br /&gt;
{{Table3615|&lt;br /&gt;
Executed when the gameplay part of a mission starts&lt;br /&gt;
::* No associated hook variables.}}&lt;br /&gt;
&lt;br /&gt;
=====$On HUD Draw:=====&lt;br /&gt;
Executed after the HUD has been drawn. Note that if the HUD is turned off, this hook will be disabled as well, until the HUD is turned back on&lt;br /&gt;
::* &#039;&#039;&#039;Self&#039;&#039;&#039;, the viewer (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Ship Collision:=====&lt;br /&gt;
Executes when the specified object collides with a ship. Sets a handle in the HookVariables library with the name of the object type (&amp;quot;Weapon&amp;quot;, &amp;quot;Debris&amp;quot;, and so on) with the type of the object. If both objects are ships, the other object gains the name &amp;quot;ShipB&amp;quot;. (If both ship objects define a collision hook, the variables will be swapped for the other ship, so the ship that the script is executing for will always be called &amp;quot;Script&amp;quot;.) The override will disable FS2_Open code, as well as the other object&#039;s collision code. If both objects have an override set, only one of the objects&#039; hooks will be used (Chosen arbitrarily). Note that the override receives the same variables.&lt;br /&gt;
::* When colliding something other than other ship:&lt;br /&gt;
::** &#039;&#039;&#039;Ship&#039;&#039;&#039;, the ship (object)&lt;br /&gt;
::** &#039;&#039;&#039;Debris&#039;&#039;&#039;, &#039;&#039;&#039;Asteroid&#039;&#039;&#039;, &#039;&#039;&#039;Weapon&#039;&#039;&#039;, depending what it collided with (object)&lt;br /&gt;
::** &#039;&#039;&#039;Self&#039;&#039;&#039;, the object referred by the condition (object)&lt;br /&gt;
::** &#039;&#039;&#039;Object&#039;&#039;&#039;, the ship (object)&lt;br /&gt;
::* When colliding with other ship:&lt;br /&gt;
::** &#039;&#039;&#039;Ship&#039;&#039;&#039;, the ship (object) referred by the condition (object)&lt;br /&gt;
::** &#039;&#039;&#039;ShipB&#039;&#039;&#039;, the other ship (object)&lt;br /&gt;
::** &#039;&#039;&#039;Self&#039;&#039;&#039;, the ship (object) referred by the condition (object)&lt;br /&gt;
::** &#039;&#039;&#039;Object&#039;&#039;&#039;, the other ship (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Weapon Collision:=====&lt;br /&gt;
Like the ship collision hook, but for weapons.&lt;br /&gt;
::* When colliding something other than other weapon:&lt;br /&gt;
::** &#039;&#039;&#039;Weapon&#039;&#039;&#039;, the weapon (object)&lt;br /&gt;
::** &#039;&#039;&#039;Debris&#039;&#039;&#039;, &#039;&#039;&#039;Asteroid&#039;&#039;&#039;, &#039;&#039;&#039;Ship&#039;&#039;&#039;, depending what it collided with (object)&lt;br /&gt;
::** &#039;&#039;&#039;Self&#039;&#039;&#039;, the object the weapon collided with (object)&lt;br /&gt;
::** &#039;&#039;&#039;Object&#039;&#039;&#039;, the weapon (object)&lt;br /&gt;
::* When colliding with other weapon:&lt;br /&gt;
::** &#039;&#039;&#039;Weapon&#039;&#039;&#039;, the weapon (object) referred by the condition&lt;br /&gt;
::** &#039;&#039;&#039;WeaponB&#039;&#039;&#039;, the other weapon (object)&lt;br /&gt;
::** &#039;&#039;&#039;Self&#039;&#039;&#039;, the weapon (object) referred by the condition&lt;br /&gt;
::** &#039;&#039;&#039;Object&#039;&#039;&#039;, the other weapon (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Debris Collision:=====&lt;br /&gt;
Like the ship collision hook, except for debris.&lt;br /&gt;
::* &#039;&#039;&#039;Debris&#039;&#039;&#039;, the debris (object)&lt;br /&gt;
::* &#039;&#039;&#039;Weapon&#039;&#039;&#039;, &#039;&#039;&#039;Ship&#039;&#039;&#039;, depending what it collided with (object)&lt;br /&gt;
::* &#039;&#039;&#039;Self&#039;&#039;&#039;, the object the debris collided with (object)&lt;br /&gt;
::* &#039;&#039;&#039;Object&#039;&#039;&#039;, the debris (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Asteroid Collision:=====&lt;br /&gt;
Like the ship collision hook, only for asteroids.&lt;br /&gt;
::* &#039;&#039;&#039;Asteroid&#039;&#039;&#039;, the asteroid (object)&lt;br /&gt;
::* &#039;&#039;&#039;Weapon&#039;&#039;&#039;, &#039;&#039;&#039;Ship&#039;&#039;&#039;, depending what it collided with (object)&lt;br /&gt;
::* &#039;&#039;&#039;Self&#039;&#039;&#039;, the object the asteroid collided with (object)&lt;br /&gt;
::* &#039;&#039;&#039;Object&#039;&#039;&#039;, the asteroid (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Object Render:=====&lt;br /&gt;
Executes when the specified object is rendered. The override is run before the object is rendered, and both the hook and its override receive an &amp;quot;Object&amp;quot; variable of the object to be rendered.&lt;br /&gt;
::* &#039;&#039;&#039;Self&#039;&#039;&#039;, the object rendered (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Warp In:=====&lt;br /&gt;
Run when a ship has begun warping in, immediately after everything has been set up for per-frame processing. This hook is only executed once, when the ship begins warping in. An override will disable _all_ behavior related to warpin. Both the hook and an override receive an &amp;quot;Object&amp;quot; handle in the HookVariables library, with the type of the object that is warping in.&lt;br /&gt;
::* &#039;&#039;&#039;Self&#039;&#039;&#039;, the object warping in (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Warp Out:=====&lt;br /&gt;
Same as warping in, except for warping out.&lt;br /&gt;
::* &#039;&#039;&#039;Self&#039;&#039;&#039;, the object warping out (object)&lt;br /&gt;
&lt;br /&gt;
=====$On Death:=====&lt;br /&gt;
*Currently only valid for ships.&lt;br /&gt;
Receives &amp;quot;Self&amp;quot; and &amp;quot;Killer&amp;quot; variables of the object and killer, respectively. Overriding it will override all default death behavior.&lt;br /&gt;
::* For asteroids:&lt;br /&gt;
::** &#039;&#039;&#039;Self&#039;&#039;&#039;, the asteroid (object)&lt;br /&gt;
::* For ships:&lt;br /&gt;
::** &#039;&#039;&#039;Self&#039;&#039;&#039;, the ship (object)&lt;br /&gt;
::** &#039;&#039;&#039;Killer&#039;&#039;&#039;, the other object (object) - NOTE, not guaranteed to exists&lt;br /&gt;
&lt;br /&gt;
=====$On Mission End:=====&lt;br /&gt;
Run on mission end.&lt;br /&gt;
::* No associated hook variables.&lt;br /&gt;
=====$On Weapon Equipped:=====&lt;br /&gt;
{{Table3613|&lt;br /&gt;
Runs once each frame, for every ship that has the weapon defined in the $Weapon class condition equipped.&lt;br /&gt;
::* &#039;&#039;&#039;User&#039;&#039;&#039;, the ship carrying the weapon&lt;br /&gt;
::* &#039;&#039;&#039;Target&#039;&#039;&#039;, the ships&#039; current target&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=====$On Weapon Fired:=====&lt;br /&gt;
{{Table3613|&lt;br /&gt;
Runs once when a ship fires a weapon defined in the $Weapon class condition&lt;br /&gt;
::* &#039;&#039;&#039;User&#039;&#039;&#039;, the ship carrying the weapon&lt;br /&gt;
::* &#039;&#039;&#039;Target&#039;&#039;&#039;, the ships&#039; current target&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=====$On Weapon Selected:=====&lt;br /&gt;
{{Table3613|&lt;br /&gt;
Runs once when a bank with a weapon defined in the $Weapon class condition is selected&lt;br /&gt;
::* &#039;&#039;&#039;User&#039;&#039;&#039;, the ship carrying the weapon&lt;br /&gt;
::* &#039;&#039;&#039;Target&#039;&#039;&#039;, the ships&#039; current target&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=====$On Weapon Deselected:=====&lt;br /&gt;
{{Table3613|&lt;br /&gt;
Runs once when a bank with a weapon defined in the $Weapon class condition is deselected&lt;br /&gt;
::* &#039;&#039;&#039;User&#039;&#039;&#039;, the ship carrying the weapon&lt;br /&gt;
::* &#039;&#039;&#039;Target&#039;&#039;&#039;, the ships&#039; current target&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====$On Turret Fired:=====&lt;br /&gt;
{{Table3615|&lt;br /&gt;
Executed when a turret fires&lt;br /&gt;
::* &#039;&#039;&#039;Ship&#039;&#039;&#039;, the parent ship&lt;br /&gt;
::* &#039;&#039;&#039;Weapon&#039;&#039;&#039;, the weapon which was fired&lt;br /&gt;
::* &#039;&#039;&#039;Target&#039;&#039;&#039;, the intended target}}&lt;br /&gt;
&lt;br /&gt;
==Misc. Hook Variables:==&lt;br /&gt;
&lt;br /&gt;
===Viewer===&lt;br /&gt;
*Active if (non-player) viewing object is valid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
*Active if player obj is valid &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
See [[:Category:Scripting Examples|Scripting Examples category]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tables]]&lt;/div&gt;</summary>
		<author><name>Aginor</name></author>
	</entry>
</feed>