Documentation + Zone functions

Implemented zone functions for GROUP and UNIT
Documentation improvement for GROUP, UNIT, CLIENT.
This commit is contained in:
FlightControl
2016-06-05 09:37:27 +02:00
parent 64f67e2ae0
commit 0d42c1670e
9 changed files with 655 additions and 152 deletions

View File

@@ -71,14 +71,14 @@
<div id="content">
<h1>Module <code>Client</code></h1>
<p>The CLIENT models client units in multi player missions.</p>
<p>This module contains the CLIENT class.</p>
<h1><a href="##(CLIENT)">#CLIENT</a> class</h1>
<h1>1) <a href="Client.html##(CLIENT)">Client#CLIENT</a> class, extends <a href="Unit.html##(UNIT)">Unit#UNIT</a></h1>
<p>Clients are those <strong>Units</strong> defined within the Mission Editor that have the skillset defined as <strong>Client</strong> or <strong>Player</strong>.
Note that clients are NOT the same as Units, they are NOT necessarily alive.
The <a href="CLIENT.html">CLIENT</a> class is a wrapper class to handle the DCS Unit objects that have the skillset defined as <strong>Client</strong> or <strong>Player</strong>:</p>
The <a href="Client.html##(CLIENT)">Client#CLIENT</a> class is a wrapper class to handle the DCS Unit objects that have the skillset defined as <strong>Client</strong> or <strong>Player</strong>:</p>
<ul>
<li>Wraps the DCS Unit objects with skill level set to Player or Client.</li>
@@ -91,7 +91,7 @@ The <a href="CLIENT.html">CLIENT</a> class is a wrapper class to handle the DCS
<p>Clients are being used by the <a href="MISSION.html">MISSION</a> class to follow players and register their successes.</p>
<h1>CLIENT reference methods</h1>
<h2>1.1) CLIENT reference methods</h2>
<p>For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the _<a href="DATABASE.html">DATABASE</a> object.
This is done at the beginning of the mission (when the mission starts).</p>

View File

