mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Documentation
This commit is contained in:
parent
49e85a326c
commit
d1b8eda700
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
@ -164,24 +165,12 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientParameters">CLIENT.ClientParameters</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientPosition">CLIENT:ClientPosition()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the position of the CLIENT in <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> format.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientTransport">CLIENT.ClientTransport</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetAltitude">CLIENT:GetAltitude()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the altitude of the CLIENT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -212,48 +201,6 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetDCSGroup">CLIENT:GetDCSGroup()</a></td>
|
||||
<td class="summary">
|
||||
<p>Return the DCSGroup of a Client.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetID">CLIENT:GetID()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetName">CLIENT:GetName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetPointVec2">CLIENT:GetPointVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the position of the CLIENT in <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> format..</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetPositionVec3">CLIENT:GetPositionVec3()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetTypeName">CLIENT:GetTypeName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetUnit">CLIENT:GetUnit()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).IsAlive">CLIENT:IsAlive()</a></td>
|
||||
<td class="summary">
|
||||
<p>Checks if client is alive and returns true or false.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -290,6 +237,12 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Message">CLIENT:Message(Message, MessageDuration, MessageId, MessageCategory, MessageInterval)</a></td>
|
||||
<td class="summary">
|
||||
<p>The main message driver for the CLIENT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).MessageSwitch">CLIENT.MessageSwitch</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -308,6 +261,12 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ONBOARDSIDE">CLIENT.ONBOARDSIDE</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Register">CLIENT:Register(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -577,6 +536,7 @@ Function.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CLIENT).ClientName" >
|
||||
<strong>CLIENT.ClientName</strong>
|
||||
</a>
|
||||
@ -599,24 +559,6 @@ Function.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).ClientPosition" >
|
||||
<strong>CLIENT:ClientPosition()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the position of the CLIENT in <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> format.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -631,24 +573,6 @@ Function.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetAltitude" >
|
||||
<strong>CLIENT:GetAltitude()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the altitude of the CLIENT.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Distance)">DCSTypes#Distance</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -743,105 +667,6 @@ Function.</p>
|
||||
<p><em><a href="DCSGroup.html##(Group)">DCSGroup#Group</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetID" >
|
||||
<strong>CLIENT:GetID()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetName" >
|
||||
<strong>CLIENT:GetName()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetPointVec2" >
|
||||
<strong>CLIENT:GetPointVec2()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the position of the CLIENT in <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> format..</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetPositionVec3" >
|
||||
<strong>CLIENT:GetPositionVec3()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetTypeName" >
|
||||
<strong>CLIENT:GetTypeName()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetUnit" >
|
||||
<strong>CLIENT:GetUnit()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> TODO what is this??? check. possible double function.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).IsAlive" >
|
||||
<strong>CLIENT:IsAlive()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Checks if client is alive and returns true or false.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -969,6 +794,20 @@ is the interval in seconds between the display of the <a href="Message.html##(ME
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<a id="#(CLIENT).MessageSwitch" >
|
||||
<strong>CLIENT.MessageSwitch</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1040,6 +879,27 @@ Text that describes the briefing of the mission when a Player logs into the Clie
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).Register" >
|
||||
<strong>CLIENT:Register(ClientName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ClientName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
@ -139,6 +140,18 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<h2><a id="#(DATABASE)">Type <code>DATABASE</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddClient">DATABASE:AddClient(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a CLIENT based on the ClientName in the DATABASE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddUnit">DATABASE:AddUnit(DCSUnit, DCSUnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a Unit based on the Unit Name in the DATABASE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ClassName">DATABASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
@ -160,12 +173,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DCSGroups">DATABASE.DCSGroups</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DCSGroupsAlive">DATABASE.DCSGroupsAlive</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -175,39 +182,15 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DCSUnitsAlive">DATABASE.DCSUnitsAlive</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteUnit">DATABASE:DeleteUnit(DCSUnitName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Deletes a Unit from the DATABASE based on the Unit Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Filter">DATABASE.Filter</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterCategories">DATABASE:FilterCategories(Categories)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units out of categories.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterCoalitions">DATABASE:FilterCoalitions(Coalitions)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units of coalitons.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterCountries">DATABASE:FilterCountries(Countries)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units of defined countries.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterGroupPrefixes">DATABASE:FilterGroupPrefixes(Prefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units of defined group prefixes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -217,21 +200,15 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterStart">DATABASE:FilterStart()</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindClient">DATABASE:FindClient(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Starts the filtering.</p>
|
||||
<p>Finds a CLIENT based on the ClientName.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterTypes">DATABASE:FilterTypes(Types)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindUnit">DATABASE:FindUnit(UnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units of defined unit types.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterUnitPrefixes">DATABASE:FilterUnitPrefixes(Prefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units of defined unit prefixes.</p>
|
||||
<p>Finds a Unit based on the Unit Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -247,7 +224,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachDCSUnitAlive">DATABASE:ForEachDCSUnitAlive(IteratorFunction, ...)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachDCSUnit">DATABASE:ForEachDCSUnit(IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Interate the DATABASE and call an interator function for each <strong>alive</strong> unit, providing the Unit and optional parameters.</p>
|
||||
</td>
|
||||
@ -268,12 +245,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Groups">DATABASE.Groups</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GroupsAlive">DATABASE.GroupsAlive</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -340,12 +311,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Units">DATABASE.Units</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).UnitsAlive">DATABASE.UnitsAlive</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -435,6 +400,53 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).AddClient" >
|
||||
<strong>DATABASE:AddClient(ClientName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a CLIENT based on the ClientName in the DATABASE.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ClientName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).AddUnit" >
|
||||
<strong>DATABASE:AddUnit(DCSUnit, DCSUnitName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a Unit based on the Unit Name in the DATABASE.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSUnitName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(DATABASE).ClassName" >
|
||||
<strong>DATABASE.ClassName</strong>
|
||||
@ -486,20 +498,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).DCSGroupsAlive" >
|
||||
<strong>DATABASE.DCSGroupsAlive</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -519,15 +517,22 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).DCSUnitsAlive" >
|
||||
<strong>DATABASE.DCSUnitsAlive</strong>
|
||||
<a id="#(DATABASE).DeleteUnit" >
|
||||
<strong>DATABASE:DeleteUnit(DCSUnitName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Deletes a Unit from the DATABASE based on the Unit Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSUnitName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -542,126 +547,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterCategories" >
|
||||
<strong>DATABASE:FilterCategories(Categories)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of units out of categories.</p>
|
||||
|
||||
|
||||
<p>Possible current categories are plane, helicopter, ground, ship.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Categories </em></code>:
|
||||
Can take the following values: "plane", "helicopter", "ground", "ship".</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterCoalitions" >
|
||||
<strong>DATABASE:FilterCoalitions(Coalitions)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of units of coalitons.</p>
|
||||
|
||||
|
||||
<p>Possible current coalitions are red, blue and neutral.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Coalitions </em></code>:
|
||||
Can take the following values: "red", "blue", "neutral".</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterCountries" >
|
||||
<strong>DATABASE:FilterCountries(Countries)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of units of defined countries.</p>
|
||||
|
||||
|
||||
<p>Possible current countries are those known within DCS world.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Countries </em></code>:
|
||||
Can take those country strings known within DCS world.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterGroupPrefixes" >
|
||||
<strong>DATABASE:FilterGroupPrefixes(Prefixes)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of units of defined group prefixes.</p>
|
||||
|
||||
|
||||
<p>All the units starting with the given group prefixes will be included within the set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Prefixes </em></code>:
|
||||
The prefix of which the group name where the unit belongs to starts with.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -681,78 +566,52 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterStart" >
|
||||
<strong>DATABASE:FilterStart()</strong>
|
||||
<a id="#(DATABASE).FindClient" >
|
||||
<strong>DATABASE:FindClient(ClientName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Starts the filtering.</p>
|
||||
<p>Finds a CLIENT based on the ClientName.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
<p><em><a href="Client.html##(CLIENT)">Client#CLIENT</a>:</em>
|
||||
The found CLIENT.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterTypes" >
|
||||
<strong>DATABASE:FilterTypes(Types)</strong>
|
||||
<a id="#(DATABASE).FindUnit" >
|
||||
<strong>DATABASE:FindUnit(UnitName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of units of defined unit types.</p>
|
||||
|
||||
|
||||
<p>Possible current types are those types known within DCS world.</p>
|
||||
<p>Finds a Unit based on the Unit Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Types </em></code>:
|
||||
Can take those type strings known within DCS world.</p>
|
||||
<p><code><em>#string UnitName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterUnitPrefixes" >
|
||||
<strong>DATABASE:FilterUnitPrefixes(Prefixes)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of units of defined unit prefixes.</p>
|
||||
|
||||
|
||||
<p>All the units starting with the given prefixes will be included within the set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Prefixes </em></code>:
|
||||
The prefix of which the unit name starts with.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
<p><em><a href="Unit.html##(UNIT)">Unit#UNIT</a>:</em>
|
||||
The found Unit.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -828,8 +687,8 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).ForEachDCSUnitAlive" >
|
||||
<strong>DATABASE:ForEachDCSUnitAlive(IteratorFunction, ...)</strong>
|
||||
<a id="#(DATABASE).ForEachDCSUnit" >
|
||||
<strong>DATABASE:ForEachDCSUnit(IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -922,20 +781,6 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).GroupsAlive" >
|
||||
<strong>DATABASE.GroupsAlive</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1133,20 +978,6 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).UnitsAlive" >
|
||||
<strong>DATABASE.UnitsAlive</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
@ -1835,7 +1836,6 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(ESCORT).ReportTargetsScheduler" >
|
||||
<strong>ESCORT.ReportTargetsScheduler</strong>
|
||||
</a>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
@ -213,7 +214,7 @@ Note that this destroy method also raises a destroy event at run-time.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetPositionVec3">GROUP:GetPositionVec3()</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetPointVec3">GROUP:GetPointVec3()</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets the current Point of the GROUP in VEC3 format.</p>
|
||||
</td>
|
||||
@ -1147,8 +1148,8 @@ Current x,y and z position of the group.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).GetPositionVec3" >
|
||||
<strong>GROUP:GetPositionVec3()</strong>
|
||||
<a id="#(GROUP).GetPointVec3" >
|
||||
<strong>GROUP:GetPointVec3()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li>Scheduler</li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li>Scoring</li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li>Sead</li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
1318
Documentation/Set.html
Normal file
1318
Documentation/Set.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li>Spawn</li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li>TASK</li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li>Unit</li>
|
||||
@ -53,7 +54,43 @@
|
||||
<div id="content">
|
||||
<h1>Module <code>Unit</code></h1>
|
||||
|
||||
<p>UNIT Classes</p>
|
||||
<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>
|
||||
|
||||
|
||||
<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 objects.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>UNIT reference methods</h1>
|
||||
<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>
|
||||
|
||||
<p>The UNIT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference
|
||||
using the DCS Unit or the DCS UnitName.</p>
|
||||
|
||||
<p>Another thing to know is that UNIT objects do not "contain" the DCS Unit object.
|
||||
The UNIT methods will reference the DCS Unit object by name when it is needed during API execution.
|
||||
If the DCS Unit object does not exist or is nil, the UNIT methods will return nil and log an exception in the DCS.log file.</p>
|
||||
|
||||
<p>The UNIT class provides the following functions to retrieve quickly the relevant UNIT instance:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(UNIT).Find">UNIT.Find</a>(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.</li>
|
||||
<li><a href="##(UNIT).FindByName">UNIT.FindByName</a>(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.</li>
|
||||
</ul>
|
||||
|
||||
<p>IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).</p>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@ -76,6 +113,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).ClassName">UNIT.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).Find">UNIT:Find(DCSUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds a UNIT from the _DATABASE using a DCSUnit object.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).FindByName">UNIT:FindByName(UnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Find a UNIT in the _DATABASE using the name of an existing DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -112,6 +161,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).FlareYellow">UNIT:FlareYellow()</a></td>
|
||||
<td class="summary">
|
||||
<p>Signal a yellow flare at the position of the UNIT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetAltitude">UNIT:GetAltitude()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the altitude of the DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -129,7 +184,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetCategoryName">UNIT:GetCategoryName()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the Unit's Category Name as defined within the Unit's Descriptor.</p>
|
||||
<p>Returns the DCS Unit category name as defined within the DCS Unit Descriptor.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -189,7 +244,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetName">UNIT:GetName()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns unit object by the name assigned to the unit in Mission Editor.</p>
|
||||
<p>Returns DCS Unit object name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -207,19 +262,25 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPointVec2">UNIT:GetPointVec2()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> vector indicating the point in 2D of the DCS Unit within the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPointVec3">UNIT:GetPointVec3()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> vector indicating the point in 3D of the DCS Unit within the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPositionVec3">UNIT:GetPositionVec3()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Returns the <a href="DCSTypes.html##(Position3)">DCSTypes#Position3</a> position vectors indicating the point and direction vectors in 3D of the DCS Unit within the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPrefix">UNIT:GetPrefix()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Returns the prefix name of the DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -241,19 +302,19 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetTypeName">UNIT:GetTypeName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Returns the type name of the DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetVelocity">UNIT:GetVelocity()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the unit's velocity vector.</p>
|
||||
<p>Returns the DCS Unit velocity vector.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).InAir">UNIT:InAir()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns true if the Unit is in air.</p>
|
||||
<p>Returns true if the DCS Unit is in the air.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -272,24 +333,18 @@
|
||||
<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).New">UNIT:New(DCSUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a new UNIT from DCSUnit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).NewFromName">UNIT:NewFromName(Unit, UnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a new UNIT from a Unit Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).OtherUnitInRadius">UNIT:OtherUnitInRadius(AwaitUnit, Radius)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Returns true if there is an <strong>other</strong> DCS Unit within a radius of the current 2D point of the DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).Register">UNIT:Register(DCSUnit, Database, UnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a new UNIT from DCSUnit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -446,6 +501,60 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).Find" >
|
||||
<strong>UNIT:Find(DCSUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds a UNIT from the _DATABASE using a DCSUnit object.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSUnit.html##(Unit)">DCSUnit#Unit</a> DCSUnit </em></code>:
|
||||
An existing DCS Unit object reference.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Unit.html##(UNIT)">Unit#UNIT</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).FindByName" >
|
||||
<strong>UNIT:FindByName(UnitName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Find a UNIT in the _DATABASE using the name of an existing DCS Unit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string UnitName </em></code>:
|
||||
The Unit Name.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Unit.html##(UNIT)">Unit#UNIT</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -538,6 +647,34 @@
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).GetAltitude" >
|
||||
<strong>UNIT:GetAltitude()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the altitude of the DCS Unit.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Distance)">DCSTypes#Distance</a>:</em>
|
||||
The altitude of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).GetAmmo" >
|
||||
<strong>UNIT:GetAmmo()</strong>
|
||||
</a>
|
||||
@ -546,11 +683,21 @@
|
||||
|
||||
<p>Returns the Unit's ammunition.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSUnit.html##(Unit.Ammo)">DCSUnit#Unit.Ammo</a>:</em></p>
|
||||
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -564,11 +711,21 @@
|
||||
|
||||
<p>Returns the unit's callsign - the localized string.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The Callsign of the Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -580,12 +737,12 @@ The Callsign of the Unit.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the Unit's Category Name as defined within the Unit's Descriptor.</p>
|
||||
<p>Returns the DCS Unit category name as defined within the DCS Unit Descriptor.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#string:</em>
|
||||
Unit's Category Name</p>
|
||||
The DCS Unit Category Name</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -600,11 +757,21 @@ Unit's Category Name</p>
|
||||
|
||||
<p>Returns coalition of the Unit.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSCoalitionObject.html##(coalition.side)">DCSCoalitionObject#coalition.side</a>:</em></p>
|
||||
<p><em><a href="DCSCoalitionObject.html##(coalition.side)">DCSCoalitionObject#coalition.side</a>:</em>
|
||||
The side of the coalition.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -618,11 +785,21 @@ Unit's Category Name</p>
|
||||
|
||||
<p>Returns country of the Unit.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCScountry.html##(country.id)">DCScountry#country.id</a>:</em>
|
||||
The country identifyer.</p>
|
||||
The country identifier.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -652,11 +829,21 @@ The country identifyer.</p>
|
||||
|
||||
<p>Descriptor type depends on unit category.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSUnit.html##(Unit.Desc)">DCSUnit#Unit.Desc</a>:</em>
|
||||
The Unit descriptor.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -673,11 +860,21 @@ The Unit descriptor.</p>
|
||||
|
||||
<p>If there are additional fuel tanks the value may be greater than 1.0.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The relative amount of fuel (from 0.0 to 1.0).</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -691,11 +888,21 @@ The relative amount of fuel (from 0.0 to 1.0).</p>
|
||||
|
||||
<p>Returns the unit's group if it exist and nil otherwise.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="Group.html##(GROUP)">Group#GROUP</a>:</em>
|
||||
The Group of the Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -709,11 +916,21 @@ The Group of the Unit.</p>
|
||||
|
||||
<p>Returns the unit's unique identifier.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSUnit.html##(Unit.ID)">DCSUnit#Unit.ID</a>:</em>
|
||||
Unit ID</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -730,11 +947,21 @@ Unit ID</p>
|
||||
|
||||
<p>Dead units has health <= 1.0.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The Unit's health value.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -748,11 +975,21 @@ The Unit's health value.</p>
|
||||
|
||||
<p>Returns the Unit's initial health.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The Unit's initial health value.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -764,13 +1001,26 @@ The Unit's initial health value.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns unit object by the name assigned to the unit in Mission Editor.</p>
|
||||
<p>Returns DCS Unit object name.</p>
|
||||
|
||||
|
||||
<p>If there is unit with such name or the unit is destroyed the function will return nil.
|
||||
The function provides access to non-activated units too.
|
||||
</p>
|
||||
<p>The function provides access to non-activated units too.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -789,11 +1039,21 @@ The function provides access to non-activated units too.
|
||||
It may not be changed during the mission.
|
||||
If any unit in the group is destroyed, the numbers of another units will not be changed.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The Unit number. </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -807,11 +1067,21 @@ The Unit number. </p>
|
||||
|
||||
<p>Returns name of the player that control the unit or nil if the unit is controlled by A.I.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
Player Name</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -823,8 +1093,51 @@ Player Name</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> vector indicating the point in 2D of the DCS Unit within the mission.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>:</em>
|
||||
The 2D point vector of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).GetPointVec3" >
|
||||
<strong>UNIT:GetPointVec3()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> vector indicating the point in 3D of the DCS Unit within the mission.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a>:</em>
|
||||
The 3D point vector of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -836,8 +1149,23 @@ Player Name</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the <a href="DCSTypes.html##(Position3)">DCSTypes#Position3</a> position vectors indicating the point and direction vectors in 3D of the DCS Unit within the mission.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Position)">DCSTypes#Position</a>:</em>
|
||||
The 3D position vectors of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -849,8 +1177,28 @@ Player Name</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the prefix name of the DCS Unit.</p>
|
||||
|
||||
|
||||
<p>A prefix name is a part of the name before a '#'-sign.
|
||||
DCS Units spawned with the <a href="SPAWN.html">SPAWN</a> class contain a '#'-sign to indicate the end of the (base) DCS Unit name.
|
||||
The spawn sequence number and unit number are contained within the name after the '#' sign. </p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -886,6 +1234,12 @@ Player Name</p>
|
||||
<p><em><a href="DCSObject.html##(Object)">DCSObject#Object</a>:</em>
|
||||
The object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
@ -901,11 +1255,21 @@ The object of the radar's interest. Not nil only if at least one radar of the un
|
||||
|
||||
<p>Returns the unit sensors.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSUnit.html##(Unit.Sensors)">DCSUnit#Unit.Sensors</a>:</em></p>
|
||||
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -917,8 +1281,23 @@ The object of the radar's interest. Not nil only if at least one radar of the un
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the type name of the DCS Unit.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The type name of the DCS Unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -930,13 +1309,23 @@ The object of the radar's interest. Not nil only if at least one radar of the un
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the unit's velocity vector.</p>
|
||||
<p>Returns the DCS Unit velocity vector.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a>:</em>
|
||||
Velocity Vector</p>
|
||||
The velocity vector</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -948,13 +1337,23 @@ Velocity Vector</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns true if the Unit is in air.</p>
|
||||
<p>Returns true if the DCS Unit is in the air.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if in the air.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -968,11 +1367,21 @@ true if in the air.</p>
|
||||
|
||||
<p>Returns if the unit is activated.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if Unit is activated.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1007,56 +1416,87 @@ Air category evaluation result.</p>
|
||||
|
||||
<p>Returns if the unit is alive.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if Unit is alive.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).New" >
|
||||
<strong>UNIT:New(DCSUnit)</strong>
|
||||
<a id="#(UNIT).OtherUnitInRadius" >
|
||||
<strong>UNIT:OtherUnitInRadius(AwaitUnit, Radius)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns true if there is an <strong>other</strong> DCS Unit within a radius of the current 2D point of the DCS Unit.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Unit.html##(UNIT)">Unit#UNIT</a> AwaitUnit </em></code>:
|
||||
The other UNIT wrapper object.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Radius </em></code>:
|
||||
The radius in meters with the DCS Unit in the centre.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
|
||||
<p>true If the other DCS Unit is within the radius of the 2D point of the DCS Unit. </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).Register" >
|
||||
<strong>UNIT:Register(DCSUnit, Database, UnitName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Create a new UNIT from DCSUnit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSUnit.html##(Unit)">DCSUnit#Unit</a> DCSUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Unit.html##(UNIT)">Unit#UNIT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).NewFromName" >
|
||||
<strong>UNIT:NewFromName(Unit, UnitName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Create a new UNIT from a Unit Name.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Unit </em></code>:
|
||||
Name</p>
|
||||
<p><code><em><a href="Database.html##(DATABASE)">Database#DATABASE</a> Database </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1075,32 +1515,6 @@ Name</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).OtherUnitInRadius" >
|
||||
<strong>UNIT:OtherUnitInRadius(AwaitUnit, Radius)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AwaitUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Radius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).Smoke" >
|
||||
<strong>UNIT:Smoke(SmokeColor)</strong>
|
||||
</a>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
@ -207,6 +208,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="Sead.html">Sead</a></td>
|
||||
<td class="summary">
|
||||
<p>Provides defensive behaviour to a set of SAM sites within a running Mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Set.html">Set</a></td>
|
||||
<td class="summary">
|
||||
<p>Manage sets of units and groups.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -224,7 +231,14 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Unit.html">Unit</a></td>
|
||||
<td class="summary">
|
||||
<p>UNIT Classes</p>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
|
||||
159
Moose/Unit.lua
159
Moose/Unit.lua
@ -1,5 +1,36 @@
|
||||
--- UNIT Classes
|
||||
--- UNIT Class
|
||||
--
|
||||
-- @{UNIT} class
|
||||
-- ==============
|
||||
-- The @{UNIT} class is a wrapper class to handle the DCS Unit objects:
|
||||
--
|
||||
-- * Support all DCS Unit APIs.
|
||||
-- * Enhance with Unit specific APIs not in the DCS Unit API set.
|
||||
-- * Handle local Unit Controller.
|
||||
-- * Manage the "state" of the objects.
|
||||
--
|
||||
--
|
||||
-- UNIT reference methods
|
||||
-- ======================
|
||||
-- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _@{DATABASE} 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 @{SPAWN} class).
|
||||
--
|
||||
-- The UNIT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference
|
||||
-- using the DCS Unit or the DCS UnitName.
|
||||
--
|
||||
-- Another thing to know is that UNIT objects do not "contain" the DCS Unit object.
|
||||
-- The UNIT methods will reference the DCS Unit object by name when it is needed during API execution.
|
||||
-- If the DCS Unit object does not exist or is nil, the UNIT methods will return nil and log an exception in the DCS.log file.
|
||||
--
|
||||
-- The UNIT class provides the following functions to retrieve quickly the relevant UNIT instance:
|
||||
--
|
||||
-- * @{#UNIT.Find}(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.
|
||||
-- * @{#UNIT.FindByName}(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.
|
||||
--
|
||||
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
||||
--
|
||||
-- @module Unit
|
||||
-- @author FlightControl
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
@ -65,8 +96,8 @@ end
|
||||
|
||||
--- Finds a UNIT from the _DATABASE using a DCSUnit object.
|
||||
-- @param #UNIT self
|
||||
-- @param DCSUnit#Unit DCSUnit
|
||||
-- @return Unit#UNIT
|
||||
-- @param DCSUnit#Unit DCSUnit An existing DCS Unit object reference.
|
||||
-- @return Unit#UNIT self
|
||||
function UNIT:Find( DCSUnit )
|
||||
|
||||
local UnitName = DCSUnit:getName()
|
||||
@ -74,10 +105,10 @@ function UNIT:Find( DCSUnit )
|
||||
return UnitFound
|
||||
end
|
||||
|
||||
--- Find a UNIT in the _DATABASE using the name of the UNIT.
|
||||
--- Find a UNIT in the _DATABASE using the name of an existing DCS Unit.
|
||||
-- @param #UNIT self
|
||||
-- @param #string Unit Name
|
||||
-- @return Unit#UNIT
|
||||
-- @param #string UnitName The Unit Name.
|
||||
-- @return Unit#UNIT self
|
||||
function UNIT:FindByName( UnitName )
|
||||
-- self:F( UnitName )
|
||||
|
||||
@ -97,7 +128,8 @@ end
|
||||
|
||||
--- Returns coalition of the Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSCoalitionObject#coalition.side
|
||||
-- @return DCSCoalitionObject#coalition.side The side of the coalition.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetCoalition()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -114,7 +146,8 @@ end
|
||||
|
||||
--- Returns country of the Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCScountry#country.id The country identifyer.
|
||||
-- @return DCScountry#country.id The country identifier.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetCountry()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -130,10 +163,11 @@ function UNIT:GetCountry()
|
||||
end
|
||||
|
||||
|
||||
--- Returns unit object by the name assigned to the unit in Mission Editor.
|
||||
-- If there is unit with such name or the unit is destroyed the function will return nil.
|
||||
--- Returns DCS Unit object name.
|
||||
-- The function provides access to non-activated units too.
|
||||
--
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string The name of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -151,6 +185,7 @@ end
|
||||
--- Returns if the unit is alive.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #boolean true if Unit is alive.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:IsAlive()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -167,6 +202,7 @@ end
|
||||
--- Returns if the unit is activated.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #boolean true if Unit is activated.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:IsActive()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -184,6 +220,7 @@ end
|
||||
--- Returns name of the player that control the unit or nil if the unit is controlled by A.I.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string Player Name
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetPlayerName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -204,6 +241,7 @@ end
|
||||
--- Returns the unit's unique identifier.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSUnit#Unit.ID Unit ID
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetID()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -223,6 +261,7 @@ end
|
||||
-- If any unit in the group is destroyed, the numbers of another units will not be changed.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #number The Unit number.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetNumber()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -239,6 +278,7 @@ end
|
||||
--- Returns the unit's group if it exist and nil otherwise.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return Group#GROUP The Group of the Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetGroup()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -256,6 +296,7 @@ end
|
||||
--- Returns the unit's callsign - the localized string.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string The Callsign of the Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetCallSign()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -272,6 +313,7 @@ end
|
||||
--- Returns the unit's health. Dead units has health <= 1.0.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #number The Unit's health value.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetLife()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -288,6 +330,7 @@ end
|
||||
--- Returns the Unit's initial health.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #number The Unit's initial health value.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetLife0()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -304,6 +347,7 @@ end
|
||||
--- Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks. If there are additional fuel tanks the value may be greater than 1.0.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #number The relative amount of fuel (from 0.0 to 1.0).
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetFuel()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -320,6 +364,7 @@ end
|
||||
--- Returns the Unit's ammunition.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSUnit#Unit.Ammo
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetAmmo()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -336,6 +381,7 @@ end
|
||||
--- Returns the unit sensors.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSUnit#Unit.Sensors
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetSensors()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -359,6 +405,7 @@ end
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #boolean Indicates if at least one of the unit's radar(s) is on.
|
||||
-- @return DCSObject#Object The object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetRadar()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -377,6 +424,7 @@ end
|
||||
--- Returns unit descriptor. Descriptor type depends on unit category.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSUnit#Unit.Desc The Unit descriptor.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetDesc()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -391,7 +439,10 @@ function UNIT:GetDesc()
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the type name of the DCS Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string The type name of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetTypeName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -406,16 +457,34 @@ function UNIT:GetTypeName()
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the prefix name of the DCS Unit. A prefix name is a part of the name before a '#'-sign.
|
||||
-- DCS Units spawned with the @{SPAWN} class contain a '#'-sign to indicate the end of the (base) DCS Unit name.
|
||||
-- The spawn sequence number and unit number are contained within the name after the '#' sign.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string The name of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetPrefix()
|
||||
self:F( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
local UnitPrefix = string.match( self.UnitName, ".*#" ):sub( 1, -2 )
|
||||
self:T( UnitPrefix )
|
||||
return UnitPrefix
|
||||
if DCSUnit then
|
||||
local UnitPrefix = string.match( self.UnitName, ".*#" ):sub( 1, -2 )
|
||||
self:T( UnitPrefix )
|
||||
return UnitPrefix
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the @{DCSTypes#Vec2} vector indicating the point in 2D of the DCS Unit within the mission.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSTypes#Vec2 The 2D point vector of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetPointVec2()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -436,6 +505,10 @@ function UNIT:GetPointVec2()
|
||||
end
|
||||
|
||||
|
||||
--- Returns the @{DCSTypes#Vec3} vector indicating the point in 3D of the DCS Unit within the mission.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSTypes#Vec3 The 3D point vector of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetPointVec3()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -450,6 +523,10 @@ function UNIT:GetPointVec3()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the @{DCSTypes#Position3} position vectors indicating the point and direction vectors in 3D of the DCS Unit within the mission.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSTypes#Position The 3D position vectors of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetPositionVec3()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -464,9 +541,10 @@ function UNIT:GetPositionVec3()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the unit's velocity vector.
|
||||
--- Returns the DCS Unit velocity vector.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSTypes#Vec3 Velocity Vector
|
||||
-- @return DCSTypes#Vec3 The velocity vector
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetVelocity()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -481,9 +559,10 @@ function UNIT:GetVelocity()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns true if the Unit is in air.
|
||||
--- Returns true if the DCS Unit is in the air.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #boolean true if in the air.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:InAir()
|
||||
self:F( self.UnitName )
|
||||
|
||||
@ -498,9 +577,10 @@ function UNIT:InAir()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the altitude of the UNIT.
|
||||
-- @param #UNIT self
|
||||
-- @return DCSTypes#Distance
|
||||
--- Returns the altitude of the DCS Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSTypes#Distance The altitude of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetAltitude()
|
||||
self:F()
|
||||
|
||||
@ -514,27 +594,36 @@ function UNIT:GetAltitude()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns true if there is an **other** DCS Unit within a radius of the current 2D point of the DCS Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @param Unit#UNIT AwaitUnit The other UNIT wrapper object.
|
||||
-- @param Radius The radius in meters with the DCS Unit in the centre.
|
||||
-- @return true If the other DCS Unit is within the radius of the 2D point of the DCS Unit.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:OtherUnitInRadius( AwaitUnit, Radius )
|
||||
self:F( { self.UnitName, AwaitUnit.UnitName, Radius } )
|
||||
|
||||
local UnitPos = self:GetPointVec3()
|
||||
local AwaitUnitPos = AwaitUnit:GetPointVec3()
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitPos = self:GetPointVec3()
|
||||
local AwaitUnitPos = AwaitUnit:GetPointVec3()
|
||||
|
||||
if (((UnitPos.x - AwaitUnitPos.x)^2 + (UnitPos.z - AwaitUnitPos.z)^2)^0.5 <= Radius) then
|
||||
self:T( "true" )
|
||||
return true
|
||||
else
|
||||
self:T( "false" )
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
if (((UnitPos.x - AwaitUnitPos.x)^2 + (UnitPos.z - AwaitUnitPos.z)^2)^0.5 <= Radius) then
|
||||
self:T( "true" )
|
||||
return true
|
||||
else
|
||||
self:T( "false" )
|
||||
return false
|
||||
end
|
||||
|
||||
self:T( "false" )
|
||||
return false
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the Unit's Category Name as defined within the Unit's Descriptor.
|
||||
--- Returns the DCS Unit category name as defined within the DCS Unit Descriptor.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string Unit's Category Name
|
||||
-- @return #string The DCS Unit Category Name
|
||||
function UNIT:GetCategoryName()
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user