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