@@ -71,12 +71,12 @@
<div id="content">
<h1>Module <code>Group</code></h1>
<p>GROUP class.</p>
<p>This module contains the GROUP class.</p>
<h1><a href="GROUP.html">GROUP</a> class</h1>
<p>The <a href="GROUP.html">GROUP</a> class is a wrapper class to handle the DCS Group objects:</p>
<h1>1) <a href="Group.html##(GROUP)">Group#GROUP</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The <a href="Group.html##(GROUP)">Group#GROUP</a> class is a wrapper class to handle the DCS Group objects:</p>
<ul>
<li>Support all DCS Group APIs.</li>
@@ -85,8 +85,9 @@
<li>Manage the "state" of the DCS Group.</li>
</ul>
<p><strong>IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).</strong></p>
<h1>GROUP reference methods</h1>
<h2>1.1) GROUP reference methods</h2>
<p>For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _<a href="DATABASE.html">DATABASE</a> object.
This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the <a href="SPAWN.html">SPAWN</a> class).</p>
@@ -104,7 +105,136 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<li><a href="##(GROUP).FindByName">GROUP.FindByName</a>(): Find a GROUP instance from the _DATABASE object using a DCS Group name.</li>
</ul>
<p>IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).</p>
<h2>1.2) GROUP task methods</h2>
<p>Several group task methods are available that help you to prepare tasks.
These methods return a string consisting of the task description, which can then be given to either a <a href="Group.html##(GROUP).PushTask">Group#GROUP.PushTask</a> or <a href="Group.html##(SetTask)">Group#SetTask</a> method to assign the task to the GROUP.
Tasks are specific for the category of the GROUP, more specific, for AIR, GROUND or AIR and GROUND.
Each task description where applicable indicates for which group category the task is valid.
There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.</p>
<h3>1.2.1) Assigned task methods</h3>
<p>Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected.
This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.</p>
<p>Find below a list of the <strong>assigned task</strong> methods:</p>
<ul>
<li><a href="##(GROUP).TaskAttackGroup">GROUP.TaskAttackGroup</a>: (AIR) Attack a Group.</li>
<li><a href="##(GROUP).TaskAttackMapObject">GROUP.TaskAttackMapObject</a>: (AIR) Attacking the map object (building, structure, e.t.c).</li>
<li><a href="##(GROUP).TaskAttackUnit">GROUP.TaskAttackUnit</a>: (AIR) Attack the Unit.</li>
<li><a href="##(GROUP).TaskBombing">GROUP.TaskBombing</a>: (AIR) Delivering weapon at the point on the ground.</li>
<li><a href="##(GROUP).TaskBombingRunway">GROUP.TaskBombingRunway</a>: (AIR) Delivering weapon on the runway.</li>
<li><a href="##(GROUP).TaskEmbarking">GROUP.TaskEmbarking</a>: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.</li>
<li><a href="##(GROUP).TaskEmbarkToTransport">GROUP.TaskEmbarkToTransport</a>: (GROUND) Embark to a Transport landed at a location.</li>
<li><a href="##(GROUP).TaskEscort">GROUP.TaskEscort</a>: (AIR) Escort another airborne group. </li>
<li><a href="##(GROUP).TaskFAC_AttackGroup">GROUP.TaskFAC_AttackGroup</a>: (AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.</li>
<li><a href="##(GROUP).TaskFireAtPoint">GROUP.TaskFireAtPoint</a>: (GROUND) Fire at a VEC2 point until ammunition is finished.</li>
<li><a href="##(GROUP).TaskFollow">GROUP.TaskFollow</a>: (AIR) Following another airborne group.</li>
<li><a href="##(GROUP).TaskHold">GROUP.TaskHold</a>: (GROUND) Hold ground group from moving.</li>
<li><a href="##(GROUP).TaskHoldPosition">GROUP.TaskHoldPosition</a>: (AIR) Hold position at the current position of the first unit of the group.</li>
<li><a href="##(GROUP).TaskLand">GROUP.TaskLand</a>: (AIR HELICOPTER) Landing at the ground. For helicopters only.</li>
<li><a href="##(GROUP).TaskLandAtZone">GROUP.TaskLandAtZone</a>: (AIR) Land the group at a <a href="##(GROUP).TaskOrbitCircle">GROUP.TaskOrbitCircle</a>: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.</li>
<li><a href="##(GROUP).TaskOrbitCircleAtVec2">GROUP.TaskOrbitCircleAtVec2</a>: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.</li>
<li><a href="##(GROUP).TaskRefueling">GROUP.TaskRefueling</a>: (AIR) Refueling from the nearest tanker. No parameters.</li>
<li><a href="##(GROUP).TaskRoute">GROUP.TaskRoute</a>: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.</li>
<li><a href="##(GROUP).TaskRouteToVec2">GROUP.TaskRouteToVec2</a>: (AIR + GROUND) Make the Group move to a given point.</li>
<li><a href="##(GROUP).TaskRouteToVec3">GROUP.TaskRouteToVec3</a>: (AIR + GROUND) Make the Group move to a given point.</li>
<li><a href="##(GROUP).TaskRouteToZone">GROUP.TaskRouteToZone</a>: (AIR + GROUND) Route the group to a given zone.</li>
</ul>
<h3>1.2.2) EnRoute task methods</h3>
<p>EnRoute tasks require the targets of the task need to be detected by the group (using its sensors) before the task can be executed:</p>
<ul>
<li><a href="##(GROUP).EnRouteTaskAWACS">GROUP.EnRouteTaskAWACS</a>: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.</li>
<li><a href="##(GROUP).EnRouteTaskEngageGroup">GROUP.EnRouteTaskEngageGroup</a>: (AIR) Engaging a group. The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.</li>
<li><a href="##(GROUP).EnRouteTaskEngageTargets">GROUP.EnRouteTaskEngageTargets</a>: (AIR) Engaging targets of defined types.</li>
<li><a href="##(GROUP).EnRouteTaskEWR">GROUP.EnRouteTaskEWR</a>: (AIR) Attack the Unit.</li>
<li><a href="##(GROUP).EnRouteTaskFAC">GROUP.EnRouteTaskFAC</a>: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.</li>
<li><a href="##(GROUP).EnRouteTaskFAC_EngageGroup">GROUP.EnRouteTaskFAC_EngageGroup</a>: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose the target (enemy ground group) as well as other assigned targets.</li>
<li><a href="##(GROUP).EnRouteTaskTanker">GROUP.EnRouteTaskTanker</a>: (AIR) Aircraft will act as a tanker for friendly units. No parameters.</li>
</ul>
<h3>1.2.3) Preparation task methods</h3>
<p>There are certain task methods that allow to tailor the task behaviour:</p>
<ul>
<li><a href="##(GROUP).TaskWrappedAction">GROUP.TaskWrappedAction</a>: Return a WrappedAction Task taking a Command.</li>
<li><a href="##(GROUP).TaskCombo">GROUP.TaskCombo</a>: Return a Combo Task taking an array of Tasks.</li>
<li><a href="##(GROUP).TaskCondition">GROUP.TaskCondition</a>: Return a condition section for a controlled task.</li>
<li><a href="##(GROUP).TaskControlled">GROUP.TaskControlled</a>: Return a Controlled Task taking a Task and a TaskCondition.</li>
</ul>
<h3>1.2.4) Obtain the mission from group templates</h3>
<p>Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:</p>
<ul>
<li><a href="##(GROUP).TaskMission">GROUP.TaskMission</a>: (AIR + GROUND) Return a mission task from a mission template.</li>
</ul>
<h2>1.3) GROUP Command methods</h2>
<p>Group <strong>command methods</strong> prepare the execution of commands using the <a href="##(GROUP).SetCommand">GROUP.SetCommand</a> method:</p>
<ul>
<li><a href="##(GROUP).CommandDoScript">GROUP.CommandDoScript</a>: Do Script command.</li>
<li><a href="##(GROUP).CommandSwitchWayPoint">GROUP.CommandSwitchWayPoint</a>: Perform a switch waypoint command.</li>
</ul>
<h2>1.4) GROUP Option methods</h2>
<p>Group <strong>Option methods</strong> change the behaviour of the Group while being alive.</p>
<h3>1.4.1) Rule of Engagement:</h3>
<ul>
<li><a href="##(GROUP).OptionROEWeaponFree">GROUP.OptionROEWeaponFree</a> </li>
<li><a href="##(GROUP).OptionROEOpenFire">GROUP.OptionROEOpenFire</a></li>
<li><a href="##(GROUP).OptionROEReturnFire">GROUP.OptionROEReturnFire</a></li>
<li><a href="##(GROUP).OptionROEEvadeFire">GROUP.OptionROEEvadeFire</a></li>
</ul>
<p>To check whether an ROE option is valid for a specific group, use:</p>
<ul>
<li><a href="##(GROUP).OptionROEWeaponFreePossible">GROUP.OptionROEWeaponFreePossible</a> </li>
<li><a href="##(GROUP).OptionROEOpenFirePossible">GROUP.OptionROEOpenFirePossible</a></li>
<li><a href="##(GROUP).OptionROEReturnFirePossible">GROUP.OptionROEReturnFirePossible</a></li>
<li><a href="##(GROUP).OptionROEEvadeFirePossible">GROUP.OptionROEEvadeFirePossible</a></li>
</ul>
<h3>1.4.2) Rule on thread:</h3>
<ul>
<li><a href="##(GROUP).OptionROTNoReaction">GROUP.OptionROTNoReaction</a></li>
<li><a href="##(GROUP).OptionROTPassiveDefense">GROUP.OptionROTPassiveDefense</a></li>
<li><a href="##(GROUP).OptionROTEvadeFire">GROUP.OptionROTEvadeFire</a></li>
<li><a href="##(GROUP).OptionROTVertical">GROUP.OptionROTVertical</a></li>
</ul>
<p>To test whether an ROT option is valid for a specific group, use:</p>
<ul>
<li><a href="##(GROUP).OptionROTNoReactionPossible">GROUP.OptionROTNoReactionPossible</a></li>
<li><a href="##(GROUP).OptionROTPassiveDefensePossible">GROUP.OptionROTPassiveDefensePossible</a></li>
<li><a href="##(GROUP).OptionROTEvadeFirePossible">GROUP.OptionROTEvadeFirePossible</a></li>
<li><a href="##(GROUP).OptionROTVerticalPossible">GROUP.OptionROTVerticalPossible</a></li>
</ul>
<h2>1.5) GROUP Zone validation methods</h2>
<p>The group can be validated whether it is completely, partly or not within a <a href="Zone.html">Zone</a>.
Use the following Zone validation methods on the group:</p>
<ul>
<li><a href="##(GROUP).IsCompletelyInZone">GROUP.IsCompletelyInZone</a>: Returns true if all units of the group are within a <a href="Zone.html">Zone</a>.</li>
<li><a href="##(GROUP).IsPartlyInZone">GROUP.IsPartlyInZone</a>: Returns true if some units of the group are within a <a href="Zone.html">Zone</a>.</li>
<li><a href="##(GROUP).IsNotInZone">GROUP.IsNotInZone</a>: Returns true if none of the group units of the group are within a <a href="Zone.html">Zone</a>.</li>
</ul>
<p>The zone can be of any <a href="Zone.html">Zone</a> class derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>. So, these methods are polymorphic to the zones tested on.</p>
<h2>Global(s)</h2>
<table class="function_list">
@@ -409,6 +539,12 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<td class="name" nowrap="nowrap"><a href="##(GROUP).IsAlive">GROUP:IsAlive()</a></td>
<td class="summary">
<p>Returns if the DCS Group is alive.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).IsCompletelyInZone">GROUP:IsCompletelyInZone(Zone)</a></td>
<td class="summary">
<p>Returns true if all units of the group are within a <a href="Zone.html">Zone</a>.</p>
</td>
</tr>
<tr>
@@ -421,6 +557,18 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<td class="name" nowrap="nowrap"><a href="##(GROUP).IsHelicopter">GROUP:IsHelicopter()</a></td>
<td class="summary">
<p>Returns if the DCS Group contains Helicopters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).IsNotInZone">GROUP:IsNotInZone(Zone)</a></td>
<td class="summary">
<p>Returns true if none of the group units of the group are within a <a href="Zone.html">Zone</a>.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).IsPartlyInZone">GROUP:IsPartlyInZone(Zone)</a></td>
<td class="summary">
<p>Returns true if some units of the group are within a <a href="Zone.html">Zone</a>.</p>
</td>
</tr>
<tr>
@@ -630,31 +778,31 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskCombo">GROUP:TaskCombo(DCSTasks)</a></td>
<td class="summary">
<p>Return a Combo Task taking an array of Tasks</p>
<p>Return a Combo Task taking an array of Tasks.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskCondition">GROUP:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint)</a></td>
<td class="summary">
<p>Return a condition section for a controlled task</p>
<p>Return a condition section for a controlled task.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskControlled">GROUP:TaskControlled(DCSTask, DCSStopCondition)</a></td>
<td class="summary">
<p>Return a Controlled Task taking a Task and a TaskCondition</p>
<p>Return a Controlled Task taking a Task and a TaskCondition.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskEmbarkToTransportAtVec2">GROUP:TaskEmbarkToTransportAtVec2(Point, Radius)</a></td>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskEmbarkToTransport">GROUP:TaskEmbarkToTransport(Point, Radius)</a></td>
<td class="summary">
<p>Move to a defined Vec2 Point, and embark to a group when arrived within a defined Radius.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskEmbarkingAtVec2">GROUP:TaskEmbarkingAtVec2(Point, Duration, EmbarkingGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskEmbarking">GROUP:TaskEmbarking(Point, Duration, EmbarkingGroup)</a></td>
<td class="summary">
<p>Move the group to a Vec2 Point, wait for a defined duration and embark a group.</p>
<p>(AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.</p>
</td>
</tr>
<tr>
@@ -708,19 +856,19 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskLandAtZone">GROUP:TaskLandAtZone(Zone, Duration, RandomPoint)</a></td>
<td class="summary">
<p>(AIR) Land the group at a @{Zone#ZONE).</p>
<p>(AIR) Land the group at a @{Zone#ZONE_RADIUS).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskMission">GROUP:TaskMission(TaskMission)</a></td>
<td class="summary">
<p>Return a Misson task from a mission template.</p>
<p>(AIR + GROUND) Return a mission task from a mission template.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskOrbitCircle">GROUP:TaskOrbitCircle(Altitude, Speed)</a></td>
<td class="summary">
<p>(AIR) Orbit at the current position of the first unit of the group at a specified alititude</p>
<p>(AIR) Orbit at the current position of the first unit of the group at a specified alititude.</p>
</td>
</tr>
<tr>
@@ -744,25 +892,25 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskRouteToVec2">GROUP:TaskRouteToVec2(Point, Speed)</a></td>
<td class="summary">
<p>Make the DCS Group to fly to a given point and hover.</p>
<p>(AIR + GROUND) Make the Group move to fly to a given point.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskRouteToVec3">GROUP:TaskRouteToVec3(Point, Speed)</a></td>
<td class="summary">
<p>Make the DCS Group to fly to a given point and hover.</p>
<p>(AIR + GROUND) Make the Group move to a given point.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskRouteToZone">GROUP:TaskRouteToZone(Zone, Randomize, Speed, Formation)</a></td>
<td class="summary">
<p>Route the group to a given zone.</p>
<p>(AIR + GROUND) Route the group to a given zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskWrappedAction">GROUP:TaskWrappedAction(DCSCommand, Index)</a></td>
<td class="summary">
<p>Return a WrappedAction Task taking a Command</p>
<p>Return a WrappedAction Task taking a Command.</p>
</td>
</tr>
<tr>
@@ -843,8 +991,6 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
<h2><a id="#(DCSStopCondition)" >Type <code>DCSStopCondition</code></a></h2>
<h2><a id="#(Duration)" >Type <code>Duration</code></a></h2>
<h2><a id="#(GROUP)" >Type <code>GROUP</code></a></h2>
<p>The GROUP class</p>
@@ -1984,6 +2130,33 @@ true if the DCS Group is alive.</p>
<dl class="function">
<dt>
<a id="#(GROUP).IsCompletelyInZone" >
<strong>GROUP:IsCompletelyInZone(Zone)</strong>
</a>
</dt>
<dd>
<p>Returns true if all units of the group are within a <a href="Zone.html">Zone</a>.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> Zone </em></code>:
The zone to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
Returns true if the Group is completely within the <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUP).IsGround" >
<strong>GROUP:IsGround()</strong>
</a>
@@ -2020,6 +2193,60 @@ true if DCS Group contains Helicopters.</p>
<dl class="function">
<dt>
<a id="#(GROUP).IsNotInZone" >
<strong>GROUP:IsNotInZone(Zone)</strong>
</a>
</dt>
<dd>
<p>Returns true if none of the group units of the group are within a <a href="Zone.html">Zone</a>.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> Zone </em></code>:
The zone to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
Returns true if the Group is completely within the <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUP).IsPartlyInZone" >
<strong>GROUP:IsPartlyInZone(Zone)</strong>
</a>
</dt>
<dd>
<p>Returns true if some units of the group are within a <a href="Zone.html">Zone</a>.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> Zone </em></code>:
The zone to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
Returns true if the Group is completely within the <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUP).IsShip" >
<strong>GROUP:IsShip()</strong>
</a>
@@ -2077,7 +2304,7 @@ The message text</p>
</li>
<li>
<p><code><em><a href="##(Duration)">#Duration</a> Duration </em></code>:
<p><code><em><a href="DCSTypes.html##(Duration)">DCSTypes#Duration</a> Duration </em></code>:
The duration of the message.</p>
</li>
@@ -2113,7 +2340,7 @@ The message text</p>
</li>
<li>
<p><code><em><a href="##(Duration)">#Duration</a> Duration </em></code>:
<p><code><em><a href="DCSTypes.html##(Duration)">DCSTypes#Duration</a> Duration </em></code>:
The duration of the message.</p>
</li>
@@ -2144,7 +2371,7 @@ The message text</p>
</li>
<li>
<p><code><em><a href="##(Duration)">#Duration</a> Duration </em></code>:
<p><code><em><a href="DCSTypes.html##(Duration)">DCSTypes#Duration</a> Duration </em></code>:
The duration of the message.</p>
</li>
@@ -2175,7 +2402,7 @@ The message text</p>
</li>
<li>
<p><code><em><a href="##(Duration)">#Duration</a> Duration </em></code>:
<p><code><em><a href="DCSTypes.html##(Duration)">DCSTypes#Duration</a> Duration </em></code>:
The duration of the message.</p>
</li>
@@ -2212,7 +2439,7 @@ The message text</p>
</li>
<li>
<p><code><em><a href="##(Duration)">#Duration</a> Duration </em></code>:
<p><code><em><a href="DCSTYpes.html##(Duration)">DCSTYpes#Duration</a> Duration </em></code>:
The duration of the message.</p>
</li>
@@ -2973,7 +3200,7 @@ The DCS task structure.</p>
</dt>
<dd>
<p>Return a Combo Task taking an array of Tasks</p>
<p>Return a Combo Task taking an array of Tasks.</p>
<h3>Parameter</h3>
<ul>
@@ -3000,7 +3227,7 @@ Array of <a href="DCSTask.html##(Task)">DCSTask#Task</a></p>
</dt>
<dd>
<p>Return a condition section for a controlled task</p>
<p>Return a condition section for a controlled task.</p>
<h3>Parameters</h3>
<ul>
@@ -3047,7 +3274,7 @@ return DCSTask#Task</p>
</dt>
<dd>
<p>Return a Controlled Task taking a Task and a TaskCondition</p>
<p>Return a Controlled Task taking a Task and a TaskCondition.</p>
<h3>Parameters</h3>
<ul>
@@ -3072,8 +3299,8 @@ return DCSTask#Task</p>
<dl class="function">
<dt>
<a id="#(GROUP).TaskEmbarkToTransportAtVec2" >
<strong>GROUP:TaskEmbarkToTransportAtVec2(Point, Radius)</strong>
<a id="#(GROUP).TaskEmbarkToTransport" >
<strong>GROUP:TaskEmbarkToTransport(Point, Radius)</strong>
</a>
</dt>
<dd>
@@ -3105,13 +3332,13 @@ The DCS task structure.</p>
<dl class="function">
<dt>
<a id="#(GROUP).TaskEmbarkingAtVec2" >
<strong>GROUP:TaskEmbarkingAtVec2(Point, Duration, EmbarkingGroup)</strong>
<a id="#(GROUP).TaskEmbarking" >
<strong>GROUP:TaskEmbarking(Point, Duration, EmbarkingGroup)</strong>
</a>
</dt>
<dd>
<p>Move the group to a Vec2 Point, wait for a defined duration and embark a group.</p>
<p>(AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.</p>
<h3>Parameters</h3>
<ul>
@@ -3457,7 +3684,7 @@ self</p>
</dt>
<dd>
<p>(AIR) Land the group at a @{Zone#ZONE).</p>
<p>(AIR) Land the group at a @{Zone#ZONE_RADIUS).</p>
<h3>Parameters</h3>
<ul>
@@ -3495,7 +3722,7 @@ self</p>
</dt>
<dd>
<p>Return a Misson task from a mission template.</p>
<p>(AIR + GROUND) Return a mission task from a mission template.</p>
<h3>Parameter</h3>
<ul>
@@ -3522,7 +3749,7 @@ A table containing the mission task.</p>
</dt>
<dd>
<p>(AIR) Orbit at the current position of the first unit of the group at a specified alititude</p>
<p>(AIR) Orbit at the current position of the first unit of the group at a specified alititude.</p>
<h3>Parameters</h3>
<ul>
@@ -3642,7 +3869,7 @@ A table of route points.</p>
</dt>
<dd>
<p>Make the DCS Group to fly to a given point and hover.</p>
<p>(AIR + GROUND) Make the Group move to fly to a given point.</p>
<h3>Parameters</h3>
<ul>
@@ -3675,7 +3902,7 @@ self</p>
</dt>
<dd>
<p>Make the DCS Group to fly to a given point and hover.</p>
<p>(AIR + GROUND) Make the Group move to a given point.</p>
<h3>Parameters</h3>
<ul>
@@ -3708,7 +3935,7 @@ self</p>
</dt>
<dd>
<p>Route the group to a given zone.</p>
<p>(AIR + GROUND) Route the group to a given zone.</p>
<p>The group final destination point can be randomized.
@@ -3753,7 +3980,7 @@ The formation string.</p>
</dt>
<dd>
<p>Return a WrappedAction Task taking a Command</p>
<p>Return a WrappedAction Task taking a Command.</p>
<h3>Parameters</h3>
<ul>

View File

@@ -71,24 +71,22 @@
<div id="content">
<h1>Module <code>Unit</code></h1>
<p>UNIT Class</p>
<p>This module contains the UNIT class.</p>
<h1><a href="UNIT.html">UNIT</a> class</h1>
<p>The <a href="UNIT.html">UNIT</a> class is a wrapper class to handle the DCS Unit objects:</p>
<h1>1) <a href="Unit.html##(UNIT)">Unit#UNIT</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The <a href="Unit.html##(UNIT)">Unit#UNIT</a> class is a wrapper class to handle the DCS Unit objects:</p>
<ul>
<li>Support all DCS Unit APIs.</li>
</ul>
<ul>
<li>Enhance with Unit specific APIs not in the DCS Unit API set.</li>
<li>Handle local Unit Controller.</li>
<li>Manage the "state" of the DCS Unit.</li>
</ul>
<h1>UNIT reference methods</h1>
<h2>1.1) UNIT reference methods</h2>
<p>For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _<a href="DATABASE.html">DATABASE</a> object.
This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Unit objects are spawned (using the <a href="SPAWN.html">SPAWN</a> class).</p>
@@ -108,16 +106,13 @@ If the DCS Unit object does not exist or is nil, the UNIT methods will return ni
<p>IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).</p>
<h1>DCS UNIT APIs</h1>
<h2>1.2) DCS UNIT APIs</h2>
<p>The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
the first letter of the method is also capitalized. So, by example, the DCS Unit method <a href="DCSUnit.html##(Unit).getName">DCSUnit#Unit.getName</a>()
is implemented in the UNIT class as <a href="##(UNIT).GetName">UNIT.GetName</a>().</p>
<h1>Additional UNIT APIs</h1>
<p>The UNIT class comes with additional methods. Find below a summary.</p>
<h2>Smoke, Flare Units</h2>
<h2>1.3) Smoke, Flare Units</h2>
<p>The UNIT class provides methods to smoke or flare units easily.
The <a href="##(UNIT).SmokeBlue">UNIT.SmokeBlue</a>(), <a href="##(UNIT).SmokeGreen">UNIT.SmokeGreen</a>(),<a href="##(UNIT).SmokeOrange">UNIT.SmokeOrange</a>(), <a href="##(UNIT).SmokeRed">UNIT.SmokeRed</a>(), <a href="##(UNIT).SmokeRed">UNIT.SmokeRed</a>() methods
will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
@@ -125,22 +120,22 @@ When the DCS Unit moves for whatever reason, the smoking will still continue!
The <a href="##(UNIT).FlareGreen">UNIT.FlareGreen</a>(), <a href="##(UNIT).FlareRed">UNIT.FlareRed</a>(), <a href="##(UNIT).FlareWhite">UNIT.FlareWhite</a>(), <a href="##(UNIT).FlareYellow">UNIT.FlareYellow</a>()
methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.</p>
<h2>Position, Point</h2>
<h2>1.4) Location Position, Point</h2>
<p>The UNIT class provides methods to obtain the current point or position of the DCS Unit.
The <a href="##(UNIT).GetPointVec2">UNIT.GetPointVec2</a>(), <a href="##(UNIT).GetPointVec3">UNIT.GetPointVec3</a>() will obtain the current location of the DCS Unit in a Vec2 (2D) or a Vec3 (3D) vector respectively.
If you want to obtain the complete 3D position including oriëntation and direction vectors, consult the <a href="##(UNIT).GetPositionVec3">UNIT.GetPositionVec3</a>() method respectively.</p>
The <a href="##(UNIT).GetPointVec2">UNIT.GetPointVec2</a>(), <a href="##(UNIT).GetPointVec3">UNIT.GetPointVec3</a>() will obtain the current <strong>location</strong> of the DCS Unit in a Vec2 (2D) or a <strong>point</strong> in a Vec3 (3D) vector respectively.
If you want to obtain the complete <strong>3D position</strong> including oriëntation and direction vectors, consult the <a href="##(UNIT).GetPositionVec3">UNIT.GetPositionVec3</a>() method respectively.</p>
<h2>Alive</h2>
<h2>1.5) Test if alive</h2>
<p>The <a href="##(UNIT).IsAlive">UNIT.IsAlive</a>(), <a href="##(UNIT).IsActive">UNIT.IsActive</a>() methods determines if the DCS Unit is alive, meaning, it is existing and active.</p>
<h2>Test for other units in radius</h2>
<p>One can test if another DCS Unit is within a given radius of the current DCS Unit, by using the <a href="##(UNIT).OtherUnitInRadius">UNIT.OtherUnitInRadius</a>() method.</p>
<h2>More functions will be added</h2>
<p>During the MOOSE development, more functions will be added. A complete list of the current functions is below.</p>
<h2>1.6) Test for proximity</h2>
<p>The UNIT class contains methods to test the location or proximity against zones or other objects.</p>
<h3>1.6.1) Zones</h3>
<p>To test whether the Unit is within a <strong>zone</strong>, use the <a href="##(UNIT).IsInZone">UNIT.IsInZone</a>() or the <a href="##(UNIT).IsNotInZone">UNIT.IsNotInZone</a>() methods. Any zone can be tested on, but the zone must be derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>. </p>
<h3>1.6.2) Units</h3>
<p>Test if another DCS Unit is within a given radius of the current DCS Unit, use the <a href="##(UNIT).OtherUnitInRadius">UNIT.OtherUnitInRadius</a>() method.</p>
<h2>Global(s)</h2>
@@ -384,6 +379,18 @@ If you want to obtain the complete 3D position including ori
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsAlive">UNIT:IsAlive()</a></td>
<td class="summary">
<p>Returns if the unit is alive.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsInZone">UNIT:IsInZone(Zone)</a></td>
<td class="summary">
<p>Returns true if the unit is within a <a href="Zone.html">Zone</a>.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsNotInZone">UNIT:IsNotInZone(Zone)</a></td>
<td class="summary">
<p>Returns true if the unit is not within a <a href="Zone.html">Zone</a>.</p>
</td>
</tr>
<tr>
@@ -1487,6 +1494,60 @@ The DCS Unit is not existing or alive. </p>
<dl class="function">
<dt>
<a id="#(UNIT).IsInZone" >
<strong>UNIT:IsInZone(Zone)</strong>
</a>
</dt>
<dd>
<p>Returns true if the unit is within a <a href="Zone.html">Zone</a>.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> Zone </em></code>:
The zone to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
Returns true if the unit is within the <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).IsNotInZone" >
<strong>UNIT:IsNotInZone(Zone)</strong>
</a>
</dt>
<dd>
<p>Returns true if the unit is not within a <a href="Zone.html">Zone</a>.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> Zone </em></code>:
The zone to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
Returns true if the unit is not within the <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).OtherUnitInRadius" >
<strong>UNIT:OtherUnitInRadius(AwaitUnit, Radius)</strong>
</a>

