warzone2100/doc/ScriptingManual.xhtml

4956 lines
184 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-language" content="en"/>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<meta http-equiv="content-style-type" content="text/css; charset=UTF-8"/>
<meta name="author" content="Troman"/>
<link rel="stylesheet" type="text/css" href="styles/scriptingmanual.css"/>
<title>Comments</title>
</head>
<body style='text-justify-trim:punctuation'>
<p class="MsoPlainText"><b><span style='font-family:Arial'>Warzone2100.
Script language notes.</span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>Original
Author: Pumpkin Studios. 1999</span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>Last
Author: $Author$</span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>Last
update: $Date: 2007-07-15 </span></b><b><span style='font-family:
Arial'>17:53:41</span></b><b><span style='font-family:Arial'> +0200
(So, </span></b><b><span style='font-family:Arial'>15 Jul 2007</span></b><b><span
style='font-family:Arial'>) $, $Revision$, <a
href="http://wz2100.net/">WRP</a></span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>&nbsp;</span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>Note from Pumpkin
Studios: making any modifications to Warzone 2100 will void any technical
support open to you. We will not answer questions or help you in any way if you
have modified Warzone 2100. Pumpkin Studios and Eidos will not take
responsibility for any damage resulting from modifcation of Warzone 2100.</span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>&nbsp;</span></b></p>
<p class="normal"><span>Contents:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span><a href="#Introduction">Introduction</a></span></p>
<p class="normal"><span><a href="#Comments">Comments</a></span></p>
<p class="normal"><span><a href="#Vlo_files_explained">Vlo files
explained</a></span></p>
<p class="normal"><span><a href="#Slo_files_explained">Slo files
explained</a></span></p>
<p class="normal"><span><a href="#Event_trigger_concept_explained">Event/trigger
concept explained</a></span></p>
<p class="normal"><span><a href="#Triggers_explained">Triggers
explained</a></span></p>
<p class="normal"><span><a href="#String_Expressions">String
Expressions</a></span></p>
<p class="normal"><span><a href="#Numeric_Expressions">Numeric
Expressions</a></span></p>
<p class="normal"><span><a href="#Boolean_Expressions">Boolean
Expressions</a></span></p>
<p class="normal"><span><a href="#Floatingpoint_Expressions">Floating-point
Expressions</a></span></p>
<p class="normal"><span><a href="#Assignment">Assignment</a></span></p>
<p class="normal"><span><a href="#If_statements">If Statements</a></span></p>
<p class="normal"><span><a href="#While_statements">While Statements</a></span></p>
<p class="MsoNormal"><span><a href="#Casts"><span>Casts</span></a></span></p>
<p class="normal"><span><a href="#Custom_Functions">Custom Functions</a></span></p>
<p class="normal"><span><a href="#Local_Variables">Local Variables</a></span></p>
<p class="normal"><span><a href="#Data_Types">Data Types</a></span></p>
<p class="normal"><span><a href="#Script_Functions">Script Functions</a></span></p>
<p class="normal"><span><a href="#Debugging_Script_Functions">Debugging
Script Functions</a></span></p>
<p class="normal"><span><a href="#Script_Function_Constants">Script
Function Constants</a></span></p>
<p class="normal"><span><a href="#Script_Function_Externals">Script
Function Externals</a></span></p>
<p class="MsoNormal"><a href="#Script_Function_Callbacks"><span>Script
Function Callbacks</span></a></p>
<p class="normal"><b><span>&nbsp;</span></b></p>
<p class="MsoPlainText"><b><span style='font-family:Arial'>Specific
skirmish/multiplayer notes:</span></b></p>
<p class="normal"><span>Some of the file below doesnt apply to
skirmish scripts! Make your changes to player0.slo and vlo -&gt; player7.slo and
vlo.</span></p>
<p class="MsoPlainText"><b><span style='font-size:10.0pt'>&nbsp;</span></b></p>
<p class="MsoPlainText"><b><span style='font-size:10.0pt'>&nbsp;</span></b></p>
<p class="header"><a id="Introduction">Introduction</a></p>
<p><span>In order for Warzone scripts to function properly two files
are required: a file with a <strong><span style='font-family:Arial;font-weight:
normal'>.slo</span></strong> extension and a file with a <strong><span
style='font-family:Arial;font-weight:normal'>.vlo</span></strong> extension.</span></p>
<p><span>A .slo file is the main part of the script and holds
executable instructions while the .vlo file holds additional variable
declarations necessary for the .slo file to function properly.</span></p>
<p><span>It is common for a script to deal with new or existing game
components such as research topics, structures, unit bodies, propulsions,
weapons etc. All these components are defined in appropriate text files like
body.txt, structure.txt etc. If you want to use any of these components in your
script - in your .slo file - like for example if you want to place certain
structures on the map using scripts or enable certain research, you must first
make these components available to your script by defining them in a .vlo file.</span></p>
<p><span>Roughly said a .slo file is equivalent to a “.c” file and
.vlo to a header file in C/C++.</span></p>
<p class="MsoPlainText"><b><span style='font-size:10.0pt'>&nbsp;</span></b></p>
<p class="header"><a id="Comments">Comments</a></p>
<p><span>There are two type of comment for the script language.&nbsp;
A multi-line comment is started by the characters /* and finishes with
*/.&nbsp; A single line comment is started by //.</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="Vlo_files_explained"><span>Vlo Files
Explained</span></a></p>
<p><span>When writing a script it is usually known what data (as
defined in data .txt files, located in stats folder) will be used in the
script, so it's a good idea to start writing the script with a .vlo file.</span></p>
<p><span>Vlo files are structured as follows:</span></p>
<p class="code"><strong><span style='font-family:"Courier New";
font-weight:normal'>script &quot;myScript.slo&quot;</span></strong></p>
<p class="code"><strong><span style='font-family:"Courier New";
font-weight:normal'>run</span></strong></p>
<p class="code"><strong><span style='font-family:"Courier New";
font-weight:normal'>{</span></strong></p>
<p class="code"><strong><span style='font-family:"Courier New";
font-weight:normal'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;variable_definitions&gt;</span></strong></p>
<p class="code"><strong><span style='font-family:"Courier New";
font-weight:normal'>}</span></strong></p>
<p class="normal"><span><br/>
In the first line a .slo file is attached to this particular .vlo file. </span><span
class="a"><span>variable_definitions </span></span><span>that
resides inside the curly braces is the heart of every .vlo file, it contains
definitions of the data that will be used in the main script part - the .slo
file. Each variable definition starts on a new line and is structured as
follows:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="code"><span>&lt;variable_name&gt; &lt;variable_type&gt;
&lt;variable_value&gt; </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: Available data types are covered later.</span></p>
<p><span>For example if you want to have access to certain droid
bodies, like &quot;Python&quot; in your script you have to define it in your .vlo
file and assign it to a variable of type BODY with some descriptive name, like:</span></p>
<p class="code"><span>myPythonBody &nbsp;
BODY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Body11ABT&quot;</span></p>
<p><span>&quot;Body11ABT&quot; is an internal name of the
&quot;Python&quot; body used by warzone, it is defined in the body.txt file.
Since it is a string it must be put inside quotation marks. All components, be
it some research, structure, droid template or a weapon is refered by its
internal name in the game and are defined in the appropriate txt data files.</span></p>
<p><span>Each variable definition in a .vlo file starts on the new
line and ends at the end of the line.</span></p>
<p><span>It is also possible to define arrays of some data type. For
example if you want to use the following 3 research topics in your script you
might want to define them like this:</span></p>
<p class="code"><span>myResearch[0]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RESEARCHSTAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&quot;R-Vehicle-Body11&quot;</span></p>
<p class="code"><span>myResearch[1]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RESEARCHSTAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&quot;R-Vehicle-Prop-Tracks&quot;</span></p>
<p class="code"><span>myResearch[2]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RESEARCHSTAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&quot;R-Vehicle-Prop-Hover&quot;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>This defines an array of size 3 of type
RESEARCHSTAT.</span></p>
<p><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;</span></p>
<p class="header"><a id="Slo_files_explained"><span>Slo Files
Explained</span></a></p>
<p class="MsoNormal"><span>As already mentioned .slo file is the heart
of every script, it is the place for the executable code. Slo files can be
devided into 3 main parts:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="code" style='margin-left:36.0pt;text-indent:-18.0pt'><a id="Variable_Declarations"><span>1.</span></a><span
style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp; </span><span
>Variable declarations</span></p>
<p class="code" style='margin-left:36.0pt;text-indent:-18.0pt'><a id="Variable_declaration"></a><a id="Event_and_function_declaration"></a><span
>2.</span><span style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;
</span><span>Event and function declaration</span></p>
<p class="code" style='margin-left:36.0pt;text-indent:-18.0pt'><span>3.</span><span
style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp; </span><span
>Executable code</span></p>
<p class="code" style='margin-left:18.0pt'><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Variables used throughout the script are
defined in the </span><span class="a"><span>Variable declarations</span></span><span
> part, with exception of the local variables, which are explained
later.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>For the .slo file to be able to access
variables declared in the .vlo file they must be declared as public variables
in the corresponding .slo file.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Coming back to the two examples above you
will have to add following lines to the .slo file:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="code"><span>public &nbsp;&nbsp;
BODY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
myPythonBody; </span></p>
<p class="code"><span>public &nbsp;&nbsp;
RESEARCHSTAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myResearch[3];</span></p>
<pre><span>&nbsp;</span></pre>
<p class="MsoNormal"><span>Keyword </span><span class="a"><span
>public</span></span><span> signals that the variable is defined
in the corresponding .vlo files. Note that unlike in .vlo files variable
declarations in .slo files end with a semicolon and unlike in .vlo files it is
possible to declare more than one variable of the same type at once.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>More generally a variable declaration in a
.slo file looks like this:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="code"><span>&lt;storage&gt;&nbsp;&nbsp;&nbsp;
&lt;variable_type&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;variable_name1&gt; [, &lt;variable_name2&gt; , ...];</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="MsoNormal"><span class="a"><span>storage</span></span><span
> is one of “public” or “private”.&nbsp; Public means that the
variable is declared and defined in the corresponding .vlo file.&nbsp;Private
means the value is only used in the .slo file. Unlike local variables public
and private variables are global variables that can be access from anywhere in
the .slo file.</span></p>
<p class="MsoPlainText"><span style='font-family:Arial'>&nbsp;</span></p>
<p class="note0"><em><span style='font-family:Arial'>NOTE: All
variables are initialized to their default values when created.
STRUCTURE/DROID/FEATURE variables are initialized to NULLOBJECT, STRINGs to
&quot;&quot;, FLOATs to 0.0, INTs to 0, BOOLs to FALSE etc. </span></em></p>
<p class="code"><em><span style='font-family:"Courier New";font-style:
normal'>&nbsp;</span></em></p>
<p class="code"><em><span style='font-family:"Courier New";font-style:
normal'>&nbsp;</span></em></p>
<p class="header"><a id="Event_trigger_concept_explained"><span>Event/Trigger
Concept Explained </span></a></p>
<p class="normal"><span>In Warzone scripts executable code consists of
<strong><span style='font-family:Arial;font-weight:normal'>events</span></strong>.
An event is a list of instructions activated by some <strong><span
style='font-family:Arial;font-weight:normal'>trigger</span></strong> attached
to it. Event defines <strong><span style='font-family:Arial;font-weight:normal'>what</span></strong>
to do, a trigger defines <strong><span style='font-family:Arial;font-weight:
normal'>when</span></strong> to run an event, ie when to execute the code
inside an event.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>All events are structured as follows:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>event &lt;event_name&gt;(&lt;trigger&gt;)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code" style='margin-bottom:12.0pt'><span>}</span></p>
<p class="normal"><span>Example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>event myFirstEvent(every, 50)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
console(&quot;Hello world!&quot;);</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>This piece of code will output &quot;Hello
world!&quot; to the game console every 5 seconds. Note that triggers are put
inside the round braces after the event name while code that is to be executed
resides inside the curly braces. The syntax of the executable code is very
close to the C/C++ syntax.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>The only difference between a WZ event and a
function as used in programming languages like C/C++ is that an event is not
called or activated by another function, but rather by a trigger attached to
it.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>It is always possible to interrupt execution
of an event with the </span><span class="a"><span>exit</span></span><span
> keyword, which is a counterpart of the </span><span class="a"><span
>return</span></span><span> keyword used for functions; </span><span
class="a"><span>exit</span></span><span> keyword does not
deactivate an event.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>event myEvent(every,
10)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //run every second</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console ( “this
text will be printed every second” );</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( (gameTime /
10) &gt; 60) //did more than a minute pass?</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
exit;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //anything that comes after
exit will not be executed</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
console( “this text will only get printed in the first” );</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Events must be defined before they can be
referenced. If event definition comes after the place where this event is
referenced it is necessary to declare this event beforehand in the <span
class="a"><span style='font-family:Arial'><a
href="#Event_and_function_declaration">Event and function declaration</a></span></span>
section.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Events are declared like this:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>event &lt;event_name&gt;;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>Such a declaration reserves identifier used as
event name.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>event
myEvent;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//declaration of the event</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>...</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>// another event that references myEvent</span></p>
<p class="code"><span>event anotherEvent(wait, 10)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
setEventTrigger(myEvent, inactive);&nbsp;&nbsp; //deactivate myEvent</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>...</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>// myEvent is defined after being referenced by
anotherEvent,</span></p>
<p class="code"><span>// but it works, since we declared myEvent
beforehand</span></p>
<p class="code"><span>event myEvent(wait, 20)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console(“It all
compiles, because I was declared beforehand!”);</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>If </span><span class="a"><span>myEvent</span></span><span
> wasnt declared before being referenced by </span><span class="a"><span
>anotherEvent</span></span><span> then this example would
not compile.</span></p>
<p class="header"><a id="Triggers_explained"><span>Triggers
Explained</span></a></p>
<p class="normal"><span>In WZ triggers are usually simple timers that
repeartedly trigger execution of events, but triggers can also be callbacks
(special events that occur in the game, like destruction of a building) that
are listed and explained later.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Here are avaiable trigger types:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span class="a"><span>wait, &lt;time&gt;</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Run the event after delay &lt;time&gt;.</span></p>
<p class="MsoNormal"><span class="a"><span>every, &lt;time&gt;</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Run the event at every &lt;time&gt; interval.</span></p>
<p class="MsoNormal"><span class="a"><span>&lt;callback&gt;</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Run when callback occurs.</span></p>
<p class="MsoNormal"><span class="a"><span>&lt;bool exp&gt;,
&lt;time&gt;</span></span><span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Run the event if &lt;bool exp&gt; is true, checking every &lt;time&gt;
interval.</span></p>
<p class="MsoNormal"><span class="a"><span>init</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Run the event when the script starts.</span></p>
<p class="MsoNormal"><span class="a"><span>inactive</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Do not run the event until a trigger is assigned to it.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: all time intervals are in 1/10 of a
second.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>For example </span><span class="a"><span
>every, 10</span></span><span> will trigger every second
while </span><span class="a"><span>wait, 50</span></span><span
> will only activate once: 5 seconds after the game has started. If
an event has </span><span class="a"><span>inactive</span></span><span
> assigned as a trigger this event will never execute unless its
trigger is reassigned by some other event with </span><span class="a"><span
>setEventTrigger(&lt;event&gt;, &lt;trigger&gt;)</span></span><span
> function.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: complete function and callback listings
are given below.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>A few examples:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>// 1. output text to game console every second</span></p>
<p class="code"><span>event everySecond(every, 10)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console(“The game
has started “ + gameTime/10 + “ seconds ago”);</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>// 2. Code inside this event will never execute
unless its event is reassigned later</span></p>
<p class="code"><span>event inactiveEvent(inactive)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console(“Someone
has just reactivated me!”);</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>// 3. CALL_NEWDROID callback with parameters,</span></p>
<p class="callbackcode0"><span>event droidBuilt(CALL_NEWDROID, 5, ref
newDroid, ref myFactory)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console(“We got a
new droid at coordinates ” &amp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
newDroid.x &amp; “-“ &amp; newDroid.y );</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>In the last example </span><span class="a"><span
>droidBuilt</span></span><span> event will be triggered
everytime a factory belonging to player </span><span class="a"><span>5</span></span><span
> produces a new droid. </span><span class="a"><span>newDroid</span></span><span
> variable refers to the new droid thatb was just built and </span><span
class="a"><span>myFactory</span></span><span> to the
factory that build this droid. This example assumes that </span><span class="a"><span
>newDroid</span></span><span> and </span><span class="a"><span
>myFactory</span></span><span> were correctly defined in
the </span><a href="#Variable_declaration"><span>Variable
Declarations</span></a><span> section. For more callbacks see </span><a
href="#Script_Function_Callbacks"><span>Script Function Callbacks</span></a><span
>.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: </span><span class="a"><span
style='font-size:12.0pt'>ref</span></span><span> keyword means that
a pointer to the provided variable is passed to the interpreter, so that a
callback can modify value of the variable.</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>It is possible to reuse a trigger for more
than one event if a trigger is declared in the <span class="a"><span
style='font-family:Arial'><a href="#Event_and_function_declaration">Event and
function declaration</a></span>. </span>Trigger declaration has following
syntax:</span></p>
<p class="normal"><span class="a"><span>&nbsp;</span></span></p>
<p class="normal"><span class="a"><span>trigger &lt;trigger_name&gt; (
&lt;trigger&gt; );</span></span></p>
<p class="normal"><span class="a"><span>&nbsp;</span></span></p>
<p class="normal"><span>Example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>trigger everySecond ( every, 10
);&nbsp;&nbsp;&nbsp; //trigger declaration</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>...</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>event eventOne( everySecond
)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // uses the trigger we
declared above</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>event eventTwo( everySecond )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // uses the trigger we declared
above</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>In this example </span><span class="a"><span
>everySecond</span></span><span> trigger is defined
outside of an event. Such a trigger can be reused by its name. Note that
trigger declaration ends with a semicolon.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><a id="String_Expressions"><span>String
Expressions</span></a></p>
<p class="normal"><span>Strings are put inside quotation marks: </span><span
class="a"><span>“some text inside quotation marks is a legal string”</span></span><span
>.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Strings can be easily concatenated using the </span><span
class="a"><span>&amp;</span></span><span> operator.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>For example: </span><span class="a"><span
>“String1” &amp; “String2”</span></span><span> will result
in </span><span class="a"><span>“String1String2”</span></span><span
>.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Strings can be compared using </span><span
class="functioncode"><span>==</span></span><span> operator
(case insensitive comparison) or </span><span class="functioncode"><span
>strcmp()</span></span><span> function.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Such data types as integers, booleans and
floats are automatically converted to strings when it is required, so given the
following variable declaration:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>private&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
float&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pi;</span></p>
<p class="code"><span>private&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myInteger;</span></p>
<p class="code"><span>private&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myString;</span></p>
<p class="code"><span>private&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
bool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myBool;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>the following line is a valid string
expression:</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>console(“value of pi is “ &amp; pi &amp; “,
value of myInteger is “ &amp; myInteger &amp; “,</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; value of
myString is “ &amp; myString &amp; “, value of myBool is “ &amp; myBool);</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="Numeric_Expressions"><span>Numeric
Expressions</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>Numeric expressions are made up of int
variables, numeric constants and functions that return int values, e.g.:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>power * 32 - basePower</span></p>
<p class="code"><span>numDroids(player) + 5</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>The possible operators are :</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>+&nbsp; -&nbsp; *&nbsp; /</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>Increment and decrement operators can only be
applied to the integer variables outside of the expression context:</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>myInteger++;</span></p>
<p class="code"><span>myInteger--;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>There are also a number of operators that
compare numeric expressions to give a boolean </span></p>
<p class="normal"><span>expression :</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>&lt;&nbsp;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
style='font-family:Arial'>Less than / Greater than</span></p>
<p class="code"><span>&lt;=
&gt;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
style='font-family:Arial'>Less or Equal / Greater or Equal</span></p>
<p class="code"><span>== !=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
style='font-family:Arial'>Equal / Not Equal</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="Boolean_Expressions"><span>Boolean
Expressions</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>Boolean expressions are made up of bool
variables, the boolean constants </span><span class="a"><span>TRUE</span></span><span
> and </span></p>
<p class="normal"><span class="a"><span>FALSE</span></span><span
> and game functions that return a boolean value e.g.:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>not droidSeen and attackDroid</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>The possible operators are:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>and or not == !=</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>The operators </span><span class="a"><span
>==</span></span><span> and </span><span class="a"><span
>!=</span></span><span> can also be used with user defined
type variables.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><a id="Floatingpoint_Expressions"><span>Floating-point
Expressions</span></a></p>
<p class="normal"><span>Floating-point expressions are very similar to
integer expressions. There are some differences though: it is not possible to
use increment/decrement operators with floating-point variables. The integral
and fractional parts of the float constant must be separated by a dot, even if
fractional part is 0.</span></p>
<p class="normal"><span>Examples:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>myFloat = 1.0 + pi / 2.0 + 3.6;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Floating point expressions cant be mixed with
integer or boolean expressions. To use integers or booleans in floating-point
expressions they must be cast to FLOATs first.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>For more information about casts refer to <a
href="#Casts">Casts</a>.</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="Assignment">Assignment</a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>The value of a variable or an expression can
be assigned to another using the = character, </span></p>
<p class="normal"><span>e.g.:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>currentDroid = foundDroid;</span></p>
<p class="code"><span>index = base + found * 4;</span></p>
<p class="code"><span>myString = “some text”;</span></p>
<p class="code"><span>myFloat = 2.0 + pi / 2.0;</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="If_statements"><span>If Statements</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>If statements are used to control which bits
of code are executed.&nbsp; The simplest form is :</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>if ( &lt;bool exp&gt; )</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>In this form if &lt;bool exp&gt; evaluates to true
then the script code &lt;code&gt; is executed, </span></p>
<p class="normal"><span>otherwise the code is ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Examples:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>if ( &lt;bool exp&gt; )</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>else</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>if ( &lt;bool exp&gt; )</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>else if ( &lt;bool exp&gt; )</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>else</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="header"><a id="While_statements"><span>While Statements</span></a></p>
<p class="normal"><span>While statements allow </span><span class="a"><span
>&lt;code&gt;</span></span><span> to be executed while </span><span
class="a"><span>&lt;bool exp&gt;</span></span><span>
evaluates to </span><span class="a"><span>TRUE</span></span><span
>:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="MsoPlainText"><span>while ( &lt;bool exp&gt; )</span></p>
<p class="MsoPlainText"><span>{</span></p>
<p class="MsoPlainText"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;code&gt;</span></p>
<p class="MsoPlainText"><span>}</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="Casts">Casts</a></p>
<p class="normal"><span>Casts convert one data type into a different one.
In WZ casts are mostly used to convert float to int, int to float and bool to
float. To perform a cast write the required data type in paranthesis.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Examples:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>myFloat = (float)myInteger + 2.3 + (float)500 +
500.0;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>myInteger = 100 + numPlayers + (int)myFloat;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: Both </span><span class="a"><span
style='font-size:12.0pt'>(float)500</span></span><span>
and </span><span class="a"><span style='font-size:12.0pt'>500.0</span></span><span
> represent the same value. When converting FLOATs to INTs fractional
part is discarded.</span></p>
<p class="note0"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><a id="Custom_Functions"><span>Custom Functions</span></a></p>
<p class="normal"><span>It is possible to define custom script
functions to reuse certain functionality throughout the script.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Function have following syntax:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>function &lt;return type&gt; &lt;function
name&gt; ( [ &lt;argument type&gt; &lt; argument name&gt; , ... ] )</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ... ;</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>Examples:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>function void displayVictoryMessage( int winner
)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console ( “Player
&amp; getPlayerName(winner) &amp; “ has won the game” );</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>function float calculateMinimum ( float f1,
float f2 )</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( f1 &lt; f2 )</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return f1;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return f2;</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Functions look almost identical to their C counterparts,
except that the beginning of a function is marked with function keyword.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>It is possible to declare function, like with
events it is done in the <span class="a"><span style='font-family:Arial'><a
href="#Event_and_function_declaration">Event and function declaration</a></span></span>
section:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><a id="Data_Types"><span>function void
displayVictoryMessage( int winner );</span></a></p>
<p class="code"><span>function float calculateMinimum ( float f1,
float f2 );</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Declared this way it is possible to use a
function before it is defined later in the script.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>To call a function simply provide its name
with parameters in paranthesis:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>displayVictoryMessage(0);</span></p>
<p class="code"><span>...</span></p>
<p class="code"><span>console(“Minimum of 2 and 2.1 is “ &amp;
calculateMinimum(2.0, 2.1) );</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Like in C </span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>return &lt;return expression&gt;;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>or for void functions just:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>return;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>returns execution to the caller.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><a id="Local_Variables"><span>Local Variables</span></a></p>
<p class="normal"><span>Local variables belong either to a function or
event where they were declared and are not accessible outside of it. Local
variables must be declared at the beginning of the function or event. Like
public/private variables local variables of the same type can be declared on
the same line separated by a comma.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Declaration of a local variable looks as
follows:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>local &lt;variable type&gt;&nbsp;&nbsp;&nbsp;
&lt;variable name&gt; [, &lt;variablename&gt;, ...] ;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>event myEvent(myTrigger)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local int count;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>function void myFunction()</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local DROID
myDroid1, myDroid2;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local string
myString;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;code&gt;</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><span>Macros</span></p>
<p class="normal"><span>Warzone Scripting language supports nested
macros (current max depth is 10).</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Macros are defined as follows:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>#define &lt;macro name&gt; &lt;macro body&gt;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>#define pi 3.14</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Example of a nested macro:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>#define CURRENT_PLAYER&nbsp; 0</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>#define CURRENT_PLAYER_NAME
getPlayerName(CURRENT_PLAYER)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>During the compilation process macro names are
replaced with the actual code.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Parametrized macros are not supported.</span></p>
<p class="note0"><span>&nbsp;</span></p>
<p class="normal"><span>If any other text but “define” follows after #
character then anything between # and end of the line is ignored by compiler
making it possible to use #region and other tags in your favorite IDE.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: “#include” is reserved but not fully
supported yet.</span></p>
<p class="header"><span>Data Types</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Apart from standard data types like string
(<b>string</b>), integer (<b>int</b>), boolean (<b>bool</b>) and floating point
(<b>float</b>) there are some warzone-specific data types available:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span class="codebold"><span>INTMESSAGE</span></span><span
> - (simple) Name of a message as defined in Messages.txt, used
mostly for campaign. In most cases it is easier to use a string instead. </span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span class="codebold"><span
>BASEOBJ</span></span><span> - (complex) any of a DROID,
FEATURE or STRUCTURE. It is a pointer to some droid/feature/structure on the
map, can be NULLOBJECT if it wasn't assigned to a particular
droid/feature/structure. <br/>
You have access to:</span></p>
<p class="MsoNormal"><span>baseobj.x<br/>
baseobj.y<br/>
baseobj.z<br/>
baseobj.id - unique id number<br/>
baseobj.player - player id<br/>
baseobj.type - one of OBJ_DROID, OBJ_STRUCTURE, OBJ_FEATURE<br/>
baseobj.health - %age number of body points left <br/>
baseobj.clusterID - the cluster the object is a member of</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span>baseobj.target
target of the object (in case of a multi-turret object returns target of the
default weapon)</span></p>
<p class="note0" style='margin-bottom:12.0pt'><span>NOTE: the
functions objToDroid, objToStructure and objToFeature exist to convert a
BASEOBJ<br/>
to a droid, structure or feature if the base obj is of the right type.</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span class="codebold"><span
>DROID</span></span><span> - (complex) defined by the ID
got from the world editor. It is a pointer to a particular droid on the map, can
be NULLOBJECT when no droid is assigned to the DROID variable. <br/>
You have access to : </span></p>
<p class="MsoNormal"><span>all BASEOBJ variables<br/>
droid.order - current order of the droid<br/>
droid.orderx - target location of the droid order<br/>
droid.ordery - target location of the droid order<br/>
droid.action - current action of the droid<br/>
droid.body - the BODY of the droid<br/>
droid.propulsion - the PROPULSION of the droid<br/>
droid.weapon - the WEAPON of the droid DROIDID - (simple) literally just an ID
of a droid</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span>droid.selected
holds TRUE if droid is currently selected<br/>
droid.group the GROUP droid belongs to</span></p>
<p class="MsoNormal"><span class="codebold"><span>FEATURE</span></span><span
> - (complex) defined by the ID got from the world editor. It is a
pointer to a map decoration, like a tree, wrecked building, oil resource etc,
can be NULLOBJECT. </span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span>You have
access to :</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span>all BASEOBJ
variables</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span class="codebold"><span
>FEATURESTAT</span></span><span> - (simple) type of a
feature as defined in features.txt.</span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span class="codebold"><span
>TEMPLATE</span></span><span> - (simple) name of a
template as defined in templates.txt</span></p>
<p class="MsoNormal"><span class="codebold"><span>STRUCTURE</span></span><span
> - (complex) defined by the ID got from the world editor. It is a
pointer to a particular structure on the map, can </span></p>
<p class="MsoNormal" style='margin-bottom:12.0pt'><span>be NULLOBJECT
when no structure is assigned to the STRUCTURE variable. </span></p>
<p class="MsoNormal"><span>You have access to :</span></p>
<p class="MsoNormal"><span>all BASEOBJ variables<br/>
structure.stat - the STRUCTURESTAT of the structure, defined in structures.txt</span></p>
<p class="normal"><span>structure.stattype structure type (like</span><span
style='font-size:13.0pt;color:black'> REF_HQ</span><span>
etc, refer to <a href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span class="codebold"><span>STRUCTUREID</span></span><span
> - (simple) literally just an ID of a struct<br/>
<span class="codebold">STRUCTURESTAT</span> - (simple) type of a structure as
defined in structures.txt</span></p>
<p class="MsoNormal"><span class="codebold"><span>BODY</span></span><span
> - (simple) name of a body as defined in body.txt <br/>
<span class="codebold">PROPULSION</span> - (simple) name of a propulsion as
defined in propulsion.txt <br/>
<span class="codebold">ECM</span> - (simple) name of a ECM as defined in ecm.txt<br/>
<span class="codebold">SENSOR</span> - (simple) name of a sensor as defined in
sensor.txt<br/>
<span class="codebold">CONSTRUCT</span> - (simple) name of a construct as defined
in construct.txt<br/>
<span class="codebold">WEAPON</span> - (simple) name of a weapon as defined in
weapons.txt<br/>
<span class="codebold">REPAIR</span> - (simple) name of a repair type as defined
in Repair.txt<br/>
<span class="codebold">BRAIN</span> - (simple) name of a brain type as defined in
Brain.txt<br/>
<span class="codebold">SOUND</span> - (simple) ID of sound used in playSound()<br/>
<span class="codebold">LEVEL</span> - ID of a level as defined in GameDesc.lev<br/>
<span class="codebold">RESEARCHSTAT</span> - (simple) name of a research topic as
defined in research.txt</span></p>
<p class="MsoNormal"><span><br/>
<span class="codebold">GROUP</span> - (complex) a group of droids. Don't confuse
GROUP with in-game units groups that can be accessed with ctrl-&lt;number&gt;,
they have nothing in common. GROUP is an internal structure used to simplify
unit management.<br/>
You have access to :</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>group.x - average x coord<br/>
group.y - average y coord<br/>
group.members - number of units in the group<br/>
group.health - average %age health of the units</span></p>
<p class="MsoNormal"><span>group.type type of the group, one of:
GT_NORMAL, GT_COMMAND or GT_TRANSPORTER (refer to <a
href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="MsoNormal"><span>group.commander commander of the group,
if type = GT_COMMAND or NULLOBJECT</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="note0"><span>NOTE: transporters and commanders can't be
added to a GROUP.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>With a complex object it is possible to
access information specific to the instance of this object. Acomplex object is
usually a pointer to a C structure in the code. For example a DROID is a complex
object - its x,y,z can be queried whereas a DROIDID (a simple object - an
integer) is just a placeholder for the numeric value of the ID.</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="header"><a id="Script_Functions"><span>Script Functions</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="code"><span>setSnow(bool)</span></p>
<p class="normal"><span>This function switchs snow on or off. TRUE will
turn snow on, FALSE will turn snow off. If rain is on when snow is started the
rain will be turned off.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>setRain(bool)</span></p>
<p class="normal"><span>This function switchs rain on or off. TRUE
will turn rain on, FALSE will turn rain off. If snow is on when rain is started
the snow will be turned off.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>setBackgroundFog(bool)</span></p>
<p class="normal"><span>This function switchs background fog on or
off. This sets the backdrop to the current fogcolour and fogs the edge of the
visible world.</span></p>
<p class="normal"><span>TRUE will turn background fog on, FALSE will
turn background fog off.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>setDepthFog(bool)</span></p>
<p class="normal"><span>This function switchs depth fog on or off.
This sets the sets fog ramping up from zero in the middle of the view to full
fog at the edge of the visible world. TRUE will turn depth fog on, FALSE will
turn depth fog off.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>setFogColour(RED, GREEN, BLUE)</span></p>
<p class="normal"><span>This function sets the fog colour, to be used
when fog is enabled. This colour is also used in the background clear when fog
is enabled.</span></p>
<p class="normal"><span>The colour is specified as RED, GREEN and BLUE
components each in the range 0 to 255. This yields a 24 bit colour value.</span></p>
<p class="normal"><span>Colour values outside the range 0 to 255 will
have an indeterminate effect.</span></p>
<p class="normal"><span>WARNING setting the fog colour to BLACK(0, 0,
0) does not turn fog off and should be avoided.</span></p>
<p class="normal"><span>Arizona: NEW 204, 149, 70 Nick approved
24/09/98&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Old 176,
143, 95&nbsp;&nbsp; B08F5F)</span></p>
<p class="normal"><span>Urban:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
201, 146, 15 C9920F</span></p>
<p class="normal"><span>Rockies:&nbsp;&nbsp;&nbsp;&nbsp; 182, 225,
236&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B6E1EC</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>enableComponent(COMPONENT, PLAYER)</span></p>
<p class="normal"><span>This function makes a component found to a
player - so that they can research a topic that requires the component
COMPONENT is any type of Body, Propulsion, Weapon, ECM, Sensor, Construct etc</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
component</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>makeComponentAvailable(COMPONENT, PLAYER)</span></p>
<p class="normal"><span>This function makes a component available to a
player - so that they can build Units using this component</span></p>
<p class="normal"><span>COMPONENT is any type of Body, Propulsion,
Weapon, ECM, Sensor, Construct etc</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
component</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>enableStructure(STRUCTURESTAT, PLAYER)</span></p>
<p class="normal"><span>This function makes a structure available to a
player - so that they can research a topic that requires the structure or build
the structure STRUCTURESTAT is defined by the name from Access</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
structure</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>enableResearch(RESEARCHSTAT, PLAYER)</span></p>
<p class="normal"><span>This function makes a research topic available
to a player regardless of its pre-requisites</span></p>
<p class="normal"><span>RESEARCHSTAT is defined by the name from
Access</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
research</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>completeResearch(RESEARCHSTAT, PLAYER)</span></p>
<p class="normal"><span>This function acts as if the research was
performed by the player giving them the results</span></p>
<p class="normal"><span>RESEARCHSTAT is defined by the name from
Access</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
research</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool objectInRange(PLAYER, X,Y, RANGE)</span></p>
<p class="code"><span>bool droidInRange(PLAYER, X,Y, RANGE)</span></p>
<p class="code"><span>bool structInRange(PLAYER, X,Y, RANGE)</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="normal"><span>These functions check for when an
object/droid/structure belonging to a player is within range of a position</span></p>
<p class="normal"><span>PLAYER is the id of the player whose unit is
checked for in range</span></p>
<p class="normal"><span>X,Y is the position to check from in world
coords</span></p>
<p class="normal"><span>RANGE is in world coords - 128 units = 1 tile</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool objectInArea(PLAYER, X1,Y1, X2,Y2)</span></p>
<p class="code"><span>bool droidInArea(PLAYER, X1,Y1, X2,Y2)</span></p>
<p class="code"><span>bool structInArea(PLAYER, X1,Y1, X2,Y2)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>These functions check for when an object/droid/structure
belonging to a player is in a square area</span></p>
<p class="normal"><span>PLAYER is the id of the player whose droid is
checked for in area</span></p>
<p class="normal"><span>X1,Y1,&nbsp; X2,Y2 is the area to check in
world coords</span></p>
<p class="normal"><span>X1,Y1 should be smaller than X2,Y2</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool droidHasSeen(OBJECT, PLAYER)</span></p>
<p class="normal"><span>This functions checks for when a player has
seen a given object - either by unit or structure</span></p>
<p class="normal"><span>OBJECT is any type of DROID, FEATURE,
STRUCTURE</span></p>
<p class="normal"><span>PLAYER is the id of the player to check for
having seen</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>addDroid(TEMPLATE, X, Y, PLAYER)</span></p>
<p class="normal"><span>This function adds a unit for the player based
on the template passed in. </span></p>
<p class="normal"><span>The unit is placed at x,y</span></p>
<p class="normal"><span>TEMPLATE is a valid template (doesn't have to
belong to the player!)</span></p>
<p class="normal"><span>X, Y are in world coords</span></p>
<p class="normal"><span>PLAYER is the id of the player whose the unit
belongs to</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>buildDroid(TEMPLATE, STRUCTURE, PLAYER,
QUANTITY)</span></p>
<p class="normal"><span>This function sets a factory defined by
STRUCTURE to build units based on the TEMPLATE for the PLAYER. </span></p>
<p class="normal"><span>TEMPLATE is a valid template (doesn't have to
belong to the player!)</span></p>
<p class="normal"><span>STRUCTURE is a structure defined by ID and
MUST BE A FACTORY</span></p>
<p class="normal"><span>PLAYER is the id of the player whose the unit
belongs to</span></p>
<p class="normal"><span>QUANTITY is the number of units that will be
built</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool buildingDestroyed(STRUCTUREID, PLAYER)</span></p>
<p class="normal"><span>This function checks that a structure (given
by the id) no longer exists for the player</span></p>
<p class="normal"><span>STRUCTUREID is the id of the structure - NB
this is different to an object of type STRUCTURE</span></p>
<p class="normal"><span>PLAYER is the id of the player whose list is
checked for the building</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool structureIdle(STRUCTURE)</span></p>
<p class="normal"><span>This function checks whether the structure is
doing anything. Returns TRUE if idle</span></p>
<p class="normal"><span>STRUCTURE is a valid structure defined by ID</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool structureBeingBuilt(STRUCTURESTAT, PLAYER)</span></p>
<p class="normal"><span>This function checks that a structure of type
STRUCTURESTAT is currently being built for the specified PLAYER</span></p>
<p class="normal"><span>STRUCTURESTAT is defined by the name from
Access</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
structure</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>bool structureBuilt(STRUCTURESTAT, PLAYER)</span></p>
<p class="normal"><span>This function checks that a structure of type
STRUCTURESTAT is currently built for the specified PLAYER</span></p>
<p class="normal"><span>STRUCTURESTAT is defined by the name from
Access</span></p>
<p class="normal"><span>PLAYER is the id of the player who gets the
structure</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>addReticuleButton(BUTTONID)</span></p>
<p class="normal"><span>This function adds a reticule button to the
interface</span></p>
<p class="normal"><span>BUTTONID is the id of a button - see <a
href="#Script_Function_Constants">Script Function Constants</a></span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>removeReticuleButton(BUTTONID)</span></p>
<p class="normal"><span>This function removes a reticule button from
the interface</span></p>
<p class="normal"><span>BUTTONID is the id of a button - see <a
href="#Script_Function_Constants">Script Function Constants</a></span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>addMessage(INTMESSAGE, MESSAGETYPE, PLAYER,
PLAY_IMMEDIATE)</span></p>
<p class="normal"><span>This adds a message to the interface for the
PLAYER</span></p>
<p class="normal"><span>INTMESSAGE is a variable defined in the values
file </span></p>
<p class="normal"><span>MESSAGETYPE is a predefined type - see <a
href="#Script_Function_Constants">Script Function Constants</a></span></p>
<p class="normal"><span>PLAYER is the player who gets the message</span></p>
<p class="normal"><span>PLAY_IMMEDIATE is a bool for whether to bring
the Intelligence Screen up with the message immediately or just store it</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>removeMessage(INTMESSAGE, MESSAGETYPE, PLAYER)</span></p>
<p class="normal"><span>This removes a message from the interface for
the PLAYER</span></p>
<p class="normal"><span>INTMESSAGE is a variable defined in the values
file </span></p>
<p class="normal"><span>MESSAGETYPE is a predefined type - see <a
href="#Script_Function_Constants">Script Function Constants</a></span></p>
<p class="normal"><span>PLAYER is the player who loses the message</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>bool selectDroidByID(DROIDID, PLAYER)</span></p>
<p class="normal"><span>This selects a unit defined by the ID since we
can't guarantee the name! Only the list of units belonging to PLAYER will be
checked. This returns TRUE if the unit could be found - it will be worth
checking it exists!</span></p>
<p class="normal"><span>DROIDID is a valid unit defined by ID</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setAssemblyPoint(X, Y, STRUCTURE)</span></p>
<p class="normal"><span>This sets the location of where new units
assemble at for a specific factory</span></p>
<p class="normal"><span>X, Y are the x and y in world coordinates</span></p>
<p class="normal"><span>STRUCTURE is a valid structure defined by ID</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>FEATURE addFeature( FEATURESTAT, X, Y )</span></p>
<p class="normal"><span>Builds a feature at position (x,y).</span></p>
<p class="normal"><span>FEATURESTAT is the name of a feature stat
defined in features.txt.</span></p>
<p class="normal"><span>The feature identifier is returned - this can
be used in e.g. destroyFeature.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>destroyFeature(FEATURE)</span></p>
<p class="normal"><span>This removes the feature from the world</span></p>
<p class="normal"><span>FEATURE is a feature defined by ID</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>centreView(OBJECT)</span></p>
<p class="normal"><span>This function centres the view on the object
supplied</span></p>
<p class="normal"><span>OBJECT is any type of DROID, FEATURE,
STRUCTURE</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>STRUCTURE addStructure( STRUCTURESTAT, PLAYER,
X, Y )</span></p>
<p class="normal"><span>Builds a structure belonging to PLAYER centred
at (X, Y).</span></p>
<p class="normal"><span>The structure must be previously enabled via
enableStructure().</span></p>
<p class="normal"><span>The structure identifier is returned - this
can be used in e.g. destroyStructure.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>destroyStructure(STRUCTURE)</span></p>
<p class="normal"><span>This removes the structure from the world</span></p>
<p class="normal"><span>STRUCTURE is a structure defined by ID</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>STRUCTURE getStructure(STRUCTURESTAT, PLAYER)</span></p>
<p class="normal"><span>This function returns the first STRUCTURE
based on the stat for the player it can find.</span></p>
<p class="normal"><span>To use it create a STRUCTURE variable and
assign it to the result of the function call.</span></p>
<p class="normal"><span>For example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>STRUCTURE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
myNewStructure;</span></p>
<p class="code"><span>STRUCTURESTAT
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Factory;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>myNewStructure = getStructure(Factory, 0);</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>This will look through the player 0 list of
structures to find a Factory and return a variable of type STRUCTURE. You will
then be able to access the x, y, and z. If a structure cannot be found than
NULL is returned . It will be worth checking that the STRUCTURE does not equal
NULL before using it. For example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>if (myNewStructure == NULLOBJECT)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do
something</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>void initEnumStruct(bool any, STRUCTURESTAT
type, int targetPlayer, int lookingPlayer)</span></p>
<p class="code"><span>STRUCTURE enumStruct()</span></p>
<p class="normal"><span>Enumerate through visible structures of given
type of player targetPlayer that are visible to lookingPlayer. Returns
NULLOBJECT when no more exist.</span></p>
<p class="normal"><span>If any is set to TRUE, then type is
ignored and all structure types will be iterated.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void InitEnumDroids(int targetPlayer,
int lookingPlayer)</span></p>
<p class="functioncode0"><span>DROID EnumDroid()</span></p>
<p class="normal"><span>Enumerate through all targetPlayers droids that
are visible to lookingPlayer. Returns NULLOBJECT when no more exist.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>TEMPLATE getTemplate(COMPONENT, PLAYER)</span></p>
<p class="normal"><span>This function returns the first TEMPLATE based
on the stat for the player it can find. It can be any type of component. To use
it create a TEMPLATE variable and assign it to the result of the function call.
For example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>TEMPLATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
myNewTemplate;</span></p>
<p class="code"><span>WEAPON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Rocket;</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>myNewTemplate = getStructure(Rocket, 0);</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>This will look through the player 0 list of
template to find one which contains a rocket and then return a variable of type
TEMPLATE. You will then be able to access its attributes. If a template cannot
be found than NULL is returned . It will be worth checking that the TEMPLATE
does not equal NULL before using it. For example:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>if (myNewTemplate == NULLTEMPLATE)</span></p>
<p class="code"><span>{</span></p>
<p class="code"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do
something</span></p>
<p class="code"><span>}</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p>
<p class="code"><span>setScrollParams(minX, minY, maxX, maxY)</span></p>
<p class="normal"><span>This literally sets the scroll settings for
the current map - be careful not to set the maxX/maxY greater than that
possible for the map!</span></p>
<p class="normal"><span>minX, minY, maxX, maxY are all numbers. These
are in TILE COORDINATES!!!!!!</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="code"><span>setScrollMinX(minX)</span></p>
<p class="normal"><span>This just sets the one variable. These are in
TILE COORDINATES!!!!!!</span></p>
<p class="normal"><span>minX is a number</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setScrollMinY(minY)</span></p>
<p class="normal"><span>This just sets the one variable. These are in
TILE COORDINATES!!!!!!</span></p>
<p class="normal"><span>minY is a number</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setScrollMaxX(maxX)</span></p>
<p class="normal"><span>This just sets the one variable. These are in
TILE COORDINATES!!!!!!</span></p>
<p class="normal"><span>maxX is a number</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setScrollMaxY(maxY)</span></p>
<p class="normal"><span>This just sets the one variable. These are in
TILE COORDINATES!!!!!!</span></p>
<p class="normal"><span>maxY is a number</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setDefaultSensor(SENSOR, PLAYER)</span></p>
<p class="normal"><span>This sets which sensor will be used as the
default when designing units in game for the specified player. The SENSOR must
be a valid DEFAULT sensor.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setDefaultECM(ECM, PLAYER)</span></p>
<p class="normal"><span>Like the above functionm, this sets which ECM
will be used as the default when designing units. Again the ECM must be a valid
DEFAULT ECM.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setStructureLimits(STRUCTURESTAT, LIMIT, PLAYER)</span></p>
<p class="normal"><span>This sets a limit for a specific structure on
how many can be built on a map. </span></p>
<p class="normal"><span>STRUCTURESTAT is defined by the name from
Access</span></p>
<p class="normal"><span>LIMIT is a number between 0 and 255</span></p>
<p class="normal"><span>PLAYER is the id of the player </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setAllStructureLimits(LIMIT, PLAYER)</span></p>
<p class="normal"><span>This sets a limit for all structures on how
many can be built on a map. </span></p>
<p class="normal"><span>LIMIT is a number between 0 and 255</span></p>
<p class="normal"><span>PLAYER is the id of the player </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>playSound( SOUND, PLAYER)</span></p>
<p class="normal"><span>Plays a '2D' sound ie speech and is audible
for the player identified</span></p>
<p class="normal"><span>SOUND is a defined type.</span></p>
<p class="normal"><span>PLAYER is the id of the player </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>playSoundPos( SOUND, PLAYER, x, y, z)</span></p>
<p class="normal"><span>Plays a '2D' sound ie speech and is audible
for the player identified</span></p>
<p class="normal"><span>Position of sound is saved so camera can move
to object playing sound if required.</span></p>
<p class="normal"><span>SOUND is a defined type.</span></p>
<p class="normal"><span>PLAYER is the id of the player</span></p>
<p class="normal"><span>x, y, z is the position of the object in game
units.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>addConsoleText( TEXTSTRING, PLAYER)</span></p>
<p class="normal"><span>Adds console text to the top of the screen
(centre justified) for the player concerned</span></p>
<p class="normal"><span>TEXTSTRING is a string ID obtained from
strings.txt</span></p>
<p class="normal"><span>PLAYER is the id of the player </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>turnPowerOn()</span></p>
<p class="normal"><span>Literally makes the power calculations be used</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>turnPowerOff()</span></p>
<p class="normal"><span>Literally stops the power calculations being
used</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setPowerLevel(POWER, PLAYER)</span></p>
<p class="normal"><span>sets the power level for a player - this
overrides any current setting there is</span></p>
<p class="normal"><span>POWER is the value to set the player's power
to</span></p>
<p class="normal"><span>PLAYER is the id of the player </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>addPower(POWER, PLAYER)</span></p>
<p class="normal"><span>adds the POWER amount to the PLAYER's current
level</span></p>
<p class="normal"><span>POWER is the value to add to the player's
power</span></p>
<p class="normal"><span>PLAYER is the id of the player </span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setLandingZone(x1, y1, x2, y2)</span></p>
<p class="normal"><span>sets the landing zone for the map. The coords
are in tile units and must all be less than 255</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setLimboLanding(x1, y1, x2, y2)</span></p>
<p class="normal"><span>sets the landing zone for the Limbo Units.The
coords are in tile units and must all be less than 255</span></p>
<p class="normal"><span>The units from the Limbo list are then placed
at this location - so call in CALL_GAME_INIT of the mission you want them to
appear in</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>initAllNoGoAreas()</span></p>
<p class="normal"><span>initialises all the no go areas to 0. Should
be called when a new map is loaded</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setNoGoArea(x1, y1, x2, y2, areaNum)</span></p>
<p class="normal"><span>defines an area that cannot be built on - used
for enemy landing zones. </span></p>
<p class="normal"><span>areaNum is a number between 0 and 7. If 0,
then this function is the same as calling setlandingZone</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>setTransporterExit( PLAYER, exitTileX, exitTileY
)</span></p>
<p class="normal"><span>setup transporter exit point on map for PLAYER</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>flyTransporterIn( PLAYER, entryTileX,
entryTileY, bool bTrackTransporter )</span></p>
<p class="normal"><span>flys PLAYER's transporter in from entry point
on map; set bTrackTransporter true to</span></p>
<p class="normal"><span>track it onto the map.</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>tutorialEnd()</span></p>
<p class="normal"><span>A bit of a hack to notify the game when the
last of the tutorial events has been run </span></p>
<p class="normal"><span>so that the console messages can be turned
back on to how they will appear for </span></p>
<p class="normal"><span>the rest of the game</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>gameOver(bool)</span></p>
<p class="normal"><span>function to call for ending the game</span></p>
<p class="normal"><span>bool - true or false depending on whether the
player has won or not</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>anyDroidsLeft(PLAYER)</span></p>
<p class="normal"><span>checks the specified player for any units -
returns TRUE if some exist, FALSE if </span></p>
<p class="normal"><span>they have all been destroyed</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>anyStructButWallsLeft(PLAYER)</span></p>
<p class="normal"><span>checks the specified player for any structures
except walls - returns TRUE if some </span></p>
<p class="normal"><span>exist, FALSE if they have all been destroyed</span></p>
<p class="code"><span>&nbsp;</span></p>
<p class="code"><span>anyFactoriesLeft(PLAYER)</span></p>
<p class="normal"><span>returns true if player has a factory/cyborg
factory/ vtol factory</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setRetreatPoint(PLAYER, x,y)</span></p>
<p class="normal"><span>sets the position for a players units to
retreat to</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setRetreatForce(int player, int level)</span></p>
<p class="normal"><span>Sets the percentage of the current force below
which units for a side will retreat</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setRetreatLeadership(int player, int
level)</span></p>
<p class="normal"><span>Sets the leadership level (chance to run away)
for a player (1-100)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>startMission(MISSION_TYPE, LEVEL)</span></p>
<p class="normal"><span>Starts a mission for the currently selected
player - NB Transporters must be filled if</span></p>
<p class="normal"><span>you want units to appear on the Mission map</span></p>
<p class="normal"><span>MISSION_TYPE is a predefined type - see <a
href="#Script_Function_Constants">Script Function Constants</a></span></p>
<p class="normal"><span>LEVEL is the name of the level to load as
defined in GameDesc.lev</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>endMission(bool)</span></p>
<p class="normal"><span>Ends the current mission the selected player
is on - returns all Units that have been </span></p>
<p class="normal"><span>loaded onto the Transporter. False if player
lost, true if player won????</span></p>
<p class="normal"><span>&nbsp;&nbsp;</span></p>
<p class="functioncode0"><span>bool allianceExists()</span></p>
<p class="normal"><span>returns true if two or more players are in
alliance. returns false otherwise.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool dominatingAlliance()</span></p>
<p class="normal"><span>returns true if there is a single dominating
alliance, using all multi-players.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool playerInAlliance()</span></p>
<p class="normal"><span>returns true if player is in an alliance</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool myResponsibility(PLAYER)</span></p>
<p class="normal"><span>returns true if this machine is responsible
for 'player' in multiplayer games.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>STRUCTURE
structureBuiltInRange(STRUCTURESTAT, X, Y, RANGE, PLAYER)</span></p>
<p class="normal"><span>Checks to see if a Structure has been built
within a specified range of x, y. The first structure</span></p>
<p class="normal"><span>to be found within this range will be
returned. Check the result of the function for being</span></p>
<p class="normal"><span>NULLOBJECT before using!</span></p>
<p class="normal"><span>STRUCTURE is a return value (structure defined
by ID)</span></p>
<p class="normal"><span>STRUCTURESTAT is defined by the name from
Access</span></p>
<p class="normal"><span>X, Y, RANGE are all in world coords</span></p>
<p class="normal"><span>PLAYER is the id of the player whose structure
list is searched</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>groupAddDroid(GROUP, DROID)</span></p>
<p class="normal"><span>Add a unit to a group</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>groupAddArea(GROUP, PLAYER, X1,Y1,
X2,Y2)</span></p>
<p class="normal"><span>Add all the units inside the rectangle X1,Y1,
X2,Y2.</span></p>
<p class="normal"><span>Only units belonging to player PLAYER are
added.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>groupAddAreaNoGroup(GROUP, PLAYER,
X1,Y1, X2,Y2)</span></p>
<p class="normal"><span>as above but doesnt add units that are already
grouped.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>groupAddGroup(group1, group2)</span></p>
<p class="normal"><span>Add all the units in group2 to group1.</span></p>
<p class="normal"><span>All the units are removed from group2.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool hasGroup(DROID droid)</span></p>
<p class="normal"><span>Returns TRUE if droid belongs to any group,
retzrns FALSE otherwise.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderDroid(DROID, order)</span></p>
<p class="normal"><span>Give a unit an order currently one of:</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_STOP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- stop current order</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_RETREAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- retreat</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_DESTRUCT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - self
destruct</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_RTR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- return to repair</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_RTB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- return to base</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_RUN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- run away for a bit (moral failure)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderDroidLoc(DROID, order, x,y)</span></p>
<p class="normal"><span>Give a unit an order with a location :</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_MOVE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- move to location</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderDroidObj(DROID, order, BASEOBJ)</span></p>
<p class="normal"><span>Give a unit an order with an object :</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_ATTACK</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- attack the object</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_HELPBUILD</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- help construct the object</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_DEMOLISH</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- demolish structure</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_REPAIR</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- repair structure</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_OBSERVE</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- (sensor units) keep a target in sensor range</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_EMBARK</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- get onto a transporter</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="a"><span>DORDER_FIRESUPPORT</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- follow this sensor unit and attack anything it DORDER_OBSERVE's</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderDroidStatsLoc(DROID, int order,
STRUCTURESTAT stats, int x, int y)</span></p>
<p class="normal"><span>Give a unit an order with stats and a location
:</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DORDER_BUILD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - build a structure at
the location</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderGroup(GROUP, order)</span></p>
<p class="normal"><span>Give all the units in the group an order</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderGroupLoc(GROUP, order, x,y)</span></p>
<p class="normal"><span>Give all the units in the group an order with
a location</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>orderGroupObj(GROUP, order, BASEOBJ)</span></p>
<p class="normal"><span>Give all the units in the group an order with
an object</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>DROID objToDroid(BASEOBJ)</span></p>
<p class="normal"><span>Convert a BASEOBJ to DROID when BASEOBJ.type
== OBJ_DROID. Returns NULLOBJECT otherwise</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>STRUCTURE objToStructure(BASEOBJ)</span></p>
<p class="normal"><span>Convert a BASEOBJ to STRUCTURE when
BASEOBJ.type == OBJ_STRUCTURE. Returns NULLOBJECT otherwise</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>FEATURE objToFeature(BASEOBJ)</span></p>
<p class="normal"><span>Convert a BASEOBJ to FEATURE when BASEOBJ.type
== OBJ_FEATURE. Returns NULLOBJECT otherwise</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int random(range)</span></p>
<p class="normal"><span>Return a random number between 0 and range -
1.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>flashOn(int buttonID)</span></p>
<p class="normal"><span>turn on flashing for a button (id's in <a
href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="normal"><span>&nbsp;... now works for all buttons not just
reticule buttons</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>flashOff(int buttonID)</span></p>
<p class="normal"><span>turn off flashing for a button</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>createAlliance(int player1, int
player2)</span></p>
<p class="normal"><span>Create an alliance between two players</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>breakAlliance(int player1, int player2)</span></p>
<p class="normal"><span>Breake an alliance between two players</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setRadarZoom(int level)</span></p>
<p class="normal"><span>level is the zoom level between 0 .. 2 on the
PC and 0 .. 1 on PSX.</span></p>
<p class="normal"><span>0 is the most zoomed out, 2 the most zoomed
in.</span></p>
<p class="normal"><span>2 is mapped to 1 if the script is run on the
PSX</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>centreViewPos(int x, int y)</span></p>
<p class="normal"><span>center the view on the world coordinates x,y.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setGroupRetreatForce(GROUP group, int
level)</span></p>
<p class="normal"><span>Sets the percentage of the current force below
which units for a side will retreat</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setGroupRetreatLeadership(GROUP group,
int level)</span></p>
<p class="normal"><span>Sets the leadership level (chance to run away)
for a player (1-100)</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setGroupRetreatPoint(GROUP group, int
x, int y)</span></p>
<p class="normal"><span>Set the retreat position for a group</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setDroidSecondary(DROID droid, int
secondaryOrder, int secondaryState)</span></p>
<p class="normal"><span>Set the state of a secondary order for a droid
(values in <a href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setGroupSecondary(GROUP group, int
secondaryOrder, int secondaryState)</span></p>
<p class="normal"><span>Set the state of a secondary order for a group
(values in <a href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setMissionTime(int time)</span></p>
<p class="normal"><span>used to specify how long an OffWorld mission
will last for - used in conjunction with the</span></p>
<p class="normal"><span>callback CALL_MISSION_TIME so that end
conditions can be displayed if the player has not</span></p>
<p class="normal"><span>managed to finish the mission</span></p>
<p class="normal"><span>If time &lt; 0, there is no limit. time is in
10th of a second</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int missionTimeRemaining()</span></p>
<p class="normal"><span>Returns how long left for the current mission.
If the mission time has not been set it will return 0.</span></p>
<p class="normal"><span>The value returned is in 10ths of a second</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setReinforcementTime(int time)</span></p>
<p class="normal"><span>this defines how long it will take for
reinforcements to arrive for an OffWorld mission</span></p>
<p class="normal"><span>If time &lt; 0, there can be no
reinforcements. Time is in 10th of a second.</span></p>
<p class="normal"><span>Set time to LZ_COMPROMISED_TIME to display
'--:--' to indicate the Transporter is unable to land</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int idleGroup(GROUP group)</span></p>
<p class="normal"><span>returns number of units in group not doing
anything.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool groupMember(GROUP group, DROID
droid)</span></p>
<p class="normal"><span>return whether a unit is a member of a group.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>initIterateGroup(GROUP group)</span></p>
<p class="normal"><span>Prepare a group to iterate through the units in
it.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>DROID iterateGroup(GROUP group)</span></p>
<p class="normal"><span>Get the next unit from the group.&nbsp; Must
be called after an initial initGroupIterate.</span></p>
<p class="normal"><span>To reset a group back to the start call
initGroupIterate.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>droidLeaveGroup(DROID droid)</span></p>
<p class="normal"><span>Make a unit leave the group it is a member of
(if any).</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>initGetFeature(STRUCTURESTAT,
PLAYER,BUCKET)</span></p>
<p class="functioncode0"><span>getFeature(BUCKET)</span></p>
<p class="normal"><span>enumerate features of a single feature type.</span></p>
<p class="normal"><span>PLAYER is the player to use, Only features
visible to that player are returned.</span></p>
<p class="normal"><span>BUCKET is an int of range 0-MAX_PLAYERS(8), so
up to 8 feature enumerations can be going on at any time! (wow)</span></p>
<p class="normal"><span>getFeature returns NULLOBJECT when no more
features are visible.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool structButNoWallsInArea(PLAYER,
X1,Y1, X2,Y2)</span></p>
<p class="normal"><span>See if there are any player structures
excluding walls in an area.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numObjectsInArea(PLAYER, X1,Y1,
X2,Y2)</span></p>
<p class="normal"><span>Return the number of player objects in an
area.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numDroidsInArea(PLAYER, X1,Y1,
X2,Y2)</span></p>
<p class="normal"><span>Return the number of player units in an area.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numStructsInArea(PLAYER, X1,Y1,
X2,Y2)</span></p>
<p class="normal"><span>Return the number of player structures in an
area.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numStructsButNotWallsInArea(PLAYER,
X1,Y1, X2,Y2)</span></p>
<p class="normal"><span>Return the number of player structures
excluding walls in an area.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>randomiseSeed()</span></p>
<p class="normal"><span>Generate a new random seed for the random
number generator.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numStructsByTypeInArea(PLAYER,
TYPE, X1,Y1, X2,Y2)</span></p>
<p class="normal"><span>Return the number of structures of a certain
type in an area.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>flushConsoleMessages()</span></p>
<p class="normal"><span>Clear all the console messages</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool
pickStructLocation(STRUCTURESTAT,ref x, ref y, player);</span></p>
<p class="normal"><span>returns true if structure of type
strucutrestat can be built at x,y.</span></p>
<p class="normal"><span>&nbsp;If a structure can be built nearby then
returns true and modifies x and y</span></p>
<p class="normal"><span>to the coords of acceptable location. Player
trying to build - uses this for the visibility</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int playerPower(int player)</span></p>
<p class="normal"><span>returns aspower[player].currentPower (players
current power)</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool seenStructInArea(int player,int
enemy,bool walls,int x1,int y1,int x2,int y2)</span></p>
<p class="normal"><span>returns true if player has seen a structure
belonging to enemy in area specified. Call with</span></p>
<p class="normal"><span>walls = true/false to include/exclude walls in
the search.</span></p>
<p class="normal"><span>(note similar to StructInArea)</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int&nbsp;&nbsp;&nbsp;
distBetweenTwoPoints(int x1, int y1, int x2, int y2)</span></p>
<p class="normal"><span>Returns the distance between the two points
given.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool losTwoObjects(BASEOBJ source,
BASEOBJ target, bool wallsMatter)</span></p>
<p class="normal"><span>Decides whether object source can see object
target and you can specify whether</span></p>
<p class="normal"><span>walls matter or not. Note that whilst target
can be anything, source needs to be</span></p>
<p class="normal"><span>something that can actually see - ie - have a
sensor like a unit or structure.</span></p>
<p class="normal"><span>Returns TRUE or FALSE</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void killStructsInArea(int player, int
buildingRef (like REF_WALL etc),</span></p>
<p class="functioncode0"><span>int x1, int y1,int x2, int y2, bool
bSeeEffect, bool bTakeFeatures)</span></p>
<p class="normal"><span>Blows up all the buildings of the specified
reference within the specified area. </span></p>
<p class="normal"><span>If bSeeEffect is set, then you'll see it blow
up (provided you can see the building</span></p>
<p class="normal"><span>in question of course).</span></p>
<p class="normal"><span>If bTakeFeatures is et, then it will also kill
features of type BUILDING.</span></p>
<p class="normal"><span>Returns 'nowt.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int getThreatInArea(int playerLooking,
int playerTarget, int x1, int y1,</span></p>
<p class="functioncode0"><span>int x2, int y2, int ldThreat, int
mdThreat, int hdThreat)</span></p>
<p class="normal"><span>Returns the threat value of all units of a
specified player within a certain area for a specified player. </span></p>
<p class="normal"><span>The user can 'calibrate' this threat value by
specifying the relative weights attached to the threats of</span></p>
<p class="normal"><span>small,medium and heavy units respectively as
the last three parameters to this function. The final boolean</span></p>
<p class="normal"><span>parameter allows the user to say whether they
care about whether or not the units in question are</span></p>
<p class="normal"><span>presently visible.. TRUE means they only add
to the threat if PlayerLooking can see this unit (owned by</span></p>
<p class="normal"><span>playerTarget), FALSE means they add to the
threat if even they can't see that unit.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool getNearestGateway(int x, int y,
ref rX, ref rY)</span></p>
<p class="normal"><span>Puts the coordinates of the nearest gateway
into reference variables rX and rY. It might not though</span></p>
<p class="normal"><span>if there are no gateways on the present map.
So make sure you look at the return value. If it's FALSE, </span></p>
<p class="normal"><span>then the values in rX and rY will be
meaningless - unchanged actually, assuming the scripting works </span></p>
<p class="normal"><span>this way. Otherwise, they'll be the
coordinates of the midpoint of the nearest gateway.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void setWaterTile(int tileNum)</span></p>
<p class="normal"><span>Sets the tile to use for underwater. Count
from the top of the tileset pcx - presently 17 for arizona.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>initIterateCluster(int clusterID)</span></p>
<p class="normal"><span>get ready to iterate a cluster</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>BASEOBJ iterateCluster()</span></p>
<p class="normal"><span>return the next object in the cluster or
NULLOBJ if none left</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>cmdDroidAddDroid(DROID commander, DROID
droid)</span></p>
<p class="normal"><span>adds the unit droid to the command group of
the command unit commander</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span style='font-family:"Courier New"'>cmdDroidMaxGroup(DROID
commander)</span></p>
<p class="normal"><span>Returns max number of droids commander can
have in his group.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool testStructureModule(int
playeNumber, ST_STRUCTURE structureToTest, int ref)</span></p>
<p class="normal"><span>Returns true if the structure in question has
a module attached - presently the ref id is unused but </span></p>
<p class="normal"><span>could be later on. At the moment it returns
true if the structure has _any_ number of modules attached.</span></p>
<p class="normal"><span>If the structure pointer that's sent in is
NULL (ie - no structure is specified), then it'll return </span></p>
<p class="normal"><span>TRUE is _any_ of the player's structures
possess _any_ module. In all other cases, it'll return FALSE.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool addTemplate(TEMPLATE, int player)</span></p>
<p class="normal"><span>given a template, gives the player the
template so that build droid can be used. At least one</span></p>
<p class="normal"><span>player must have the template.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void vanishUnit(DROID droid)</span></p>
<p class="normal"><span>Will remove 'droid' from the world without any
graphical hoo ha.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void forceDamageObject(BASEOBJ obj, int
damage)</span></p>
<p class="normal"><span>Sets 'obj' to be 'damage' percent damaged. Obj
must be a feature,droid or structure and damage </span></p>
<p class="normal"><span>must be &lt;= 100.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool getGameStatus(int StatusRequired)</span></p>
<p class="normal"><span>Gets the status of some of the game TRUE/FALSE
variables. Can be used to find if the reticule is up or the</span></p>
<p class="normal"><span>battle map is open,&nbsp; that sort of thing.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>e.g.&nbsp;&nbsp;&nbsp;
getGameStatus(STATUS_ReticuleIsOpen); will return TRUE if the reticule is open
(on screen) or FALSE if the reticule is not (disabled)</span></p>
<p class="normal"><span>or</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
getGameStatus(STATUS_BattleMapViewEnabled);&nbsp;&nbsp;&nbsp;&nbsp; will return
TRUE if we are in the battle map mode</span></p>
<p class="normal"><span>or</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; getGameStatus(STATUS_DeliveryResposInProgress); will return
TRUE if we are repositioning the delivery point</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>these are currently the only two options
implemented ... for other game modes (like design screen or intelligence map
modes)</span></p>
<p class="normal"><span>&nbsp;use the externed variable intMode</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int getPlayerColour(int player)</span></p>
<p class="normal"><span>returns the colour of the player</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void setPlayerColour(int colour, int
player)</span></p>
<p class="normal"><span>sets the colour to use for the player
specified - colour must be 0 to (MAX_PLAYERS-1)</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>DROID takeOverSingleDroid(DROID
droidToTakeOver, int playerToGain)</span></p>
<p class="normal"><span>this replaces the existing droid
(droidToTakeOver) by a new one for the playerToGain. </span></p>
<p class="normal"><span>The new droid is passed back to the script </span></p>
<p class="normal"><span>****Test for NULLOBJECT BEFORE calling this
function****</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int takeOverDroidsInArea(int fromPlayer,
int toPlayer, int x1, int y1, int x2, int y2)</span></p>
<p class="normal"><span>x1,y1,x2,y2 are in world units</span></p>
<p class="normal"><span>checks for units belonging to fromPlayer and
if they are in the area they are 'given' to the toPlayer</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int takeOverDroidsInAreaExp(int
fromPlayer, int toPlayer, int x1, int y1,</span></p>
<p class="functioncode0"><span>int x2, int y2, int level, int max)</span></p>
<p class="normal"><span>x1,y1,x2,y2 are in world units</span></p>
<p class="normal"><span>checks for units belonging to fromPlayer and
if they are in the area they are 'given' to the toPlayer</span></p>
<p class="normal"><span>if their experience level is less than or
equal to level</span></p>
<p class="normal"><span>max specifies the maximum number of units to
take over</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>STRUCTURE
takeOverSingleStructure(STRUCTURE structToTakeOver, int playerToGain)</span></p>
<p class="normal"><span>this replaces the existing structure
(structToTakeOver) by a new one for the playerToGain. </span></p>
<p class="normal"><span>The new structure is passed back to the script
</span></p>
<p class="normal"><span>****Test for NULLOBJECT BEFORE calling this
function****</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int takeOverStructsInArea(int
fromPlayer, int toPlayer, int x1, int y1,</span></p>
<p class="functioncode0"><span>int x2, int y2)</span></p>
<p class="normal"><span>x1,y1,x2,y2 are in world units</span></p>
<p class="normal"><span>checks for structures belonging to fromPlayer
and if they are in the area they are 'given' to the toPlayer</span></p>
<p class="normal"><span>This will NOT WORK for the selectedPlayer on
any Factory. The structure limits will be increased if necessary</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void resetStructTargets()</span></p>
<p class="normal"><span>reset the structure preferences</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void resetDroidTargets()</span></p>
<p class="normal"><span>reset the unit preferences</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void setStructTarPref(int type)</span></p>
<p class="normal"><span>set a prefered structure target type, repeated
calls combine the effect</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void setStructTarIgnore(int type)</span></p>
<p class="normal"><span>set structure target ignore types</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void setDroidTarPref(int type)</span></p>
<p class="normal"><span>set prefered unit target types</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void setDroidTarIgnore(int type)</span></p>
<p class="normal"><span>set unit target ignore types</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>STRUCTURE structTargetInArea(int
targetPlayer, int visibleToPlayer, int x1, int y1, int x2, int y2)</span></p>
<p class="normal"><span>get a structure target in an area using the
preferences</span></p>
<p class="normal"><span>targetPlayer is the player to choose targets
from, visibleToPlayer specifies the</span></p>
<p class="normal"><span>player that has to be able to see the target
or -1 for no visibility check</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>STRUCTURE structTargetOnMap(int
targetPlayer, int visibleToPlayer)</span></p>
<p class="normal"><span>get a structure target on the map using the
preferences</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>DROID droidTargetInArea(int
targetPlayer, int visibleToPlayer, int x1, int y1, int x2, int y2)</span></p>
<p class="normal"><span>get a unit target in an area using the
preferences</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>DROID droidTargetOnMap(int
targetPlayer, int visibleToPlayer)</span></p>
<p class="normal"><span>get a unit target on the map using the
preferences</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>BASEOBJ targetInCluster(int clusterID,
int visibleToPlayer)</span></p>
<p class="normal"><span>get a target from a cluster using the
preferences</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void fireWeaponAtObj(WEAPON weap,
BASEOBJ target)</span></p>
<p class="normal"><span>fire a single shot of the weapon weap at the
object target</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void fireWeaponAtLoc(WEAPON weap, int
x, int y)</span></p>
<p class="normal"><span>fire a single shot of the weapon weap at the
location x,y</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool isStructureAvailable(STRUCTURESTAT
stat, int player)</span></p>
<p class="normal"><span>PC ONLY FOR NOW. returns true if structure is
available to player, false otherwise.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool structureComplete(STRUCTURE struct)</span></p>
<p class="normal"><span>PC ONLY FOR NOW. returns true if the structure
is completely built.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int getDroidCount(int player)</span></p>
<p class="normal"><span>returns the number of units on the current map
for the specified player</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>setDroidKills(DROID droid, int kills)</span></p>
<p class="normal"><span>sets the number of kills for a unit.&nbsp; currently
the level boudaries are:</span></p>
<p class="normal"><span>4, 8, 16, 32, 64, 128, 256, 128</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>resetPlayerVisibility(int player)</span></p>
<p class="normal"><span>reset the visibility for a player</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void resetLimboMission(void)</span></p>
<p class="normal"><span>This can only be called mid Limbo Expand
mission - the units that were stored in the</span></p>
<p class="normal"><span>mission list at the start of the mission are
added back into the map, and the mission</span></p>
<p class="normal"><span>type is changed to an Expand Mission.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int killDroidsInArea(int x1, int y1,
int x2, int y2, int player)</span></p>
<p class="normal"><span>Kills all the player's units within the area defined.
Returns how many it wiped out.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>traceOn()</span></span><span
>&nbsp; -- view the script debug info to stdout.</span></p>
<p class="functioncode0"><span>traceOff()</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool applyLimitSet (void)</span></p>
<p class="normal"><span>Apply the limits set in the structure limits
screen.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool isHumanPlayer (int pl)</span></p>
<p class="normal"><span>Returns true is pl is human.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void offerAlliance (int p1, int p2)</span></p>
<p class="normal"><span>Make p1 offer p2 an alliance</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool allianceExistsBetween (int p1 ,
int p2)</span></p>
<p class="normal"><span>True if alliance exists between p1 and p2.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void skDoResearch ( STRUCTURE str , int
pl , int bias)</span></p>
<p class="normal"><span>Make player pl do some research with structure
str.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>BASEOBJECT&nbsp;&nbsp; skLocateEnemy(
int pl)</span></p>
<p class="normal"><span>Return a baseobject of interest belonging to
player pl.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool&nbsp;&nbsp; skCanBuildTemplate (
int pl, STRUCTURE str, TEMPLATE tem)</span></p>
<p class="normal"><span>True when player pl can build design tem with
structure str.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool&nbsp;&nbsp; skVtolEnableCheck( int
pl)</span></p>
<p class="normal"><span>True when player pl is actively using vtols.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int&nbsp;&nbsp;&nbsp;
skGetFactoryCapacity( STRUCTURE str)</span></p>
<p class="normal"><span>Return the capacity of factory str.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void&nbsp;&nbsp; skDifficultyModifier(
int pl)</span></p>
<p class="normal"><span>Apply the frontend slider settings to player
pl.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool&nbsp;&nbsp; skDefenseLocation (ref
int x , ref int y , STRUCTURESTAT defenceStat,</span></p>
<p class="functioncode0"><span>STRUCTURESTAT wallstat, DROID unit, int
player)</span></p>
<p class="normal"><span>Given a starting x and y, make unit unit
belonging to player build either a defenceStat or a row of wallStats.
returns </span></p>
<p class="normal"><span>Modified x and ys.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void&nbsp;&nbsp; skFireLassat (int pl,
BASEOBJECT obj)</span></p>
<p class="normal"><span>Fire lassat of player pls at object obj.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void <span class="a">setEventTrigger(EVENT
event, TRIGGER newTrigger)</span></span></p>
<p class="normal"><span>Assigns <span class="a"><span style='font-family:
Arial'>newTrigger</span></span> as new trigger for event event.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void dropBeacon (string msg, int
forPlayer, int, fromPlayer,</span></p>
<p class="functioncode0"><span>int x, int y, int z)</span></p>
<p class="normal"><span>Put a flashing beacon on the map for player
forPlayer on position x/y. Unless removed manually the beacon is removed
automatically from the map after a timeout.</span></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void removeBeacon (int forPlayer, int
fromPlayer)</span></p>
<p class="normal"><span>Remove a previously placed beacon from the
map.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int max(int value1, int value2)</span></p>
<p class="functioncode0"><span>int min(int value1, int value2)</span></p>
<p class="normal"><span>Returns maximum/minimum of two integer values.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>float fmax(float value1, float value2)</span></p>
<p class="functioncode0"><span>float fmin(float value1, float value2)</span></p>
<p class="normal"><span>Returns maximum/minimum of two float values.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool fogTileInRange(ref int tileX, ref
int tileY, int x, int y,</span></p>
<p class="functioncode0"><span>int rangeX, int rangeY, int
searchRange, int player, int threatRange)</span></p>
<p class="normal"><span>Fills tileX/tileY with coordinates of the
unrevealed location in range with starting location x/y, range searchRange
and closest to location x/y. If searchRange is -1, then entire map is being
searched. Player is the player who is looking for an unrevealed map location.
If threatRange != -1 then also checks for enemy presence. Locations with
enemy presence are ignored then.</span></p>
<p class="normal"><span>Returns TRUE if any locations satisfying the
search conditions were found, returns FALSE otherwise.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool mapRevealedInRange(int x, int y,
int range, int player)</span></p>
<p class="normal"><span>Returns TRUE if there are no unrevealed tiles
left in locations for player player with center x/y and radius range. All
coordinates are in world units.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool pursueResearch(STRUCTURE resFac,
int player, RESEARCH targetResearch)</span></p>
<p class="normal"><span>Makes resFac start researching the first
prerequisite necessary for targetResearch. If no prerequisites are left, then
targetResearch will be researched. Must be called again for the next
prerequisite. resFac must be a valid research facility.</span></p>
<p class="normal"><span>Returns TRUE if started researching, FALSE
otherwise.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numResearchLeft(int player,
RESEARCH research)</span></p>
<p class="MsoNormal"><span>Returns number of reserach topics that are
left for player player to research in order for a certain research research
to become available.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool researchFinished(RESEARCH
research, int player)</span></p>
<p class="normal"><span>Returns TRUE if player has researched
research.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool researchStarted(RESEARCH research,
int player)</span></p>
<p class="normal"><span>Returns TRUE if research is currently being
researched by player.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool threatInRange(int player, int
rangeX, int rangeY, int range, bool includeVTOLs)</span></p>
<p class="normal"><span>Returns TRUE if theres a danger for player
at location x/y within radius range. If includeVTOLs is set to FALSE then
VTOLs are ignored. All coordinates are in worls units. If range == -1 then
entire map will be searched.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int&nbsp;&nbsp; numEnemyWeapDroidsInRange(int
lookingPlayer, int x, int y,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int
range, bool includeVTOLs)</span></p>
<p class="functioncode0"><span>int&nbsp;&nbsp;
numEnemyWeapStructsInRange(int lookingPlayer, int x, int y, int
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range, bool onlyFinishedStructs)</span></p>
<p class="functioncode0"><span>int&nbsp;&nbsp;
numEnemyWeapObjInRange(int lookingPlayer, int x, int y,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int
range, bool includeVTOLs, bool onlyFinishedStructs)</span></p>
<p class="normal"><span>Return total number of enemy military objects
(either structures, droids or both) at location x/y and within range. Units
belonging to lookingPlayer and his allies are ignored.</span></p>
<p class="normal"><span>If includeVTOLs is set to FALSE, then VTOLs are
ignored.</span></p>
<p class="normal"><span>If onlyFinishedStructs is set to TRUE, then
unfinished structures will be ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numFriendlyWeapDroidsInRange(int
lookingPlayer, int x, int y,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int
range, bool includeVTOLs)</span></p>
<p class="functioncode0"><span>int numFriendlyWeapStructsInRange(int
lookingPlayer, int x, int y, int &nbsp; range, bool onlyFinishedStructs)</span></p>
<p class="functioncode0"><span>int numFriendlyWeapObjInRange(int
lookingPlayer, int x, int y,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int
range, bool includeVTOLs, bool onlyFinishedStructs)</span></p>
<p class="normal"><span>Return total number of friendly military
objects (either structures, droids or both) at location x/y and within range.
Units belonging to enemies of lookingPlayer are ignored.</span></p>
<p class="normal"><span>If includeVTOLs is set to FALSE, then VTOLs
are ignored.</span></p>
<p class="normal"><span>If onlyFinishedStructs is set to TRUE, then
unfinished structures will be ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numPlayerWeapDroidsInRange(int
targetPlayer, int lookingPlayer,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int x,
int y, int range, bool includeVTOLs)</span></p>
<p class="functioncode0"><span>int numPlayerWeapStructsInRange(int
targetPlayer, int lookingPlayer,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int x,
int y, int range, bool onlyFinishedStructs)</span></p>
<p class="functioncode0"><span>int numPlayerWeapObjInRange(int
targetPlayer, int lookingPlayer,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int x,
int y, int range, bool includeVTOLs, bool onlyFinishedStructs)</span></p>
<p class="normal"><span>Returns total number of targetPlayers
military objects (either structures, droids or both) at location x/y and within
range that are visible visible by lookingPlayer.</span></p>
<p class="normal"><span>If includeVTOLs is set to FALSE, then VTOLs
are ignored.</span></p>
<p class="normal"><span>If onlyFinishedStructs is set to TRUE, then
unfinished structures will be ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numEnemyObjInRange(int
lookingPlayer, int, x, int y, int range, bool includeVTOLs, bool
onlyFinishedStructs)</span></p>
<p class="normal"><span>Returns total number of enemy objects
(structures and units) at location x/y within range range that are visible to
lookingPlayer.</span></p>
<p class="normal"><span>If includeVTOLs is set to FALSE, then VTOLs
are ignored.</span></p>
<p class="normal"><span>If onlyFinishedStructs is set to TRUE, then
unfinished structures will be ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int numAAinRange(int targetPlayer, int
lookingPlayer,</span></p>
<p class="functioncode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int x,
int y, int range)</span></p>
<p class="normal"><span>Returns number of targetPlayers AA defences at
location x/y within range range that are visible to lookingPlayer.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool objHasWeapon(BASEOBJ object)</span></p>
<p class="normal"><span>Returns TRUE if object has a weapon.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool objectHasIndirectWeapon(BASEOBJ
object)</span></p>
<p class="normal"><span>Returns TRUE if object has an indirect
weapon.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool alliancesLocked()</span></p>
<p class="normal"><span>Returns TRUE if the game doesnt allow to
break alliances (ie when team mode is on).</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void selectDroid(DROID droid, bool
select)</span></p>
<p class="normal"><span>Depending on value of select selects or
deselects droid droid.</span></p>
<p class="functioncode0"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void selectGroup(GROUP group, bool
select)</span></p>
<p class="normal"><span>Depending on value of select selects or
deselects all droids belonging to group group.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int modulo(int divident, int divisor)</span></p>
<p class="normal"><span>Returns result of calculation (divident modulo
divisor).</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>float toPow(float base, float exponent)</span></p>
<p class="normal"><span>Returns floating-point result of calculation
base^exponent.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>float exp(float exponent)</span></p>
<p class="normal"><span>Exponential function. Returns the result of e^exponent.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>float sqrt(float argument)</span></p>
<p class="normal"><span>Square root function. Returns square root of
the argument: &#8730;argument.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>string getPlayerName(int player)</span></p>
<p class="normal"><span>Returns in-game name of player.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool setPlayerName(int player, string
newName)</span></p>
<p class="normal"><span>Set players name to newName. Returns TRUE
on success.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void console(string message)</span></p>
<p class="normal"><span>Outputs message to game console.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void msg(string message, int
playerFrom, int playerTo)</span></p>
<p class="normal"><span>Sends a chat message from playerFrom to
playerTo.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool strcmp(string string1, string
string2)</span></p>
<p class="normal"><span>Returns TRUE if string1 and string2 are
identical. Comparison is case-sensitive.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span style='font-family:"Courier New"'>int
calcDroidPower(DROID droid)</span></p>
<p class="normal"><span>Returns cost of the droid.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>bool&nbsp;isVtol(DROID droid)</span></p>
<p class="normal"><span>Returns TRUE if droid is a vtol.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int enemyWeapObjCostInRange(int
lookingPlayer, int rangeX, int rangeY, int range, bool includeVtols, bool onlyFinishedStructs)</span></p>
<p class="normal"><span>Returns total cost (in power) of enemy objects
with a weapon in a certain area.</span></p>
<p class="normal"><span>If includeVTOLs is set to FALSE, then VTOLs are
ignored.</span></p>
<p class="normal"><span>If onlyFinishedStructs is set to TRUE, then
unfinished structures will be ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>int friendlyWeapObjCostInRange(int
lookingPlayer, int rangeX, int rangeY, int range, bool includeVtols, bool onlyFinishedStructs)</span></p>
<p class="normal"><span>Returns total cost (in power) of friendly
objects with a weapon in a certain area.</span></p>
<p class="normal"><span>If includeVTOLs is set to FALSE, then VTOLs are
ignored.</span></p>
<p class="normal"><span>If onlyFinishedStructs is set to TRUE, then
unfinished structures will be ignored.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><a id="Debugging_Script_Functions"><span>Debugging
Script Functions</span></a></p>
<p class="normal"><span>The following functions can be used to debug
warzone scripts.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void dbgMsgOn(int player, bool on)</span></p>
<p class="normal"><span>Depending on the value of on turns on/off
debug output of dbg() and ASSERT() function which are listed below.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void dbg(string debugMessage, int
player)</span></p>
<p class="normal"><span>Outputs debugMessage to the game console if
debug output for player player was previously turned on with dbgMsgOn().</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void ASSERT(bool assertExpression,
string assertMessage, int player)</span></p>
<p class="normal"><span>If assertExpression evaluates to FALSE, then
assertMessage is output to the game console. Must turn on debug output for
player with dbgMsgOn() first.</span></p>
<p class="note0"><span>NOTE: in debug game builds failed assertation
will cause&nbsp; game assertation.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void debug(string debugText)</span></p>
<p class="normal"><span>Writes debugText to the standart output
(usually a log file).</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="functioncode0"><span>void printCallStack()</span></p>
<p class="normal"><span>Outputs script call stack to the standard log
file.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="header"><a id="Script_Function_Constants"><span>Script
Function Constants</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>These values are used to represent numbers
that are constant throughout the game.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NULLOBJECT</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - used
to check that a BASEOBJECT/FEATURE/STRUCTURE has
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; been
assigned by a function</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NULLTEMPLATE</span></span><span>&nbsp; - used to check that a
TEMPLATE has been assigned by a function</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NULLSTAT</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- used to check that a BASESTAT has been assigned by a function</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
BARBARIAN1</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - this
can used to represent enemy1 (PC:player 6, PSX:player2)</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
BARBARIAN2</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - this
can used to represent enemy2 (PC:player 7, PSX:player3)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>BUTTONID - these values are used when a
particular reticule button needs to be identified</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
OPTIONS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="note"><span style='font-size:11.0pt'>- NOTE - this
currently references the command button</span></span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CANCEL</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUILD</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MANUFACTURE</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RESEARCH</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
INTELMAP</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DESIGN</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMMAND</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;- When flashing an icon - with
scrFlashOn()&nbsp; scrFlashOff()</span></p>
<p class="normal"><span>you can additional use</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_OPTIONS</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IDRET_CANCEL
</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_BUILD </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_MANUFACTURE </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_RESEARCH </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_INTEL_MAP </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_DESIGN </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDRET_COMMAND </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDDES_TEMPLSTART&nbsp;&nbsp; </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDDES_SYSTEMBUTTON </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDDES_BODYBUTTON </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IDDES_PROPBUTTON</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>MESSAGETYPE - these values are used when a
type of message needs to be identified</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RES_MSG</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CAMP_MSG</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MISS_MSG</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
PROX_MSG</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Multiplayer alliance types:</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NO_ALLIANCES</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- alliances are disallowed</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ALLIANCES</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- alliances are allowed</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ALLIANCES_TEAMS</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- team mode, locked alliances</span></p>
<p class="normal"><span>&nbsp;&nbsp;</span></p>
<p class="normal"><span>MISSIONTYPE - these values are used when a
type of mission needs to be identified</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CAMP_START</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - used
for the starting point of a campaign</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CAMP_EXPAND</span></span><span>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - used
to expand a current campaign map</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
OFF_KEEP</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - used
to load up an off world map, but keeping access</span></p>
<p class="normal" style='margin-left:106.2pt'><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; to factories and research facilities back at home base</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
OFF_CLEAR</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - used
to load up an off world map, but having no access to home base</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="constantscode"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
LZ_COMPROMISED_TIME</span></span><span> - value to set the
reinforcement time with to display '--:--'</span></p>
<p class="normal" style='margin-left:106.2pt;text-indent:35.4pt'><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; when the Transporter is unable to land</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Droid Orders:</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_NONE</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- no order assigned</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_STOP</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- stop current order</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_RETREAT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- retreat</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_DESTRUCT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- self destruct</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_RTR</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- return to repair</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_RTB</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- return to base</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_RUN</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- run away for a bit (moral failure)</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_MOVE</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- move to location</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_ATTACK</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- attack the object</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_HELPBUILD</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
help construct the object</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_DEMOLISH</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- demolish structure</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_REPAIR</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- repair structure</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_OBSERVE</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- (sensor units) keep a target in sensor range</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_EMBARK</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- get onto a transporter</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_FIRESUPPORT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - follow this sensor unit
and attack anything it DORDER_OBSERVE's</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class="constantscode"><span>DORDER_SCOUT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- same as move, but stop if enemy units are encountered.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Unit secondary orders:</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSO_ATTACK_RANGE</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSO_REPAIR_LEVEL</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSO_ATTACK_LEVEL</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSO_RECYCLE</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>DSO_PATROL</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- patrol between current pos and next move target</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>DSO_HALTTYPE</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- what to do when stopped</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>DSO_RETURN_TO_LOC</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- return to various locations</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Unit secondary states:</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_ARANGE_SHORT</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_ARANGE_LONG</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_ARANGE_DEFAULT</span></p>
<p class="constantscode0"><span>&nbsp;</span></p>
<p class="MsoNormal" style='text-indent:35.4pt'><span class="constantscode"><span
>DSS_REPLEV_LOW</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Medium Damage Taken</span></p>
<p class="MsoNormal" style='text-indent:35.4pt'><span class="constantscode"><span
>DSS_REPLEV_HIGH</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Heavy Damage Taken</span></p>
<p class="MsoNormal" style='text-indent:35.4pt'><span class="constantscode"><span
>DSS_REPLEV_NEVER</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Never Repair</span></p>
<p class="constantscode0"><span>&nbsp;</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_ALEV_ALWAYS</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_ALEV_ATTACKED</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_ALEV_NEVER</span></p>
<p class="constantscode0"><span>&nbsp;</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span class="constantscode"><span
>DSS_PATROL_SET</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(0 to clear)</span></p>
<p class="constantscode0"><span>&nbsp;</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_HALT_HOLD</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_HALT_GUARD</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DSS_HALT_PERSUE</span></p>
<p class="constantscode0"><span>&nbsp;</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span class="constantscode"><span
>DSS_RECYCLE_SET</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(0 to clear)</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span>&nbsp;</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span class="constantscode"><span
>DSS_RTL_REPAIR</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(0 to clear)</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span class="constantscode"><span
>DSS_RTL_BASE</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(0 to clear)</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span class="constantscode"><span
>DSS_RTL_TRANSPORT</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(0 to clear)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Button ID's:</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_OPTIONS</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
option button</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_BUILD</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- build button</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_MANUFACTURE</span></span><span
>&nbsp;&nbsp;&nbsp; - manufacture button</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_RESEARCH</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - research
button</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_INTEL_MAP</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - intelligence map button</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_DESIGN</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- design units button</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>IDRET_CANCEL</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- central cancel button</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Unit types:</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_WEAPON</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Weapon unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_SENSOR</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Sensor unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_ECM</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ECM unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_CONSTRUCT&nbsp;&nbsp;&nbsp;
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-
Constructor unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_PERSON</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- person</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_CYBORG</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- cyborg/super cyborg</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_TRANSPORTER</span></span><span
>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-
guess what this is!</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_COMMAND</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Command unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>DROID_REPAIR</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Repair Unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New"'>DROID_CYBORG_CONSTRUCT</span><span
> &nbsp;- Cyborg engineer</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New"'>DROID_CYBORG_REPAIR</span><span
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Cyborg mechanic</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Structure types:</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_HQ</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_FACTORY</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_FACTORY_MODULE
</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_POWER_GEN</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_POWER_MODULE</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_RESOURCE_EXTRACTOR</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_DEFENSE</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_WALL</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>REF_WALLCORNER</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- corner wall - no gun</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_RESEARCH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_RESEARCH_MODULE
</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_REPAIR_FACILITY</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>REF_COMMAND_CONTROL</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- control centre for command units</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_CYBORG_FACTORY</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_VTOL_FACTORY</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_REARM_PAD</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>REF_MISSILE_SILO</span></p>
<p class="constantscode0"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Multiplayer Game Types:</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>SKIRMISH</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>DMATCH</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>CAMPAIGN</span></p>
<p class="constantscode0" style='text-indent:35.4pt'><span>TEAMPLAY</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>MultiPlayer Base Configurtations:</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>CAMP_CLEAN</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- build units only</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>CAMP_BASE</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- small base</span></p>
<p class="normal" style='text-indent:35.4pt'><span class="constantscode"><span
>CAMP_WALLS</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- defensive base</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Cursor Mode (possible values of cursorType):</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_SELECT</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_ATTACK</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_MOVE</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_JAM</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_PICKUP</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_DEFAULT</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGE_CURSOR_SEEKREPAIR</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_BUILD</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_GUARD</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_BRIDGE</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_ATTACH</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_LOCKON</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_FIX</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IMAGE_CURSOR_EMBARK</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Game mode - possible values for intMode
external variable</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_NORMAL</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Standard mode (just the reticule)</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_OPTION</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Option screen</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_EDITSTAT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Stat screen up for placing objects</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_EDIT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Edit mode</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_OBJECT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Object screen</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_STAT</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Object screen with stat screen</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_CMDORDER</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Object screen with command units and orders screen</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_DESIGN</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Design screen</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_INTELMAP</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Intelligence Map</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
int_ORDER</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_INGAMEOP</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- in game options.</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_TRANSPORTER</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Loading/unloading a
Transporter</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_MISSIONRES</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Results of
a mission display.</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>int_MULTIMENU</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
multiplayer only, player stats etc...</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Possible options for getGameStatus():</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>STATUS_ReticuleIsOpen</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- returns true is the reticule is open</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class="constantscode"><span>STATUS_BattleMapViewEnabled</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - returns
true if we are in battlemap mode</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Possible values for targetedObjectType:</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_TERRAIN </span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_RESOURCE</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_BLOCKING</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_RIVER</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_TRENCH</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_OWNSTRDAM</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_OWNSTROK</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_OWNSTRINCOMP</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_REPAIR</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_REPAIRDAM</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_ENEMYSTR</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_TRANDROID</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_OWNDROID</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_OWNDROIDDAM</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_ENEMYDROID</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_COMMAND</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_ARTIFACT</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_DAMFEATURE</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MT_SENSOR</span></p>
<p class="constantscode0"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MT_WRECKFEATURE</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Structure Target preference types:</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_HQ</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_FACTORY</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_POWER_GEN</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_RESOURCE_EXTRACTOR</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_WALL</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_RESEARCH</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_REPAIR_FACILITY</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_COMMAND_CONTROL</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_CYBORG_FACTORY</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_VTOL_FACTORY</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_REARM_PAD</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_SENSOR</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_DEF_GROUND</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_DEF_AIR</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>ST_DEF_IDF</span></p>
<p class="MsoNormal" style='margin-left:35.4pt'><span class="constantscode"><span
>ST_DEF_ALL</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- ground/air/idf structures</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Unit target preference types:</span></p>
<p class="normal"><span>turret types:</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_COMMAND</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_SENSOR</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_CONSTRUCT</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_REPAIR</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_WEAP_GROUND</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_WEAP_AIR</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_WEAP_IDF</span></p>
<p class="normal" style='margin-left:35.4pt'><span class="constantscode"><span
>DT_WEAP_ALL</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- ground/air/idf units</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Body types:</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_LIGHT</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_MEDIUM</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_HEAVY</span></p>
<p class="normal" style='margin-left:35.4pt'><span class="constantscode"><span
>DT_SUPER_HEAVY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span>- transporter only</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Propulsion:</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_TRACK</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_HTRACK</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_WHEEL</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_LEGS</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_GROUND</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_VTOL</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>DT_HOVER</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Group types:</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>GT_NORMAL</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>GT_COMMAND</span></p>
<p class="constantscode0" style='margin-left:35.4pt'><span>GT_TRANSPORTER</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="header"><a id="Script_Function_Externals"><span>Script Function
Externals</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>These represent variables that are defined in
the game which can be accessed in the scripts. It will only be possible to set
the value that is held for some of the variables. </span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>mapWidth</span></span><span
> - (get) - field to hold the width of the map</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>mapHeight</span></span><span
> - (get) - field to hold the height of the map</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>gameInitialised</span></span><span
> - (get) flag to specify when all initialisation has been performed
for the game - use it in place of a bool ie can be considered to equal true or
false</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>selectedPlayer</span></span><span
> - (get) field to hold the currently selected player</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>gameTime</span></span><span
> - (get) the current time in the game (in 1/10 sec)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>multiPlayerGameType</span></span><span
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - (get) the type of multiplayer game
underway.</span></p>
<p class="normal"><span class="functioncode"><span>multiPlayerMaxPlayers</span></span><span
> &nbsp;&nbsp;&nbsp; - max number of human players in this game.(see
constants for return values)</span></p>
<p class="normal"><span class="functioncode"><span>multiPlayerBaseType</span></span><span
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - campaign game base type. (see
constants for return values)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>multiPlayerAlliancesType</span></span><span
>&nbsp;&nbsp; - (get) alliance type (eg NO_ALLIANCES etc, see <a
href="#Script_Function_Constants">Script Function Constants</a>)</span><span
style='font-size:13.0pt;color:maroon'> </span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>scrollX</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - (get/set) field to hold the
starting x coordinate where the player can scroll</span></p>
<p class="normal"><span class="functioncode"><span>scrollY</span></span><span
>&nbsp; - (get/set) field to hold the starting y coordinate where the
player can scroll</span></p>
<p class="normal"><span class="functioncode"><span>scrollWidth</span></span><span
> - (get/set) field to hold the width the player can scroll</span></p>
<p class="normal"><span class="functioncode"><span>scrollHeight</span></span><span
> - (get/set) field to hold the height the player can scroll</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>cursorType</span></span><span
>&nbsp;&nbsp; - (get)&nbsp; - Gets the current mode that the cursor
is in (e.g. IMAGE_CURSOR_BUILD ... see <a href="#Script_Function_Constants">Script
Function Constants</a>)</span></p>
<p class="normal"><span class="functioncode"><span>intMode</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
(get)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
Get the current game mode (e.g. int_DESIGN when the design screen is active)
... see <a href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>targetedObjectType</span></span><span
> - (get) - The type of the object currently under the cursor (one of
MT_... see <a href="#Script_Function_Constants">Script Function Constants</a>)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>bool</span></span><span
> </span><span class="functioncode"><span>extraVictoryFlag</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp; - use to mark additional victory conditions
have been met - reset to FALSE at start of each level</span></p>
<p class="normal"><span class="functioncode"><span>bool</span></span><span
> </span><span class="functioncode"><span>extraFailFlag</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - use to mark additional
failure conditions have been met - reset to FALSE at start of each level</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="functioncode"><span>GameLevel</span></span><span
> (get/set) set single player difficulty.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="header"><a id="Script_Function_Callbacks"><span>Script
Function Callbacks</span></a></p>
<p class="MsoPlainText"><span>&nbsp;</span></p>
<p class="normal"><span>These are used in the place of a trigger and
are for events that are to be called at specific times in the game. They will
cause the event they are associated with to be called every time unless the
trigger for the event is set to inactive.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_GAMEINIT</span></span><span
> - this is triggered when the game has initialised</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DROIDDESIGNED</span></span><span
> - this is triggered when the player saves a template design</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DROIDBUILT</span></span><span
> - this is triggered when a unit has been built via a factory</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_POWERGEN_BUILT</span></span><span
> - this is triggered when a Power generatot has been built</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_RESEX_BUILT</span></span><span
> - this is triggered when a Resource Extractor has been built</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_RESEARCH_BUILT</span></span><span
> - this is triggered when a Research Facility has been built</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_FACTORY_BUILT</span></span><span
> - this is triggered when a Factory has been built</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_MISSION_START</span></span><span
> - this is triggered when CTRL + 'M' is pressed so that the script
can start a mission</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_MISSION_END</span></span><span
> - this is triggered when CTRL + 'B' is pressed so that the script
can end a mission</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_VIDEO_QUIT</span></span><span
> - this is triggered when the CURRENT video sequence is over -
either end of anim or when 'ESC' has been pressed</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_LAUNCH_TRANSPORTER</span></span><span
> - this is triggered when the 'Launch' button is pressed on the
Transporter interface</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_START_NEXT_LEVEL</span></span><span
> - this is triggered when a new level is desired</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_TRANSPORTER_REINFORCE</span></span><span
> - this is triggered when a transporter carrying reinforcements for
player 0 enters the map</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_MISSION_TIME</span></span><span
> - this is triggered when the time specified by setMissionTime() has
elapsed</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_ELECTRONIC_TAKEOVER</span></span><span
> - triggered when a unit or a structure for the selectedPlayer are
taken over using Electronic weapons</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Callbacks with parameters:</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_RESEARCHCOMPLETED,
ref RESEARCHSTAT, ref STRUCTURE</span></span></p>
<p class="normal"><span>This is triggered when a research topic is
complete - major or minor.</span></p>
<p class="normal"><span class="callbackcode"><span style='font-family:Arial'>RESEARCHSTAT
is the research topic that was complete, STRUCTURE is research facility that
has completed research.</span></span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_NEWDROID, player, ref DROID,ref
STRUCTURE</span></p>
<p class="normal"><span>triggered when a unit for player is built by a
factory.&nbsp; DROID is the unit that was built</span></p>
<p class="normal"><span>structure is the factory that built it, dont
assume that the factory is still there!!</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_STRUCT_ATTACKED, player, ref
STRUCTURE, ref BASEOBJ</span></p>
<p class="normal"><span>triggered when a structure for player is
attacked.&nbsp; STRUCTURE is the attacked structure,</span></p>
<p class="normal"><span>BASEOBJ is the unit that attacked the
structure (could be NULLOBJECT)</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_DROID_ATTACKED, player, ref DROID,
ref BASEOBJ</span></p>
<p class="normal"><span>triggered when a unit for player is
attacked.&nbsp; DROID is the attacked unit,</span></p>
<p class="normal"><span>BASEOBJ is the unit that attacked (could be
NULLOBJECT)</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_ATTACKED, player, ref BASEOBJ, ref
BASEOBJ</span></p>
<p class="normal"><span>triggered when a structure or unit for player
is attacked.&nbsp; BASEOBJ is the attacked unit,</span></p>
<p class="normal"><span>BASEOBJ is the unit that attacked (could be
NULLOBJECT)</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_TRANSPORTER_OFFMAP, player</span></p>
<p class="normal"><span>triggered when a transporter for player exits
the map.</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_TRANSPORTER_LANDED, GROUP, player</span></p>
<p class="normal"><span>triggered when transporter for player lands; units
on transporter are unloaded</span></p>
<p class="normal"><span>into the given GROUP.</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>Tutorial Callbacks</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_BUILDLIST</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Build structures interface up</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_BUILDGRID</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Place structure cursor up</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_RESEARCHLIST</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Choose research interface up</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_MANURUN</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Number of units to manufacture has changed</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_MANULIST</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Choose manufacturing interface up</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_BUTTON_PRESSED, buttonID</span></p>
<p class="normal"><span>triggered when an interface button with id
buttonID is pressed</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_DESIGN_QUIT</span></p>
<p class="normal"><span>triggered when the design screen is closed</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_OBJ_DESTROYED, int player, ref
BASEOBJ object</span></p>
<p class="normal"><span>triggered when either a unit or a structure
for player is destroyed</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_DROID_DESTROYED, int player, ref
DROID droid</span></p>
<p class="normal"><span>triggered when a unit for player is destroyed</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_STRUCT_DESTROYED, int player, ref
STRUCTURE structure</span></p>
<p class="normal"><span>triggered when a structure for player is
destroyed</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_FEATURE_DESTROYED, ref FEATURE
feature</span></p>
<p class="normal"><span>triggered when either a unit or a structure
for player is destroyed</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_OBJ_SEEN, int player, ref BASEOBJ
object, ref BASEOBJ viewer</span></p>
<p class="normal"><span>triggered when either a unit or a structure is
seen by a unit belonging to player.</span></p>
<p class="normal"><span>object is the thing that was seen, viewer is
the thing that saw it (may be NULLOBJECT).</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_DROID_SEEN, int player, ref
BASEOBJ object, ref BASEOBJ viewer</span></p>
<p class="normal"><span>triggered when a unit is seen by a unit
belonging to player.</span></p>
<p class="normal"><span>object is the thing that was seen, viewer is
the thing that saw it (may be NULLOBJECT).</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_STRUCT_SEEN, int player, ref
BASEOBJ object, ref BASEOBJ viewer</span></p>
<p class="normal"><span>triggered when a structure is seen by a unit
belonging to player.</span></p>
<p class="normal"><span>object is the thing that was seen, viewer is
the thing that saw it (may be NULLOBJECT).</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_NO_REINFORCEMENTS_LEFT</span></span><span
> - called when the player has transferred all reinforcements from
one level to the next</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span>More tutorial callbacks - ALL tutorial only:</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DESIGN_WEAPON</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- a weapon button pressed</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DESIGN_SYSTEM</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- a system (constructor/ecm/sensor/etc) button pressed</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DESIGN_COMMAND</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- a command droid turret pressed</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DESIGN_BODY</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- a body selected</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_DESIGN_PROPULSION</span></span><span
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - a propulsion selected</span></p>
<p class="normal"><span>&nbsp;</span></p>
<p class="normal"><span class="callbackcode"><span>CALL_ALL_ONSCREEN_DROIDS_SELECTED</span></span><span
> - does exactly when it says on the box</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_UNITTAKEOVER, ref unit</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unit has
been taken over by nexus link…</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_PLAYERLEFT,&nbsp;&nbsp;&nbsp; ref
int player</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Player
has left the multiplayer game.</span></p>
<p class="callbackcode0"><span>&nbsp;</span></p>
<p class="callbackcode0"><span>CALL_ALLIANCEOFFER, ref int one, ref
int two</span></p>
<p class="normal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; One
offers two an alliance.</span></p>
</body>
</html>