View File

@@ -71,7 +71,6 @@
<div id="content">
<h1>Module <code>Zone</code></h1>
<h1>ZONE Classes</h1>
<p>This module contains the ZONE classes, inherited from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>.</p>
@@ -103,7 +102,6 @@
<li><a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a>: The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</li>
</ul>
<h1>Polymorphic methods</h1>
<p>Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</p>
<ul>
@@ -111,6 +109,21 @@
<li><a href="##(ZONE_BASE).IsPointVec3InZone">ZONE_BASE.IsPointVec3InZone</a>: Returns if a point is within the zone.</li>
</ul>
<h1>1) <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The ZONE_BASE class defining the base for all other zone classes.</p>
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
<p>The ZONE_RADIUS class defined by a zone name, a location and a radius.</p>
<h1>3) <a href="Zone.html##(ZONE)">Zone#ZONE</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
<h1>4) <a href="Zone.html##(ZONE_UNIT)">Zone#ZONE_UNIT</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
<h1>5) <a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
<h2>Global(s)</h2>
<table class="function_list">
@@ -172,13 +185,13 @@
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).IsPointVec2InZone">ZONE_BASE:IsPointVec2InZone(PointVec2)</a></td>
<td class="summary">
<p>Returns if a location is within the zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).IsPointVec3InZone">ZONE_BASE:IsPointVec3InZone(PointVec3)</a></td>
<td class="summary">
<p>Returns if a point is within the zone.</p>
</td>
</tr>
<tr>
@@ -466,16 +479,22 @@ The name of the zone as defined within the mission editor.</p>
</dt>
<dd>
<p>Returns if a location is within the zone.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> PointVec2 </em></code>: </p>
<p><code><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> PointVec2 </em></code>:
The location to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true if the location is within the zone.</p>
</dd>
</dl>
<dl class="function">
@@ -487,16 +506,22 @@ The name of the zone as defined within the mission editor.</p>
</dt>
<dd>
<p>Returns if a point is within the zone.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> PointVec3 </em></code>: </p>
<p><code><em><a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> PointVec3 </em></code>:
The point to test.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true if the point is within the zone.</p>
</dd>
</dl>
<dl class="function">

View File

@@ -105,7 +105,7 @@
<tr>
<td class="name" nowrap="nowrap"><a href="Client.html">Client</a></td>
<td class="summary">
<p>The CLIENT models client units in multi player missions.</p>
<p>This module contains the CLIENT class.</p>
</td>
</tr>
<tr>
@@ -231,7 +231,7 @@
<tr>
<td class="name" nowrap="nowrap"><a href="Group.html">Group</a></td>
<td class="summary">
<p>GROUP class.</p>
<p>This module contains the GROUP class.</p>
</td>
</tr>
<tr>
@@ -339,14 +339,7 @@
<tr>
<td class="name" nowrap="nowrap"><a href="Unit.html">Unit</a></td>
<td class="summary">
<p>UNIT Class</p>
<h1><a href="UNIT.html">UNIT</a> class</h1>
<p>The <a href="UNIT.html">UNIT</a> class is a wrapper class to handle the DCS Unit objects:</p>
<ul>
<li>Support all DCS Unit APIs.</li>
</ul>
<p>This module contains the UNIT class.</p>
</td>
</tr>
<tr>
@@ -358,7 +351,6 @@
<tr>
<td class="name" nowrap="nowrap"><a href="Zone.html">Zone</a></td>
<td class="summary">
<h1>ZONE Classes</h1>
<p>This module contains the ZONE classes, inherited from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>.</p>
</td>
</tr>