mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #53 from FlightControl-Master/Rework-UNIT-and-CLIENT
Rework unit and client
This commit is contained in:
commit
4f1c0eaa8e
@ -37,10 +37,11 @@
|
||||
-- @return #Group.Category
|
||||
|
||||
--TODO check coalition.side
|
||||
--- Returns coalition of the group.
|
||||
|
||||
--- Returns the coalition of the group.
|
||||
-- @function [parent=#Group] getCoalition
|
||||
-- @param #Group self
|
||||
-- @return #coalition.side
|
||||
-- @return DCSCoalitionObject#coalition.side
|
||||
|
||||
--- Returns the group's name. This is the same name assigned to the group in Mission Editor.
|
||||
-- @function [parent=#Group] getName
|
||||
|
||||
@ -1,2 +1,8 @@
|
||||
-- @type ModelTime
|
||||
-------------------------------------------------------------------------------
|
||||
-- @module DCSTime
|
||||
|
||||
--- @type ModelTime
|
||||
-- @extends #number
|
||||
|
||||
--- @type Time
|
||||
-- @extends #number
|
||||
26
Dcs/DCScountry.lua
Normal file
26
Dcs/DCScountry.lua
Normal file
@ -0,0 +1,26 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- @module DCScountry
|
||||
|
||||
--- @type country
|
||||
-- @field #country.id id
|
||||
|
||||
--- @type country.id
|
||||
-- @field RUSSIA
|
||||
-- @field UKRAINE
|
||||
-- @field USA
|
||||
-- @field TURKEY
|
||||
-- @field UK
|
||||
-- @field FRANCE
|
||||
-- @field GERMANY
|
||||
-- @field CANADA
|
||||
-- @field SPAIN
|
||||
-- @field THE_NETHERLANDS
|
||||
-- @field BELGIUM
|
||||
-- @field NORWAY
|
||||
-- @field DENMARK
|
||||
-- @field ISRAEL
|
||||
-- @field GEORGIA
|
||||
-- @field INSURGENTS
|
||||
-- @field ABKHAZIA
|
||||
-- @field SOUTH_OSETIA
|
||||
-- @field ITALY
|
||||
8
Dcs/Moose_Test_WRAPPER.lua
Normal file
8
Dcs/Moose_Test_WRAPPER.lua
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
Include.File( "Group" )
|
||||
Include.File( "Unit" )
|
||||
|
||||
local UnitAirPlaneAI = _DATABASE:FindUnit( "Airplane AI" )
|
||||
|
||||
UnitAirPlaneAI:FlareRed()
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li>CARGO</li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li>CleanUp</li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li>Client</li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -59,18 +74,41 @@
|
||||
|
||||
<h1><a href="##(CLIENT)">#CLIENT</a> class</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.</p>
|
||||
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>
|
||||
|
||||
<ul>
|
||||
<li>Wraps the DCS Unit objects with skill level set to Player or Client.</li>
|
||||
<li>Support all DCS Unit APIs.</li>
|
||||
<li>Enhance with Unit specific APIs not in the DCS Group API set.</li>
|
||||
<li>When player joins Unit, execute alive init logic.</li>
|
||||
<li>Handles messages to players.</li>
|
||||
<li>Manage the "state" of the DCS Unit.</li>
|
||||
</ul>
|
||||
|
||||
<p>Clients are being used by the <a href="MISSION.html">MISSION</a> class to follow players and register their successes.</p>
|
||||
|
||||
<h1>CLIENT construction methods:</h1>
|
||||
<p>Create a new CLIENT object with the <a href="##(CLIENT).New">CLIENT.New</a> method:</p>
|
||||
<h1>CLIENT reference methods</h1>
|
||||
<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>
|
||||
|
||||
<p>The CLIENT 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 CLIENT objects do not "contain" the DCS Unit object.
|
||||
The CLIENT 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 CLIENT methods will return nil and log an exception in the DCS.log file.</p>
|
||||
|
||||
<p>The CLIENT class provides the following functions to retrieve quickly the relevant CLIENT instance:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(CLIENT).New">CLIENT.New</a>: Creates a new CLIENT object taking the name of the <strong>DCSUnit</strong> that is a client as defined within the mission editor.
|
||||
</li>
|
||||
<li><a href="##(CLIENT).Find">CLIENT.Find</a>(): Find a CLIENT instance from the _DATABASE object using a DCS Unit object.</li>
|
||||
<li><a href="##(CLIENT).FindByName">CLIENT.FindByName</a>(): Find a CLIENT instance from the _DATABASE object using a DCS Unit name.</li>
|
||||
</ul>
|
||||
|
||||
<p>IMPORTANT: ONE SHOULD NEVER SANATIZE these CLIENT OBJECT REFERENCES! (make the CLIENT object references nil).</p>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
@ -92,12 +130,6 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Checks for a client alive event and calls a function on a continuous basis.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).AliveCheckScheduler">CLIENT.AliveCheckScheduler</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -164,12 +196,6 @@ 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>
|
||||
@ -179,9 +205,15 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetAltitude">CLIENT:GetAltitude()</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Find">CLIENT:Find(ClientName, ClientBriefing, DCSUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the altitude of the CLIENT.</p>
|
||||
<p>Finds a CLIENT from the _DATABASE using the relevant DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).FindByName">CLIENT:FindByName(ClientName, ClientBriefing)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -212,48 +244,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>
|
||||
@ -299,13 +289,13 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).New">CLIENT:New(ClientName, ClientBriefing)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ONBOARDSIDE">CLIENT.ONBOARDSIDE</a></td>
|
||||
<td class="summary">
|
||||
<p>Use this method to register new Clients within a mission.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ONBOARDSIDE">CLIENT.ONBOARDSIDE</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Register">CLIENT:Register(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -314,6 +304,12 @@ Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Reset">CLIENT:Reset(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Resets a CLIENT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ShowBriefing">CLIENT:ShowBriefing()</a></td>
|
||||
<td class="summary">
|
||||
<p>Show the briefing of the MISSION to the CLIENT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -398,8 +394,8 @@ is the text defining the Mission briefing.</p>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em></p>
|
||||
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -433,20 +429,6 @@ Function.</p>
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CLIENT).AliveCheckScheduler" >
|
||||
<strong>CLIENT.AliveCheckScheduler</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -599,24 +581,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">
|
||||
@ -636,19 +600,95 @@ Function.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetAltitude" >
|
||||
<strong>CLIENT:GetAltitude()</strong>
|
||||
<a id="#(CLIENT).Find" >
|
||||
<strong>CLIENT:Find(ClientName, ClientBriefing, DCSUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the altitude of the CLIENT.</p>
|
||||
<p>Finds a CLIENT from the _DATABASE using the relevant DCS Unit.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientName </em></code>:
|
||||
Name of the DCS <strong>Unit</strong> as defined within the Mission Editor.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientBriefing </em></code>:
|
||||
Text that describes the briefing of the mission when a Player logs into the Client.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSTypes.html##(Distance)">DCSTypes#Distance</a>:</em></p>
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Create new Clients.
|
||||
local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
|
||||
Mission:AddGoal( DeploySA6TroopsGoal )
|
||||
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).FindByName" >
|
||||
<strong>CLIENT:FindByName(ClientName, ClientBriefing)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.</p>
|
||||
|
||||
|
||||
<p>As an optional parameter, a briefing text can be given also.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientName </em></code>:
|
||||
Name of the DCS <strong>Unit</strong> as defined within the Mission Editor.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientBriefing </em></code>:
|
||||
Text that describes the briefing of the mission when a Player logs into the Client.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Create new Clients.
|
||||
local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
|
||||
Mission:AddGoal( DeploySA6TroopsGoal )
|
||||
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -743,105 +783,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">
|
||||
@ -983,49 +924,6 @@ is the interval in seconds between the display of the <a href="Message.html##(ME
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).New" >
|
||||
<strong>CLIENT:New(ClientName, ClientBriefing)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Use this method to register new Clients within a mission.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientName </em></code>:
|
||||
Name of the DCS <strong>Unit</strong> as defined within the Mission Editor.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientBriefing </em></code>:
|
||||
Text that describes the briefing of the mission when a Player logs into the Client.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Create new Clients.
|
||||
local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
|
||||
Mission:AddGoal( DeploySA6TroopsGoal )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1040,6 +938,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">
|
||||
@ -1067,6 +986,24 @@ Name of the Group as defined within the Mission Editor. The Group must have a Un
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).ShowBriefing" >
|
||||
<strong>CLIENT:ShowBriefing()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Show the briefing of the MISSION to the CLIENT.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(CLIENT)">#CLIENT</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).ShowCargo" >
|
||||
<strong>CLIENT:ShowCargo()</strong>
|
||||
</a>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
@ -106,6 +109,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(Group).getCategory">Group:getCategory()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns category of the group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(Group).getCoalition">Group:getCoalition()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the coalition of the group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -291,6 +300,24 @@
|
||||
<p><em><a href="##(Group.Category)">#Group.Category</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(Group).getCoalition" >
|
||||
<strong>Group:getCoalition()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the coalition of the group.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSCoalitionObject.html##(coalition.side)">DCSCoalitionObject#coalition.side</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li>DEPLOYTASK</li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li>DESTROYBASETASK</li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li>DESTROYGROUPSTASK</li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -139,13 +154,31 @@ 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).ClassName">DATABASE.ClassName</a></td>
|
||||
<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).AddGroup">DATABASE:AddGroup(DCSGroup, GroupName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a GROUP based on the GroupName 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).CLIENTS">DATABASE.CLIENTS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Clients">DATABASE.Clients</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ClassName">DATABASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -160,12 +193,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 +202,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 +220,21 @@ 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).FindGroup">DATABASE:FindGroup(GroupName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of units of defined unit types.</p>
|
||||
<p>Finds a GROUP based on the GroupName.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FilterUnitPrefixes">DATABASE:FilterUnitPrefixes(Prefixes)</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 prefixes.</p>
|
||||
<p>Finds a Unit based on the Unit Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -247,7 +250,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>
|
||||
@ -256,24 +259,18 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayer">DATABASE:ForEachPlayer(IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Interate the DATABASE and call an interator function for each <strong>alive</strong> player, providing the Unit of the player and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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).GetStatusGroup">DATABASE:GetStatusGroup(GroupName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Get a status to a Group within the Database, this to check crossing events for example.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
@ -337,13 +334,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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="name" nowrap="nowrap"><a href="##(DATABASE).UNITS">DATABASE.UNITS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -435,9 +426,82 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(DATABASE).ClassName" >
|
||||
<strong>DATABASE.ClassName</strong>
|
||||
<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).AddGroup" >
|
||||
<strong>DATABASE:AddGroup(DCSGroup, GroupName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a GROUP based on the GroupName in the DATABASE.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> GroupName </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></em>
|
||||
<a id="#(DATABASE).CLIENTS" >
|
||||
<strong>DATABASE.CLIENTS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -449,9 +513,9 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).Clients" >
|
||||
<strong>DATABASE.Clients</strong>
|
||||
<em>#string</em>
|
||||
<a id="#(DATABASE).ClassName" >
|
||||
<strong>DATABASE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -486,20 +550,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 +569,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 +599,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 +618,78 @@ 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).FindGroup" >
|
||||
<strong>DATABASE:FindGroup(GroupName)</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 GROUP based on the GroupName.</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 GroupName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
<p><em><a href="Group.html##(GROUP)">Group#GROUP</a>:</em>
|
||||
The found GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FilterUnitPrefixes" >
|
||||
<strong>DATABASE:FilterUnitPrefixes(Prefixes)</strong>
|
||||
<a id="#(DATABASE).FindUnit" >
|
||||
<strong>DATABASE:FindUnit(UnitName)</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>
|
||||
<p>Finds a Unit based on the Unit Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Prefixes </em></code>:
|
||||
The prefix of which the unit name starts with.</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>
|
||||
<p><em><a href="Unit.html##(UNIT)">Unit#UNIT</a>:</em>
|
||||
The found Unit.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -828,8 +765,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>
|
||||
@ -887,6 +824,20 @@ The function that will be called when there is an alive player in the database.
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).GROUPS" >
|
||||
<strong>DATABASE.GROUPS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -908,34 +859,6 @@ self</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).Groups" >
|
||||
<strong>DATABASE.Groups</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).GroupsAlive" >
|
||||
<strong>DATABASE.GroupsAlive</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1125,22 +1048,8 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).Units" >
|
||||
<strong>DATABASE.Units</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).UnitsAlive" >
|
||||
<strong>DATABASE.UnitsAlive</strong>
|
||||
<a id="#(DATABASE).UNITS" >
|
||||
<strong>DATABASE.UNITS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -1835,6 +1850,7 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(ESCORT).ReportTargetsScheduler" >
|
||||
<strong>ESCORT.ReportTargetsScheduler</strong>
|
||||
</a>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -272,12 +287,6 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSION).SUCCESS">MISSION.SUCCESS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSION).ShowBriefing">MISSION.ShowBriefing(CLIENT, self, Client)</a></td>
|
||||
<td class="summary">
|
||||
<p>Show the briefing of the MISSION to the CLIENT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1156,43 +1165,6 @@ local Mission = MISSIONSCHEDULER.AddMission( 'Rescue secret agent', 'Tactical',
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSION).ShowBriefing" >
|
||||
<strong>MISSION.ShowBriefing(CLIENT, self, Client)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Show the briefing of the MISSION to the CLIENT.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> CLIENT </em></code>:
|
||||
Client to show briefing to.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Client </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
|
||||
<p>CLIENT</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -90,9 +105,9 @@ It suports the following functionality:</p>
|
||||
<li><strong>Alerts</strong>: Menu to configure alert messages.
|
||||
<ul>
|
||||
<li><strong>To All</strong>: Shows alert messages to all players.</li>
|
||||
<li><strong>To Target</strong>: Shows alter messages only to the player where the missile is (was) targetted at.</li>
|
||||
<li><strong>To Target</strong>: Shows alert messages only to the player where the missile is (was) targetted at.</li>
|
||||
<li><strong>Hits On</strong>: Show missile hit alert messages.</li>
|
||||
<li><strong>Hits Off</strong>: Disable missile hit altert messages.</li>
|
||||
<li><strong>Hits Off</strong>: Disable missile hit alert messages.</li>
|
||||
<li><strong>Launches On</strong>: Show missile launch messages.</li>
|
||||
<li><strong>Launches Off</strong>: Disable missile launch messages.</li>
|
||||
</ul></li>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
1332
Documentation/Set.html
Normal file
1332
Documentation/Set.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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>StaticObject</li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li>TASK</li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li>Zone</li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -75,6 +90,72 @@
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSAirbase.html">DCSAirbase</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSCommand.html">DCSCommand</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSController.html">DCSController</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSGroup.html">DCSGroup</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSObject.html">DCSObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSTask.html">DCSTask</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSTypes.html">DCSTypes</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSUnit.html">DCSUnit</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSWorld.html">DCSWorld</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCStimer.html">DCStimer</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -134,7 +215,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Group.html">Group</a></td>
|
||||
<td class="summary">
|
||||
<p>A GROUP class abstraction of a DCSGroup class.</p>
|
||||
<p>GROUP class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -207,12 +288,24 @@
|
||||
<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>
|
||||
<td class="name" nowrap="nowrap"><a href="Spawn.html">Spawn</a></td>
|
||||
<td class="summary">
|
||||
<p>Dynamic spawning of groups (and units).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="StaticObject.html">StaticObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -224,13 +317,32 @@
|
||||
<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>
|
||||
<td class="name" nowrap="nowrap"><a href="Zone.html">Zone</a></td>
|
||||
<td class="summary">
|
||||
<p>ZONE Classes</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="env.html">env</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="land.html">land</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -46,12 +46,15 @@
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
|
||||
@ -21,6 +21,17 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@ -43,10 +54,14 @@
|
||||
<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="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li>routines</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -146,7 +146,7 @@ function CARGO_ZONE:Signal()
|
||||
if SignalUnit then
|
||||
|
||||
self:T( 'Signalling Unit' )
|
||||
local SignalVehiclePos = SignalUnit:GetPositionVec3()
|
||||
local SignalVehiclePos = SignalUnit:GetPointVec3()
|
||||
SignalVehiclePos.y = SignalVehiclePos.y + 2
|
||||
|
||||
if self.SignalType.ID == CARGO_ZONE.SIGNAL.TYPE.SMOKE.ID then
|
||||
@ -586,7 +586,7 @@ function CARGO_GROUP:IsNear( Client, LandingZone )
|
||||
|
||||
if self.CargoGroupName then
|
||||
local CargoGroup = Group.getByName( self.CargoGroupName )
|
||||
if routines.IsPartOfGroupInRadius( CargoGroup, Client:ClientPosition(), 250 ) then
|
||||
if routines.IsPartOfGroupInRadius( CargoGroup, Client:GetPositionVec3(), 250 ) then
|
||||
Near = true
|
||||
end
|
||||
end
|
||||
@ -691,7 +691,7 @@ function CARGO_GROUP:OnBoarded( Client, LandingZone )
|
||||
local CargoGroup = Group.getByName( self.CargoGroupName )
|
||||
|
||||
if not self.CargoInAir then
|
||||
if routines.IsPartOfGroupInRadius( CargoGroup, Client:ClientPosition(), 25 ) then
|
||||
if routines.IsPartOfGroupInRadius( CargoGroup, Client:GetPositionVec3(), 25 ) then
|
||||
CargoGroup:destroy()
|
||||
self:StatusLoaded( Client )
|
||||
OnBoarded = true
|
||||
@ -790,7 +790,7 @@ function CARGO_PACKAGE:IsNear( Client, LandingZone )
|
||||
self:T( self.CargoClient.ClientName )
|
||||
self:T( 'Client Exists.' )
|
||||
|
||||
if routines.IsUnitInRadius( self.CargoClient:GetClientGroupDCSUnit(), Client:ClientPosition(), 150 ) then
|
||||
if routines.IsUnitInRadius( self.CargoClient:GetClientGroupDCSUnit(), Client:GetPositionVec3(), 150 ) then
|
||||
Near = true
|
||||
end
|
||||
end
|
||||
@ -897,7 +897,7 @@ function CARGO_PACKAGE:OnBoarded( Client, LandingZone )
|
||||
local OnBoarded = false
|
||||
|
||||
if self.CargoClient and self.CargoClient:GetDCSGroup() then
|
||||
if routines.IsUnitInRadius( self.CargoClient:GetClientGroupDCSUnit(), self.CargoClient:ClientPosition(), 10 ) then
|
||||
if routines.IsUnitInRadius( self.CargoClient:GetClientGroupDCSUnit(), self.CargoClient:GetPositionVec3(), 10 ) then
|
||||
|
||||
-- Switch Cargo from self.CargoClient to Client ... Each cargo can have only one client. So assigning the new client for the cargo is enough.
|
||||
self:StatusLoaded( Client )
|
||||
|
||||
291
Moose/Client.lua
291
Moose/Client.lua
@ -4,15 +4,36 @@
|
||||
-- ================
|
||||
-- Clients are those **Units** defined within the Mission Editor that have the skillset defined as __Client__ or __Player__.
|
||||
-- Note that clients are NOT the same as Units, they are NOT necessarily alive.
|
||||
-- The @{CLIENT} class is a wrapper class to handle the DCS Unit objects that have the skillset defined as __Client__ or __Player__:
|
||||
--
|
||||
-- * Wraps the DCS Unit objects with skill level set to Player or Client.
|
||||
-- * Support all DCS Unit APIs.
|
||||
-- * Enhance with Unit specific APIs not in the DCS Group API set.
|
||||
-- * When player joins Unit, execute alive init logic.
|
||||
-- * Handles messages to players.
|
||||
-- * Manage the "state" of the DCS Unit.
|
||||
--
|
||||
-- Clients are being used by the @{MISSION} class to follow players and register their successes.
|
||||
--
|
||||
-- CLIENT construction methods:
|
||||
-- ============================
|
||||
-- Create a new CLIENT object with the @{#CLIENT.New} method:
|
||||
--
|
||||
-- * @{#CLIENT.New}: Creates a new CLIENT object taking the name of the **DCSUnit** that is a client as defined within the mission editor.
|
||||
--
|
||||
-- CLIENT reference methods
|
||||
-- =======================
|
||||
-- For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the _@{DATABASE} object.
|
||||
-- This is done at the beginning of the mission (when the mission starts).
|
||||
--
|
||||
-- The CLIENT 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 CLIENT objects do not "contain" the DCS Unit object.
|
||||
-- The CLIENT 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 CLIENT methods will return nil and log an exception in the DCS.log file.
|
||||
--
|
||||
-- The CLIENT class provides the following functions to retrieve quickly the relevant CLIENT instance:
|
||||
--
|
||||
-- * @{#CLIENT.Find}(): Find a CLIENT instance from the _DATABASE object using a DCS Unit object.
|
||||
-- * @{#CLIENT.FindByName}(): Find a CLIENT instance from the _DATABASE object using a DCS Unit name.
|
||||
--
|
||||
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these CLIENT OBJECT REFERENCES! (make the CLIENT object references nil).
|
||||
--
|
||||
-- @module Client
|
||||
-- @author FlightControl
|
||||
|
||||
@ -24,7 +45,7 @@ Include.File( "Message" )
|
||||
|
||||
--- The CLIENT class
|
||||
-- @type CLIENT
|
||||
-- @extends Base#BASE
|
||||
-- @extends Unit#UNIT
|
||||
CLIENT = {
|
||||
ONBOARDSIDE = {
|
||||
NONE = 0,
|
||||
@ -45,7 +66,35 @@ CLIENT = {
|
||||
}
|
||||
|
||||
|
||||
--- Use this method to register new Clients within a mission.
|
||||
--- Finds a CLIENT from the _DATABASE using the relevant DCS Unit.
|
||||
-- @param #CLIENT self
|
||||
-- @param #string ClientName Name of the DCS **Unit** as defined within the Mission Editor.
|
||||
-- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client.
|
||||
-- @return #CLIENT
|
||||
-- @usage
|
||||
-- -- Create new Clients.
|
||||
-- local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
|
||||
-- Mission:AddGoal( DeploySA6TroopsGoal )
|
||||
--
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
|
||||
function CLIENT:Find( DCSUnit )
|
||||
local ClientName = DCSUnit:getName()
|
||||
local ClientFound = _DATABASE:FindClient( ClientName )
|
||||
|
||||
if ClientFound then
|
||||
ClientFound:F( ClientName )
|
||||
return ClientFound
|
||||
end
|
||||
|
||||
error( "CLIENT not found for: " .. ClientName )
|
||||
end
|
||||
|
||||
|
||||
--- Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.
|
||||
-- As an optional parameter, a briefing text can be given also.
|
||||
-- @param #CLIENT self
|
||||
-- @param #string ClientName Name of the DCS **Unit** as defined within the Mission Editor.
|
||||
-- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client.
|
||||
@ -55,21 +104,38 @@ CLIENT = {
|
||||
-- local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
|
||||
-- Mission:AddGoal( DeploySA6TroopsGoal )
|
||||
--
|
||||
-- Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
|
||||
function CLIENT:New( ClientName, ClientBriefing )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( ClientName, ClientBriefing )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
|
||||
function CLIENT:FindByName( ClientName, ClientBriefing )
|
||||
local ClientFound = _DATABASE:FindClient( ClientName )
|
||||
|
||||
self.ClientName = ClientName
|
||||
self:AddBriefing( ClientBriefing )
|
||||
self.MessageSwitch = true
|
||||
|
||||
return self
|
||||
if ClientFound then
|
||||
ClientFound:F( { ClientName, ClientBriefing } )
|
||||
ClientFound:AddBriefing( ClientBriefing )
|
||||
ClientFound.MessageSwitch = true
|
||||
|
||||
return ClientFound
|
||||
end
|
||||
|
||||
error( "CLIENT not found for: " .. ClientName )
|
||||
end
|
||||
|
||||
function CLIENT:Register( ClientName )
|
||||
local self = BASE:Inherit( self, UNIT:Register( ClientName ) )
|
||||
|
||||
self:F( ClientName )
|
||||
self.ClientName = ClientName
|
||||
self.MessageSwitch = true
|
||||
self.ClientAlive2 = false
|
||||
|
||||
self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Transport defines that the Client is a Transport. Transports show cargo.
|
||||
-- @param #CLIENT self
|
||||
-- @return #CLIENT
|
||||
@ -83,13 +149,38 @@ end
|
||||
--- AddBriefing adds a briefing to a CLIENT when a player joins a mission.
|
||||
-- @param #CLIENT self
|
||||
-- @param #string ClientBriefing is the text defining the Mission briefing.
|
||||
-- @return #CLIENT
|
||||
-- @return #CLIENT self
|
||||
function CLIENT:AddBriefing( ClientBriefing )
|
||||
self:F()
|
||||
self:F( ClientBriefing )
|
||||
self.ClientBriefing = ClientBriefing
|
||||
self.ClientBriefingShown = false
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Show the briefing of the MISSION to the CLIENT.
|
||||
-- @param #CLIENT self
|
||||
-- @return #CLIENT self
|
||||
function CLIENT:ShowBriefing()
|
||||
self:F( { self.ClientName, self.ClientBriefingShown } )
|
||||
|
||||
if not self.ClientBriefingShown then
|
||||
self.ClientBriefingShown = true
|
||||
local Briefing = ""
|
||||
if self.MissionBriefing then
|
||||
Briefing = Briefing .. self.MissionBriefing
|
||||
end
|
||||
if self.ClientBriefing then
|
||||
Briefing = Briefing .. "\n" .. self.ClientBriefing
|
||||
end
|
||||
Briefing = Briefing .. "\nPress [LEFT ALT]+[B] to view the complete mission briefing."
|
||||
self:Message( Briefing, 30, self.ClientName .. '/MissionBriefing', "Briefing" )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Resets a CLIENT.
|
||||
-- @param #CLIENT self
|
||||
@ -99,21 +190,6 @@ function CLIENT:Reset( ClientName )
|
||||
self._Menus = {}
|
||||
end
|
||||
|
||||
--- Checks for a client alive event and calls a function on a continuous basis.
|
||||
-- @param #CLIENT self
|
||||
-- @param #function CallBack Function.
|
||||
-- @return #CLIENT
|
||||
function CLIENT:Alive( CallBack, ... )
|
||||
self:F()
|
||||
|
||||
self.ClientAlive2 = false
|
||||
self.ClientCallBack = CallBack
|
||||
self.ClientParameters = arg
|
||||
self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
-- Is Functions
|
||||
|
||||
--- Checks if the CLIENT is a multi-seated UNIT.
|
||||
@ -138,32 +214,30 @@ function CLIENT:IsMultiSeated()
|
||||
return false
|
||||
end
|
||||
|
||||
--- Checks if client is alive and returns true or false.
|
||||
--- Checks for a client alive event and calls a function on a continuous basis.
|
||||
-- @param #CLIENT self
|
||||
-- @returns #boolean Returns true if client is alive.
|
||||
function CLIENT:IsAlive()
|
||||
self:F( self.ClientName )
|
||||
-- @param #function CallBack Function.
|
||||
-- @return #CLIENT
|
||||
function CLIENT:Alive( CallBack, ... )
|
||||
self:F()
|
||||
|
||||
local ClientUnit = Unit.getByName( self.ClientName )
|
||||
|
||||
if ClientUnit and ClientUnit:isExist() then
|
||||
self:T("true")
|
||||
return true
|
||||
end
|
||||
|
||||
self:T( "false" )
|
||||
return false
|
||||
end
|
||||
self.ClientCallBack = CallBack
|
||||
self.ClientParameters = arg
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- @param #CLIENT self
|
||||
function CLIENT:_AliveCheckScheduler()
|
||||
self:F( { self.ClientName, self.ClientAlive2 } )
|
||||
self:F( { self.ClientName, self.ClientAlive2, self.ClientBriefingShown } )
|
||||
|
||||
if self:IsAlive() then
|
||||
if self:IsAlive() then -- Polymorphic call of UNIT
|
||||
if self.ClientAlive2 == false then
|
||||
self:T("Calling Callback function")
|
||||
self.ClientCallBack( self, unpack( self.ClientParameters ) )
|
||||
self:ShowBriefing()
|
||||
if self.ClientCallBack then
|
||||
self:T("Calling Callback function")
|
||||
self.ClientCallBack( self, unpack( self.ClientParameters ) )
|
||||
end
|
||||
self.ClientAlive2 = true
|
||||
end
|
||||
else
|
||||
@ -284,7 +358,7 @@ function CLIENT:GetClientGroupUnit()
|
||||
|
||||
self:T( self.ClientDCSUnit )
|
||||
if ClientDCSUnit and ClientDCSUnit:isExist() then
|
||||
local ClientUnit = _DATABASE.Units[ self.ClientName ]
|
||||
local ClientUnit = _DATABASE:FindUnit( self.ClientName )
|
||||
self:T2( ClientUnit )
|
||||
return ClientUnit
|
||||
end
|
||||
@ -304,109 +378,6 @@ function CLIENT:GetClientGroupDCSUnit()
|
||||
end
|
||||
end
|
||||
|
||||
-- TODO what is this??? check. possible double function.
|
||||
function CLIENT:GetUnit()
|
||||
self:F()
|
||||
|
||||
return UNIT:New( self:GetClientGroupDCSUnit() )
|
||||
end
|
||||
|
||||
--- Returns the position of the CLIENT in @{DCSTypes#Vec2} format..
|
||||
-- @param #CLIENT self
|
||||
-- @return DCSTypes#Vec2
|
||||
function CLIENT:GetPointVec2()
|
||||
self:F()
|
||||
|
||||
local ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
|
||||
if ClientGroupUnit then
|
||||
if ClientGroupUnit:isExist() then
|
||||
local PointVec3 = ClientGroupUnit:getPoint() --DCSTypes#Vec3
|
||||
local PointVec2 = {} --DCSTypes#Vec2
|
||||
PointVec2.x = PointVec3.x
|
||||
PointVec2.y = PointVec3.z
|
||||
self:T( { PointVec2 } )
|
||||
return PointVec2
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function CLIENT:GetPositionVec3()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.ClientName )
|
||||
local UnitPos = DCSUnit:getPosition().p
|
||||
|
||||
self:T( UnitPos )
|
||||
return UnitPos
|
||||
end
|
||||
|
||||
function CLIENT:GetID()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.ClientName )
|
||||
local UnitID = DCSUnit:getID()
|
||||
|
||||
self:T( UnitID )
|
||||
return UnitID
|
||||
end
|
||||
|
||||
function CLIENT:GetName()
|
||||
self:F( self.ClientName )
|
||||
|
||||
self:T( self.ClientName )
|
||||
return self.ClientName
|
||||
end
|
||||
|
||||
function CLIENT:GetTypeName()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.ClientName )
|
||||
local TypeName = DCSUnit:getTypeName()
|
||||
|
||||
self:T( TypeName )
|
||||
return TypeName
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the position of the CLIENT in @{DCSTypes#Vec3} format.
|
||||
-- @param #CLIENT self
|
||||
-- @return DCSTypes#Vec3
|
||||
function CLIENT:ClientPosition()
|
||||
self:F()
|
||||
|
||||
local ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
|
||||
if ClientGroupUnit then
|
||||
if ClientGroupUnit:isExist() then
|
||||
return ClientGroupUnit:getPosition()
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the altitude of the CLIENT.
|
||||
-- @param #CLIENT self
|
||||
-- @return DCSTypes#Distance
|
||||
function CLIENT:GetAltitude()
|
||||
self:F()
|
||||
|
||||
local ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
|
||||
if ClientGroupUnit then
|
||||
if ClientGroupUnit:isExist() then
|
||||
local PointVec3 = ClientGroupUnit:getPoint() --DCSTypes#Vec3
|
||||
return PointVec3.y
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Evaluates if the CLIENT is a transport.
|
||||
-- @param #CLIENT self
|
||||
@ -453,7 +424,7 @@ end
|
||||
-- @param #string MessageCategory is the category of the message (the title).
|
||||
-- @param #number MessageInterval is the interval in seconds between the display of the @{Message#MESSAGE} when the CLIENT is in the air.
|
||||
function CLIENT:Message( Message, MessageDuration, MessageId, MessageCategory, MessageInterval )
|
||||
self:F()
|
||||
self:F( { Message, MessageDuration, MessageId, MessageCategory, MessageInterval } )
|
||||
|
||||
if not self.MenuMessages then
|
||||
if self:GetClientGroupID() then
|
||||
|
||||
@ -82,18 +82,14 @@ DATABASE = {
|
||||
ClientsByID = {},
|
||||
},
|
||||
DCSUnits = {},
|
||||
DCSUnitsAlive = {},
|
||||
DCSGroups = {},
|
||||
DCSGroupsAlive = {},
|
||||
Units = {},
|
||||
UnitsAlive = {},
|
||||
Groups = {},
|
||||
GroupsAlive = {},
|
||||
UNITS = {},
|
||||
GROUPS = {},
|
||||
NavPoints = {},
|
||||
Statics = {},
|
||||
Players = {},
|
||||
PlayersAlive = {},
|
||||
Clients = {},
|
||||
CLIENTS = {},
|
||||
ClientsAlive = {},
|
||||
Filter = {
|
||||
Coalitions = nil,
|
||||
@ -161,168 +157,67 @@ function DATABASE:New()
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of units of coalitons.
|
||||
-- Possible current coalitions are red, blue and neutral.
|
||||
--- Finds a Unit based on the Unit Name.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string Coalitions Can take the following values: "red", "blue", "neutral".
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterCoalitions( Coalitions )
|
||||
if not self.Filter.Coalitions then
|
||||
self.Filter.Coalitions = {}
|
||||
end
|
||||
if type( Coalitions ) ~= "table" then
|
||||
Coalitions = { Coalitions }
|
||||
end
|
||||
for CoalitionID, Coalition in pairs( Coalitions ) do
|
||||
self.Filter.Coalitions[Coalition] = Coalition
|
||||
end
|
||||
return self
|
||||
-- @param #string UnitName
|
||||
-- @return Unit#UNIT The found Unit.
|
||||
function DATABASE:FindUnit( UnitName )
|
||||
|
||||
local UnitFound = self.UNITS[UnitName]
|
||||
return UnitFound
|
||||
end
|
||||
|
||||
--- Builds a set of units out of categories.
|
||||
-- Possible current categories are plane, helicopter, ground, ship.
|
||||
--- Adds a Unit based on the Unit Name in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string Categories Can take the following values: "plane", "helicopter", "ground", "ship".
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterCategories( Categories )
|
||||
if not self.Filter.Categories then
|
||||
self.Filter.Categories = {}
|
||||
end
|
||||
if type( Categories ) ~= "table" then
|
||||
Categories = { Categories }
|
||||
end
|
||||
for CategoryID, Category in pairs( Categories ) do
|
||||
self.Filter.Categories[Category] = Category
|
||||
end
|
||||
return self
|
||||
function DATABASE:AddUnit( DCSUnit, DCSUnitName )
|
||||
|
||||
self.DCSUnits[DCSUnitName] = DCSUnit
|
||||
self.UNITS[DCSUnitName] = UNIT:Register( DCSUnitName )
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined unit types.
|
||||
-- Possible current types are those types known within DCS world.
|
||||
--- Deletes a Unit from the DATABASE based on the Unit Name.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string Types Can take those type strings known within DCS world.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterTypes( Types )
|
||||
if not self.Filter.Types then
|
||||
self.Filter.Types = {}
|
||||
end
|
||||
if type( Types ) ~= "table" then
|
||||
Types = { Types }
|
||||
end
|
||||
for TypeID, Type in pairs( Types ) do
|
||||
self.Filter.Types[Type] = Type
|
||||
end
|
||||
return self
|
||||
function DATABASE:DeleteUnit( DCSUnitName )
|
||||
|
||||
self.DCSUnits[DCSUnitName] = nil
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined countries.
|
||||
-- Possible current countries are those known within DCS world.
|
||||
--- Finds a CLIENT based on the ClientName.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string Countries Can take those country strings known within DCS world.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterCountries( Countries )
|
||||
if not self.Filter.Countries then
|
||||
self.Filter.Countries = {}
|
||||
end
|
||||
if type( Countries ) ~= "table" then
|
||||
Countries = { Countries }
|
||||
end
|
||||
for CountryID, Country in pairs( Countries ) do
|
||||
self.Filter.Countries[Country] = Country
|
||||
end
|
||||
return self
|
||||
-- @param #string ClientName
|
||||
-- @return Client#CLIENT The found CLIENT.
|
||||
function DATABASE:FindClient( ClientName )
|
||||
|
||||
local ClientFound = self.CLIENTS[ClientName]
|
||||
return ClientFound
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined unit prefixes.
|
||||
-- All the units starting with the given prefixes will be included within the set.
|
||||
--- Adds a CLIENT based on the ClientName in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string Prefixes The prefix of which the unit name starts with.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterUnitPrefixes( Prefixes )
|
||||
if not self.Filter.UnitPrefixes then
|
||||
self.Filter.UnitPrefixes = {}
|
||||
end
|
||||
if type( Prefixes ) ~= "table" then
|
||||
Prefixes = { Prefixes }
|
||||
end
|
||||
for PrefixID, Prefix in pairs( Prefixes ) do
|
||||
self.Filter.UnitPrefixes[Prefix] = Prefix
|
||||
end
|
||||
return self
|
||||
function DATABASE:AddClient( ClientName )
|
||||
|
||||
self.CLIENTS[ClientName] = CLIENT:Register( ClientName )
|
||||
self:E( self.CLIENTS[ClientName]:GetClassNameAndID() )
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined group prefixes.
|
||||
-- All the units starting with the given group prefixes will be included within the set.
|
||||
--- Finds a GROUP based on the GroupName.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string Prefixes The prefix of which the group name where the unit belongs to starts with.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterGroupPrefixes( Prefixes )
|
||||
if not self.Filter.GroupPrefixes then
|
||||
self.Filter.GroupPrefixes = {}
|
||||
end
|
||||
if type( Prefixes ) ~= "table" then
|
||||
Prefixes = { Prefixes }
|
||||
end
|
||||
for PrefixID, Prefix in pairs( Prefixes ) do
|
||||
self.Filter.GroupPrefixes[Prefix] = Prefix
|
||||
end
|
||||
return self
|
||||
-- @param #string GroupName
|
||||
-- @return Group#GROUP The found GROUP.
|
||||
function DATABASE:FindGroup( GroupName )
|
||||
|
||||
local GroupFound = self.GROUPS[GroupName]
|
||||
return GroupFound
|
||||
end
|
||||
|
||||
--- Starts the filtering.
|
||||
--- Adds a GROUP based on the GroupName in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:FilterStart()
|
||||
function DATABASE:AddGroup( DCSGroup, GroupName )
|
||||
|
||||
if _DATABASE then
|
||||
-- OK, we have a _DATABASE
|
||||
-- Now use the different filters to build the set.
|
||||
-- We first take ALL of the Units of the _DATABASE.
|
||||
|
||||
self:E( { "Adding Database Datapoints with filters" } )
|
||||
for DCSUnitName, DCSUnit in pairs( _DATABASE.DCSUnits ) do
|
||||
|
||||
if self:_IsIncludeDCSUnit( DCSUnit ) then
|
||||
|
||||
self:E( { "Adding Unit:", DCSUnitName } )
|
||||
self.DCSUnits[DCSUnitName] = _DATABASE.DCSUnits[DCSUnitName]
|
||||
self.Units[DCSUnitName] = _DATABASE.Units[DCSUnitName]
|
||||
|
||||
if _DATABASE.DCSUnitsAlive[DCSUnitName] then
|
||||
self.DCSUnitsAlive[DCSUnitName] = _DATABASE.DCSUnitsAlive[DCSUnitName]
|
||||
self.UnitsAlive[DCSUnitName] = _DATABASE.UnitsAlive[DCSUnitName]
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for DCSGroupName, DCSGroup in pairs( _DATABASE.DCSGroups ) do
|
||||
|
||||
--if self:_IsIncludeDCSGroup( DCSGroup ) then
|
||||
self:E( { "Adding Group:", DCSGroupName } )
|
||||
self.DCSGroups[DCSGroupName] = _DATABASE.DCSGroups[DCSGroupName]
|
||||
self.Groups[DCSGroupName] = _DATABASE.Groups[DCSGroupName]
|
||||
--end
|
||||
|
||||
if _DATABASE.DCSGroupsAlive[DCSGroupName] then
|
||||
self.DCSGroupsAlive[DCSGroupName] = _DATABASE.DCSGroupsAlive[DCSGroupName]
|
||||
self.GroupsAlive[DCSGroupName] = _DATABASE.GroupsAlive[DCSGroupName]
|
||||
end
|
||||
end
|
||||
|
||||
for DCSUnitName, Client in pairs( _DATABASE.Clients ) do
|
||||
self:E( { "Adding Client for Unit:", DCSUnitName } )
|
||||
self.Clients[DCSUnitName] = _DATABASE.Clients[DCSUnitName]
|
||||
end
|
||||
|
||||
else
|
||||
self:E( "There is a structural error in MOOSE. No _DATABASE has been defined! Cannot build this custom DATABASE." )
|
||||
end
|
||||
|
||||
return self
|
||||
self.DCSGroups[GroupName] = DCSGroup
|
||||
self.GROUPS[GroupName] = GROUP:Register( GroupName )
|
||||
end
|
||||
|
||||
|
||||
--- Instantiate new Groups within the DCSRTE.
|
||||
-- This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined:
|
||||
-- SpawnCountryID, SpawnCategoryID
|
||||
@ -354,7 +249,7 @@ function DATABASE:Spawn( SpawnTemplate )
|
||||
SpawnTemplate.SpawnCategoryID = SpawnCategoryID
|
||||
|
||||
|
||||
local SpawnGroup = GROUP:New( Group.getByName( SpawnTemplate.name ) )
|
||||
local SpawnGroup = GROUP:Register( SpawnTemplate.name )
|
||||
return SpawnGroup
|
||||
end
|
||||
|
||||
@ -449,7 +344,7 @@ end
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:_RegisterDatabase()
|
||||
|
||||
local CoalitionsData = { AlivePlayersRed = coalition.getGroups( coalition.side.RED ), AlivePlayersBlue = coalition.getGroups( coalition.side.BLUE ) }
|
||||
local CoalitionsData = { GroupsRed = coalition.getGroups( coalition.side.RED ), GroupsBlue = coalition.getGroups( coalition.side.BLUE ) }
|
||||
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
|
||||
for DCSGroupId, DCSGroup in pairs( CoalitionData ) do
|
||||
|
||||
@ -457,43 +352,29 @@ function DATABASE:_RegisterDatabase()
|
||||
local DCSGroupName = DCSGroup:getName()
|
||||
|
||||
self:E( { "Register Group:", DCSGroup, DCSGroupName } )
|
||||
self.DCSGroups[DCSGroupName] = DCSGroup
|
||||
self.Groups[DCSGroupName] = GROUP:New( DCSGroup )
|
||||
|
||||
if self:_IsAliveDCSGroup(DCSGroup) then
|
||||
self:E( { "Register Alive Group:", DCSGroup, DCSGroupName } )
|
||||
self.DCSGroupsAlive[DCSGroupName] = DCSGroup
|
||||
self.GroupsAlive[DCSGroupName] = self.Groups[DCSGroupName]
|
||||
end
|
||||
|
||||
self:AddGroup( DCSGroup, DCSGroupName )
|
||||
|
||||
for DCSUnitId, DCSUnit in pairs( DCSGroup:getUnits() ) do
|
||||
|
||||
local DCSUnitName = DCSUnit:getName()
|
||||
self:E( { "Register Unit:", DCSUnit, DCSUnitName } )
|
||||
|
||||
self.DCSUnits[DCSUnitName] = DCSUnit
|
||||
self.Units[DCSUnitName] = UNIT:New( DCSUnit )
|
||||
|
||||
if self:_IsAliveDCSUnit(DCSUnit) then
|
||||
self:E( { "Register Alive Unit:", DCSUnit, DCSUnitName } )
|
||||
self.DCSUnitsAlive[DCSUnitName] = DCSUnit
|
||||
self.UnitsAlive[DCSUnitName] = self.Units[DCSUnitName]
|
||||
end
|
||||
self:AddUnit( DCSUnit, DCSUnitName )
|
||||
end
|
||||
else
|
||||
self:E( "Group does not exist: " .. DCSGroup )
|
||||
self:E( { "Group does not exist: ", DCSGroup } )
|
||||
end
|
||||
|
||||
for ClientName, ClientTemplate in pairs( self.Templates.ClientsByName ) do
|
||||
self.Clients[ClientName] = CLIENT:New( ClientName )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for ClientName, ClientTemplate in pairs( self.Templates.ClientsByName ) do
|
||||
self:E( { "Adding Client:", ClientName } )
|
||||
self:AddClient( ClientName )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Events
|
||||
|
||||
--- Handles the OnBirth event for the alive units set.
|
||||
@ -504,15 +385,8 @@ function DATABASE:_EventOnBirth( Event )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self:_IsIncludeDCSUnit( Event.IniDCSUnit ) then
|
||||
self.DCSUnits[Event.IniDCSUnitName] = Event.IniDCSUnit
|
||||
self.DCSUnitsAlive[Event.IniDCSUnitName] = Event.IniDCSUnit
|
||||
self.Units[Event.IniDCSUnitName] = UNIT:New( Event.IniDCSUnit )
|
||||
|
||||
--if not self.DCSGroups[Event.IniDCSGroupName] then
|
||||
-- self.DCSGroups[Event.IniDCSGroupName] = Event.IniDCSGroupName
|
||||
-- self.DCSGroupsAlive[Event.IniDCSGroupName] = Event.IniDCSGroupName
|
||||
-- self.Groups[Event.IniDCSGroupName] = GROUP:New( Event.IniDCSGroup )
|
||||
--end
|
||||
self:AddUnit( Event.IniDCSUnit, Event.IniDCSUnitName )
|
||||
self:AddGroup( Event.IniDCSGroup, Event.IniDCSGroupName )
|
||||
self:_EventOnPlayerEnterUnit( Event )
|
||||
end
|
||||
end
|
||||
@ -525,9 +399,9 @@ function DATABASE:_EventOnDeadOrCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self.DCSUnitsAlive[Event.IniDCSUnitName] then
|
||||
self.DCSUnits[Event.IniDCSUnitName] = nil
|
||||
self.DCSUnitsAlive[Event.IniDCSUnitName] = nil
|
||||
if self.DCSUnits[Event.IniDCSUnitName] then
|
||||
self:DeleteUnit( Event.IniDCSUnitName )
|
||||
-- add logic to correctly remove a group once all units are destroyed...
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -543,7 +417,7 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
|
||||
if not self.PlayersAlive[Event.IniDCSUnitName] then
|
||||
self:E( { "Add player for unit:", Event.IniDCSUnitName, Event.IniDCSUnit:getPlayerName() } )
|
||||
self.PlayersAlive[Event.IniDCSUnitName] = Event.IniDCSUnit:getPlayerName()
|
||||
self.ClientsAlive[Event.IniDCSUnitName] = _DATABASE.Clients[ Event.IniDCSUnitName ]
|
||||
self.ClientsAlive[Event.IniDCSUnitName] = self.CLIENTS[ Event.IniDCSUnitName ]
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -615,10 +489,10 @@ end
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive unit in the database. The function needs to accept a UNIT parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachDCSUnitAlive( IteratorFunction, ... )
|
||||
function DATABASE:ForEachDCSUnit( IteratorFunction, ... )
|
||||
self:F( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.DCSUnitsAlive )
|
||||
self:ForEach( IteratorFunction, arg, self.DCSUnits )
|
||||
|
||||
return self
|
||||
end
|
||||
@ -643,7 +517,7 @@ end
|
||||
function DATABASE:ForEachClient( IteratorFunction, ... )
|
||||
self:F( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.Clients )
|
||||
self:ForEach( IteratorFunction, arg, self.CLIENTS )
|
||||
|
||||
return self
|
||||
end
|
||||
@ -653,7 +527,7 @@ function DATABASE:ScanEnvironment()
|
||||
self:F()
|
||||
|
||||
self.Navpoints = {}
|
||||
self.Units = {}
|
||||
self.UNITS = {}
|
||||
--Build routines.db.units and self.Navpoints
|
||||
for coa_name, coa_data in pairs(env.mission.coalition) do
|
||||
|
||||
@ -826,7 +700,6 @@ function DATABASE:TraceDatabase()
|
||||
self:F()
|
||||
|
||||
self:T( { "DCSUnits:", self.DCSUnits } )
|
||||
self:T( { "DCSUnitsAlive:", self.DCSUnitsAlive } )
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -635,7 +635,7 @@ function ESCORT._HoldPosition( MenuParam )
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
|
||||
local PointFrom = {}
|
||||
local GroupPoint = EscortGroup:GetUnit(1):GetPositionVec3()
|
||||
local GroupPoint = EscortGroup:GetUnit(1):GetPointVec3()
|
||||
PointFrom = {}
|
||||
PointFrom.x = GroupPoint.x
|
||||
PointFrom.y = GroupPoint.z
|
||||
@ -977,15 +977,15 @@ function ESCORT:_FollowScheduler( FollowDistance )
|
||||
local GroupUnit = self.EscortGroup:GetUnit( 1 )
|
||||
|
||||
if self.CT1 == 0 and self.GT1 == 0 then
|
||||
self.CV1 = ClientUnit:GetPositionVec3()
|
||||
self.CV1 = ClientUnit:GetPointVec3()
|
||||
self.CT1 = timer.getTime()
|
||||
self.GV1 = GroupUnit:GetPositionVec3()
|
||||
self.GV1 = GroupUnit:GetPointVec3()
|
||||
self.GT1 = timer.getTime()
|
||||
else
|
||||
local CT1 = self.CT1
|
||||
local CT2 = timer.getTime()
|
||||
local CV1 = self.CV1
|
||||
local CV2 = ClientUnit:GetPositionVec3()
|
||||
local CV2 = ClientUnit:GetPointVec3()
|
||||
self.CT1 = CT2
|
||||
self.CV1 = CV2
|
||||
|
||||
@ -999,7 +999,7 @@ function ESCORT:_FollowScheduler( FollowDistance )
|
||||
local GT1 = self.GT1
|
||||
local GT2 = timer.getTime()
|
||||
local GV1 = self.GV1
|
||||
local GV2 = GroupUnit:GetPositionVec3()
|
||||
local GV2 = GroupUnit:GetPointVec3()
|
||||
self.GT1 = GT2
|
||||
self.GV1 = GV2
|
||||
|
||||
@ -1082,7 +1082,7 @@ function ESCORT:_ReportTargetsScheduler()
|
||||
self:T( EscortObject )
|
||||
if EscortObject and EscortObject:isExist() and EscortObject.id_ < 50000000 then
|
||||
|
||||
local EscortTargetUnit = UNIT:New( EscortObject )
|
||||
local EscortTargetUnit = UNIT:Find( EscortObject )
|
||||
local EscortTargetUnitName = EscortTargetUnit:GetName()
|
||||
|
||||
|
||||
@ -1105,8 +1105,8 @@ function ESCORT:_ReportTargetsScheduler()
|
||||
-- EscortTargetLastVelocity } )
|
||||
|
||||
|
||||
local EscortTargetUnitPositionVec3 = EscortTargetUnit:GetPositionVec3()
|
||||
local EscortPositionVec3 = self.EscortGroup:GetPositionVec3()
|
||||
local EscortTargetUnitPositionVec3 = EscortTargetUnit:GetPointVec3()
|
||||
local EscortPositionVec3 = self.EscortGroup:GetPointVec3()
|
||||
local Distance = ( ( EscortTargetUnitPositionVec3.x - EscortPositionVec3.x )^2 +
|
||||
( EscortTargetUnitPositionVec3.y - EscortPositionVec3.y )^2 +
|
||||
( EscortTargetUnitPositionVec3.z - EscortPositionVec3.z )^2
|
||||
@ -1164,8 +1164,8 @@ function ESCORT:_ReportTargetsScheduler()
|
||||
EscortTargetMessage = EscortTargetMessage .. "Unknown target at "
|
||||
end
|
||||
|
||||
local EscortTargetUnitPositionVec3 = ClientEscortTargetData.AttackUnit:GetPositionVec3()
|
||||
local EscortPositionVec3 = self.EscortGroup:GetPositionVec3()
|
||||
local EscortTargetUnitPositionVec3 = ClientEscortTargetData.AttackUnit:GetPointVec3()
|
||||
local EscortPositionVec3 = self.EscortGroup:GetPointVec3()
|
||||
local Distance = ( ( EscortTargetUnitPositionVec3.x - EscortPositionVec3.x )^2 +
|
||||
( EscortTargetUnitPositionVec3.y - EscortPositionVec3.y )^2 +
|
||||
( EscortTargetUnitPositionVec3.z - EscortPositionVec3.z )^2
|
||||
@ -1232,7 +1232,7 @@ function ESCORT:_ReportTargetsScheduler()
|
||||
|
||||
local TaskPoints = self:RegisterRoute()
|
||||
for WayPointID, WayPoint in pairs( TaskPoints ) do
|
||||
local EscortPositionVec3 = self.EscortGroup:GetPositionVec3()
|
||||
local EscortPositionVec3 = self.EscortGroup:GetPointVec3()
|
||||
local Distance = ( ( WayPoint.x - EscortPositionVec3.x )^2 +
|
||||
( WayPoint.y - EscortPositionVec3.z )^2
|
||||
) ^ 0.5 / 1000
|
||||
|
||||
1418
Moose/Group.lua
1418
Moose/Group.lua
File diff suppressed because it is too large
Load Diff
@ -452,8 +452,8 @@ function MISSILETRAINER:_EventShot( Event )
|
||||
local Client = self.DBClients[TrainerTargetDCSUnitName]
|
||||
if Client then
|
||||
|
||||
local TrainerSourceUnit = UNIT:New(TrainerSourceDCSUnit)
|
||||
local TrainerTargetUnit = UNIT:New(TrainerTargetDCSUnit)
|
||||
local TrainerSourceUnit = UNIT:Find( TrainerSourceDCSUnit )
|
||||
local TrainerTargetUnit = UNIT:Find( TrainerTargetDCSUnit )
|
||||
|
||||
if self.MessagesOnOff == true and self.AlertsLaunchesOnOff == true then
|
||||
|
||||
@ -489,7 +489,7 @@ function MISSILETRAINER:_AddRange( Client, TrainerWeapon )
|
||||
if self.DetailsRangeOnOff then
|
||||
|
||||
local PositionMissile = TrainerWeapon:getPoint()
|
||||
local PositionTarget = Client:GetPositionVec3()
|
||||
local PositionTarget = Client:GetPointVec3()
|
||||
|
||||
local Range = ( ( PositionMissile.x - PositionTarget.x )^2 +
|
||||
( PositionMissile.y - PositionTarget.y )^2 +
|
||||
@ -509,7 +509,7 @@ function MISSILETRAINER:_AddBearing( Client, TrainerWeapon )
|
||||
if self.DetailsBearingOnOff then
|
||||
|
||||
local PositionMissile = TrainerWeapon:getPoint()
|
||||
local PositionTarget = Client:GetPositionVec3()
|
||||
local PositionTarget = Client:GetPointVec3()
|
||||
|
||||
self:T2( { PositionTarget, PositionMissile })
|
||||
|
||||
@ -557,7 +557,7 @@ function MISSILETRAINER:_TrackMissiles()
|
||||
|
||||
if Client and Client:IsAlive() and TrainerSourceUnit and TrainerSourceUnit:IsAlive() and TrainerWeapon and TrainerWeapon:isExist() and TrainerTargetUnit and TrainerTargetUnit:IsAlive() then
|
||||
local PositionMissile = TrainerWeapon:getPosition().p
|
||||
local PositionTarget = Client:GetPositionVec3()
|
||||
local PositionTarget = Client:GetPointVec3()
|
||||
|
||||
local Distance = ( ( PositionMissile.x - PositionTarget.x )^2 +
|
||||
( PositionMissile.y - PositionTarget.y )^2 +
|
||||
|
||||
@ -231,25 +231,6 @@ function MISSION:AddGoalFunction( GoalFunction )
|
||||
self.GoalFunction = GoalFunction
|
||||
end
|
||||
|
||||
--- Show the briefing of the MISSION to the CLIENT.
|
||||
-- @param CLIENT Client to show briefing to.
|
||||
-- @return CLIENT
|
||||
function MISSION:ShowBriefing( Client )
|
||||
self:F( { Client.ClientName } )
|
||||
|
||||
if not Client.ClientBriefingShown then
|
||||
Client.ClientBriefingShown = true
|
||||
local Briefing = self.MissionBriefing
|
||||
if Client.ClientBriefing then
|
||||
Briefing = Briefing .. "\n" .. Client.ClientBriefing
|
||||
end
|
||||
Briefing = Briefing .. "\n (Press [LEFT ALT]+[B] to view the graphical documentation.)"
|
||||
Client:Message( Briefing, 30, self.Name .. '/MissionBriefing', "Command: Mission Briefing" )
|
||||
end
|
||||
|
||||
return Client
|
||||
end
|
||||
|
||||
--- Register a new @{CLIENT} to participate within the mission.
|
||||
-- @param CLIENT Client is the @{CLIENT} object. The object must have been instantiated with @{CLIENT:New}.
|
||||
-- @return CLIENT
|
||||
|
||||
758
Moose/Set.lua
Normal file
758
Moose/Set.lua
Normal file
@ -0,0 +1,758 @@
|
||||
--- Manage sets of units and groups.
|
||||
--
|
||||
-- @{#Set} class
|
||||
-- ==================
|
||||
-- Mission designers can use the SET class to build sets of units belonging to certain:
|
||||
--
|
||||
-- * Coalitions
|
||||
-- * Categories
|
||||
-- * Countries
|
||||
-- * Unit types
|
||||
-- * Starting with certain prefix strings.
|
||||
--
|
||||
-- This list will grow over time. Planned developments are to include filters and iterators.
|
||||
-- Additional filters will be added around @{Zone#ZONEs}, Radiuses, Active players, ...
|
||||
-- More iterators will be implemented in the near future ...
|
||||
--
|
||||
-- Administers the Initial Sets of the Mission Templates as defined within the Mission Editor.
|
||||
--
|
||||
-- SET construction methods:
|
||||
-- =================================
|
||||
-- Create a new SET object with the @{#SET.New} method:
|
||||
--
|
||||
-- * @{#SET.New}: Creates a new SET object.
|
||||
--
|
||||
--
|
||||
-- SET filter criteria:
|
||||
-- =========================
|
||||
-- You can set filter criteria to define the set of units within the SET.
|
||||
-- Filter criteria are defined by:
|
||||
--
|
||||
-- * @{#SET.FilterCoalitions}: Builds the SET with the units belonging to the coalition(s).
|
||||
-- * @{#SET.FilterCategories}: Builds the SET with the units belonging to the category(ies).
|
||||
-- * @{#SET.FilterTypes}: Builds the SET with the units belonging to the unit type(s).
|
||||
-- * @{#SET.FilterCountries}: Builds the SET with the units belonging to the country(ies).
|
||||
-- * @{#SET.FilterUnitPrefixes}: Builds the SET with the units starting with the same prefix string(s).
|
||||
--
|
||||
-- Once the filter criteria have been set for the SET, you can start filtering using:
|
||||
--
|
||||
-- * @{#SET.FilterStart}: Starts the filtering of the units within the SET.
|
||||
--
|
||||
-- Planned filter criteria within development are (so these are not yet available):
|
||||
--
|
||||
-- * @{#SET.FilterGroupPrefixes}: Builds the SET with the groups of the units starting with the same prefix string(s).
|
||||
-- * @{#SET.FilterZones}: Builds the SET with the units within a @{Zone#ZONE}.
|
||||
--
|
||||
--
|
||||
-- SET iterators:
|
||||
-- ===================
|
||||
-- Once the filters have been defined and the SET has been built, you can iterate the SET with the available iterator methods.
|
||||
-- The iterator methods will walk the SET set, and call for each element within the set a function that you provide.
|
||||
-- The following iterator methods are currently available within the SET:
|
||||
--
|
||||
-- * @{#SET.ForEachAliveUnit}: Calls a function for each alive unit it finds within the SET.
|
||||
--
|
||||
-- Planned iterators methods in development are (so these are not yet available):
|
||||
--
|
||||
-- * @{#SET.ForEachUnit}: Calls a function for each unit contained within the SET.
|
||||
-- * @{#SET.ForEachGroup}: Calls a function for each group contained within the SET.
|
||||
-- * @{#SET.ForEachUnitInZone}: Calls a function for each unit within a certain zone contained within the SET.
|
||||
--
|
||||
-- ====
|
||||
-- @module Set
|
||||
-- @author FlightControl
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Menu" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Unit" )
|
||||
Include.File( "Event" )
|
||||
Include.File( "Client" )
|
||||
|
||||
--- SET class
|
||||
-- @type SET
|
||||
-- @extends Base#BASE
|
||||
SET = {
|
||||
ClassName = "SET",
|
||||
Templates = {
|
||||
Units = {},
|
||||
Groups = {},
|
||||
ClientsByName = {},
|
||||
ClientsByID = {},
|
||||
},
|
||||
DCSUnits = {},
|
||||
DCSUnitsAlive = {},
|
||||
DCSGroups = {},
|
||||
DCSGroupsAlive = {},
|
||||
Units = {},
|
||||
UnitsAlive = {},
|
||||
Groups = {},
|
||||
GroupsAlive = {},
|
||||
NavPoints = {},
|
||||
Statics = {},
|
||||
Players = {},
|
||||
PlayersAlive = {},
|
||||
Clients = {},
|
||||
ClientsAlive = {},
|
||||
Filter = {
|
||||
Coalitions = nil,
|
||||
Categories = nil,
|
||||
Types = nil,
|
||||
Countries = nil,
|
||||
UnitPrefixes = nil,
|
||||
GroupPrefixes = nil,
|
||||
},
|
||||
FilterMeta = {
|
||||
Coalitions = {
|
||||
red = coalition.side.RED,
|
||||
blue = coalition.side.BLUE,
|
||||
neutral = coalition.side.NEUTRAL,
|
||||
},
|
||||
Categories = {
|
||||
plane = Unit.Category.AIRPLANE,
|
||||
helicopter = Unit.Category.HELICOPTER,
|
||||
ground = Unit.Category.GROUND_UNIT,
|
||||
ship = Unit.Category.SHIP,
|
||||
structure = Unit.Category.STRUCTURE,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local _DATABASECoalition =
|
||||
{
|
||||
[1] = "Red",
|
||||
[2] = "Blue",
|
||||
}
|
||||
|
||||
local _DATABASECategory =
|
||||
{
|
||||
[Unit.Category.AIRPLANE] = "Plane",
|
||||
[Unit.Category.HELICOPTER] = "Helicopter",
|
||||
[Unit.Category.GROUND_UNIT] = "Vehicle",
|
||||
[Unit.Category.SHIP] = "Ship",
|
||||
[Unit.Category.STRUCTURE] = "Structure",
|
||||
}
|
||||
|
||||
|
||||
--- Creates a new SET object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.
|
||||
-- @param #SET self
|
||||
-- @return #SET
|
||||
-- @usage
|
||||
-- -- Define a new SET Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
|
||||
-- DBObject = SET:New()
|
||||
function SET:New()
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
_EVENTDISPATCHER:OnBirth( self._EventOnBirth, self )
|
||||
_EVENTDISPATCHER:OnDead( self._EventOnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnCrash( self._EventOnDeadOrCrash, self )
|
||||
|
||||
|
||||
-- Add SET with registered clients and already alive players
|
||||
|
||||
-- Follow alive players and clients
|
||||
_EVENTDISPATCHER:OnPlayerEnterUnit( self._EventOnPlayerEnterUnit, self )
|
||||
_EVENTDISPATCHER:OnPlayerLeaveUnit( self._EventOnPlayerLeaveUnit, self )
|
||||
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Finds a Unit based on the Unit Name.
|
||||
-- @param #SET self
|
||||
-- @param #string UnitName
|
||||
-- @return Unit#UNIT The found Unit.
|
||||
function SET:FindUnit( UnitName )
|
||||
|
||||
local UnitFound = self.Units[UnitName]
|
||||
return UnitFound
|
||||
end
|
||||
|
||||
--- Finds a Unit based on the Unit Name.
|
||||
-- @param #SET self
|
||||
-- @param Unit#UNIT UnitToAdd
|
||||
-- @return Unit#UNIT The added Unit.
|
||||
function SET:AddUnit( UnitToAdd )
|
||||
|
||||
self.Units[UnitToAdd.UnitName] = UnitToAdd
|
||||
return self.Units[UnitToAdd.UnitName]
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Builds a set of units of coalitons.
|
||||
-- Possible current coalitions are red, blue and neutral.
|
||||
-- @param #SET self
|
||||
-- @param #string Coalitions Can take the following values: "red", "blue", "neutral".
|
||||
-- @return #SET self
|
||||
function SET:FilterCoalitions( Coalitions )
|
||||
if not self.Filter.Coalitions then
|
||||
self.Filter.Coalitions = {}
|
||||
end
|
||||
if type( Coalitions ) ~= "table" then
|
||||
Coalitions = { Coalitions }
|
||||
end
|
||||
for CoalitionID, Coalition in pairs( Coalitions ) do
|
||||
self.Filter.Coalitions[Coalition] = Coalition
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of units out of categories.
|
||||
-- Possible current categories are plane, helicopter, ground, ship.
|
||||
-- @param #SET self
|
||||
-- @param #string Categories Can take the following values: "plane", "helicopter", "ground", "ship".
|
||||
-- @return #SET self
|
||||
function SET:FilterCategories( Categories )
|
||||
if not self.Filter.Categories then
|
||||
self.Filter.Categories = {}
|
||||
end
|
||||
if type( Categories ) ~= "table" then
|
||||
Categories = { Categories }
|
||||
end
|
||||
for CategoryID, Category in pairs( Categories ) do
|
||||
self.Filter.Categories[Category] = Category
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined unit types.
|
||||
-- Possible current types are those types known within DCS world.
|
||||
-- @param #SET self
|
||||
-- @param #string Types Can take those type strings known within DCS world.
|
||||
-- @return #SET self
|
||||
function SET:FilterTypes( Types )
|
||||
if not self.Filter.Types then
|
||||
self.Filter.Types = {}
|
||||
end
|
||||
if type( Types ) ~= "table" then
|
||||
Types = { Types }
|
||||
end
|
||||
for TypeID, Type in pairs( Types ) do
|
||||
self.Filter.Types[Type] = Type
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined countries.
|
||||
-- Possible current countries are those known within DCS world.
|
||||
-- @param #SET self
|
||||
-- @param #string Countries Can take those country strings known within DCS world.
|
||||
-- @return #SET self
|
||||
function SET:FilterCountries( Countries )
|
||||
if not self.Filter.Countries then
|
||||
self.Filter.Countries = {}
|
||||
end
|
||||
if type( Countries ) ~= "table" then
|
||||
Countries = { Countries }
|
||||
end
|
||||
for CountryID, Country in pairs( Countries ) do
|
||||
self.Filter.Countries[Country] = Country
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined unit prefixes.
|
||||
-- All the units starting with the given prefixes will be included within the set.
|
||||
-- @param #SET self
|
||||
-- @param #string Prefixes The prefix of which the unit name starts with.
|
||||
-- @return #SET self
|
||||
function SET:FilterUnitPrefixes( Prefixes )
|
||||
if not self.Filter.UnitPrefixes then
|
||||
self.Filter.UnitPrefixes = {}
|
||||
end
|
||||
if type( Prefixes ) ~= "table" then
|
||||
Prefixes = { Prefixes }
|
||||
end
|
||||
for PrefixID, Prefix in pairs( Prefixes ) do
|
||||
self.Filter.UnitPrefixes[Prefix] = Prefix
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of units of defined group prefixes.
|
||||
-- All the units starting with the given group prefixes will be included within the set.
|
||||
-- @param #SET self
|
||||
-- @param #string Prefixes The prefix of which the group name where the unit belongs to starts with.
|
||||
-- @return #SET self
|
||||
function SET:FilterGroupPrefixes( Prefixes )
|
||||
if not self.Filter.GroupPrefixes then
|
||||
self.Filter.GroupPrefixes = {}
|
||||
end
|
||||
if type( Prefixes ) ~= "table" then
|
||||
Prefixes = { Prefixes }
|
||||
end
|
||||
for PrefixID, Prefix in pairs( Prefixes ) do
|
||||
self.Filter.GroupPrefixes[Prefix] = Prefix
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Starts the filtering.
|
||||
-- @param #SET self
|
||||
-- @return #SET self
|
||||
function SET:FilterStart()
|
||||
|
||||
if _DATABASE then
|
||||
-- OK, we have a _DATABASE
|
||||
-- Now use the different filters to build the set.
|
||||
-- We first take ALL of the Units of the _DATABASE.
|
||||
|
||||
self:E( { "Adding Set Datapoints with filters" } )
|
||||
for DCSUnitName, DCSUnit in pairs( _DATABASE.DCSUnits ) do
|
||||
|
||||
if self:_IsIncludeDCSUnit( DCSUnit ) then
|
||||
|
||||
self:E( { "Adding Unit:", DCSUnitName } )
|
||||
self.DCSUnits[DCSUnitName] = _DATABASE.DCSUnits[DCSUnitName]
|
||||
self.Units[DCSUnitName] = _DATABASE:FindUnit( DCSUnitName )
|
||||
|
||||
if _DATABASE.DCSUnitsAlive[DCSUnitName] then
|
||||
self.DCSUnitsAlive[DCSUnitName] = _DATABASE.DCSUnitsAlive[DCSUnitName]
|
||||
self.UnitsAlive[DCSUnitName] = _DATABASE.UnitsAlive[DCSUnitName]
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for DCSGroupName, DCSGroup in pairs( _DATABASE.DCSGroups ) do
|
||||
|
||||
--if self:_IsIncludeDCSGroup( DCSGroup ) then
|
||||
self:E( { "Adding Group:", DCSGroupName } )
|
||||
self.DCSGroups[DCSGroupName] = _DATABASE.DCSGroups[DCSGroupName]
|
||||
self.Groups[DCSGroupName] = _DATABASE:FindGroups( DCSGroupName )
|
||||
--end
|
||||
|
||||
if _DATABASE.DCSGroupsAlive[DCSGroupName] then
|
||||
self.DCSGroupsAlive[DCSGroupName] = _DATABASE.DCSGroupsAlive[DCSGroupName]
|
||||
self.GroupsAlive[DCSGroupName] = _DATABASE.GroupsAlive[DCSGroupName]
|
||||
end
|
||||
end
|
||||
|
||||
for DCSUnitName, Client in pairs( _DATABASE.CLIENTS ) do
|
||||
self:E( { "Adding Client for Unit:", DCSUnitName } )
|
||||
self.Clients[DCSUnitName] = _DATABASE.Clients[DCSUnitName]
|
||||
end
|
||||
|
||||
else
|
||||
self:E( "There is a structural error in MOOSE. No _DATABASE has been defined! Cannot build this custom SET." )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Private method that registers all alive players in the mission.
|
||||
-- @param #SET self
|
||||
-- @return #SET self
|
||||
function SET:_RegisterPlayers()
|
||||
|
||||
local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) }
|
||||
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
|
||||
for UnitId, UnitData in pairs( CoalitionData ) do
|
||||
self:T3( { "UnitData:", UnitData } )
|
||||
if UnitData and UnitData:isExist() then
|
||||
local UnitName = UnitData:getName()
|
||||
if not self.PlayersAlive[UnitName] then
|
||||
self:E( { "Add player for unit:", UnitName, UnitData:getPlayerName() } )
|
||||
self.PlayersAlive[UnitName] = UnitData:getPlayerName()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Private method that registers all datapoints within in the mission.
|
||||
-- @param #SET self
|
||||
-- @return #SET self
|
||||
function SET:_RegisterDatabase()
|
||||
|
||||
local CoalitionsData = { AlivePlayersRed = coalition.getGroups( coalition.side.RED ), AlivePlayersBlue = coalition.getGroups( coalition.side.BLUE ) }
|
||||
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
|
||||
for DCSGroupId, DCSGroup in pairs( CoalitionData ) do
|
||||
|
||||
if DCSGroup:isExist() then
|
||||
local DCSGroupName = DCSGroup:getName()
|
||||
|
||||
self:E( { "Register Group:", DCSGroup, DCSGroupName } )
|
||||
self.DCSGroups[DCSGroupName] = DCSGroup
|
||||
self.Groups[DCSGroupName] = GROUP:New( DCSGroup )
|
||||
|
||||
if self:_IsAliveDCSGroup(DCSGroup) then
|
||||
self:E( { "Register Alive Group:", DCSGroup, DCSGroupName } )
|
||||
self.DCSGroupsAlive[DCSGroupName] = DCSGroup
|
||||
self.GroupsAlive[DCSGroupName] = self.Groups[DCSGroupName]
|
||||
end
|
||||
|
||||
for DCSUnitId, DCSUnit in pairs( DCSGroup:getUnits() ) do
|
||||
|
||||
local DCSUnitName = DCSUnit:getName()
|
||||
self:E( { "Register Unit:", DCSUnit, DCSUnitName } )
|
||||
|
||||
self.DCSUnits[DCSUnitName] = DCSUnit
|
||||
self:AddUnit( UNIT:Find( DCSUnit ) )
|
||||
--self.Units[DCSUnitName] = UNIT:Register( DCSUnit )
|
||||
|
||||
if self:_IsAliveDCSUnit(DCSUnit) then
|
||||
self:E( { "Register Alive Unit:", DCSUnit, DCSUnitName } )
|
||||
self.DCSUnitsAlive[DCSUnitName] = DCSUnit
|
||||
self.UnitsAlive[DCSUnitName] = self.Units[DCSUnitName]
|
||||
end
|
||||
end
|
||||
else
|
||||
self:E( "Group does not exist: " .. DCSGroup )
|
||||
end
|
||||
|
||||
for ClientName, ClientTemplate in pairs( self.Templates.ClientsByName ) do
|
||||
self.Clients[ClientName] = CLIENT:Find( ClientName )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Events
|
||||
|
||||
--- Handles the OnBirth event for the alive units set.
|
||||
-- @param #SET self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SET:_EventOnBirth( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self:_IsIncludeDCSUnit( Event.IniDCSUnit ) then
|
||||
self.DCSUnits[Event.IniDCSUnitName] = Event.IniDCSUnit
|
||||
self.DCSUnitsAlive[Event.IniDCSUnitName] = Event.IniDCSUnit
|
||||
self:AddUnit( UNIT:Register( Event.IniDCSUnit ) )
|
||||
--self.Units[Event.IniDCSUnitName] = UNIT:Register( Event.IniDCSUnit )
|
||||
|
||||
--if not self.DCSGroups[Event.IniDCSGroupName] then
|
||||
-- self.DCSGroups[Event.IniDCSGroupName] = Event.IniDCSGroupName
|
||||
-- self.DCSGroupsAlive[Event.IniDCSGroupName] = Event.IniDCSGroupName
|
||||
-- self.Groups[Event.IniDCSGroupName] = GROUP:New( Event.IniDCSGroup )
|
||||
--end
|
||||
self:_EventOnPlayerEnterUnit( Event )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnDead or OnCrash event for alive units set.
|
||||
-- @param #SET self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SET:_EventOnDeadOrCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self.DCSUnitsAlive[Event.IniDCSUnitName] then
|
||||
self.DCSUnits[Event.IniDCSUnitName] = nil
|
||||
self.DCSUnitsAlive[Event.IniDCSUnitName] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).
|
||||
-- @param #SET self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SET:_EventOnPlayerEnterUnit( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self:_IsIncludeDCSUnit( Event.IniDCSUnit ) then
|
||||
if not self.PlayersAlive[Event.IniDCSUnitName] then
|
||||
self:E( { "Add player for unit:", Event.IniDCSUnitName, Event.IniDCSUnit:getPlayerName() } )
|
||||
self.PlayersAlive[Event.IniDCSUnitName] = Event.IniDCSUnit:getPlayerName()
|
||||
self.ClientsAlive[Event.IniDCSUnitName] = _DATABASE.Clients[ Event.IniDCSUnitName ]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnPlayerLeaveUnit event to clean the active players table.
|
||||
-- @param #SET self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SET:_EventOnPlayerLeaveUnit( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self:_IsIncludeDCSUnit( Event.IniDCSUnit ) then
|
||||
if self.PlayersAlive[Event.IniDCSUnitName] then
|
||||
self:E( { "Cleaning player for unit:", Event.IniDCSUnitName, Event.IniDCSUnit:getPlayerName() } )
|
||||
self.PlayersAlive[Event.IniDCSUnitName] = nil
|
||||
self.ClientsAlive[Event.IniDCSUnitName] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Iterators
|
||||
|
||||
--- Interate the SET and call an interator function for the given set, providing the Object for each element within the set and optional parameters.
|
||||
-- @param #SET self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET.
|
||||
-- @return #SET self
|
||||
function SET:ForEach( IteratorFunction, arg, Set )
|
||||
self:F( arg )
|
||||
|
||||
local function CoRoutine()
|
||||
local Count = 0
|
||||
for ObjectID, Object in pairs( Set ) do
|
||||
self:T2( Object )
|
||||
IteratorFunction( Object, unpack( arg ) )
|
||||
Count = Count + 1
|
||||
if Count % 10 == 0 then
|
||||
coroutine.yield( false )
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local co = coroutine.create( CoRoutine )
|
||||
|
||||
local function Schedule()
|
||||
|
||||
local status, res = coroutine.resume( co )
|
||||
self:T( { status, res } )
|
||||
|
||||
if status == false then
|
||||
error( res )
|
||||
end
|
||||
if res == false then
|
||||
return true -- resume next time the loop
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local Scheduler = SCHEDULER:New( self, Schedule, {}, 0.001, 0.001, 0 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Interate the SET and call an interator function for each **alive** unit, providing the Unit and optional parameters.
|
||||
-- @param #SET self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive unit in the SET. The function needs to accept a UNIT parameter.
|
||||
-- @return #SET self
|
||||
function SET:ForEachDCSUnitAlive( IteratorFunction, ... )
|
||||
self:F( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.DCSUnitsAlive )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Interate the SET and call an interator function for each **alive** player, providing the Unit of the player and optional parameters.
|
||||
-- @param #SET self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET. The function needs to accept a UNIT parameter.
|
||||
-- @return #SET self
|
||||
function SET:ForEachPlayer( IteratorFunction, ... )
|
||||
self:F( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.PlayersAlive )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Interate the SET and call an interator function for each client, providing the Client to the function and optional parameters.
|
||||
-- @param #SET self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET. The function needs to accept a CLIENT parameter.
|
||||
-- @return #SET self
|
||||
function SET:ForEachClient( IteratorFunction, ... )
|
||||
self:F( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.Clients )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function SET:ScanEnvironment()
|
||||
self:F()
|
||||
|
||||
self.Navpoints = {}
|
||||
self.Units = {}
|
||||
--Build routines.db.units and self.Navpoints
|
||||
for coa_name, coa_data in pairs(env.mission.coalition) do
|
||||
|
||||
if (coa_name == 'red' or coa_name == 'blue') and type(coa_data) == 'table' then
|
||||
--self.Units[coa_name] = {}
|
||||
|
||||
----------------------------------------------
|
||||
-- build nav points DB
|
||||
self.Navpoints[coa_name] = {}
|
||||
if coa_data.nav_points then --navpoints
|
||||
for nav_ind, nav_data in pairs(coa_data.nav_points) do
|
||||
|
||||
if type(nav_data) == 'table' then
|
||||
self.Navpoints[coa_name][nav_ind] = routines.utils.deepCopy(nav_data)
|
||||
|
||||
self.Navpoints[coa_name][nav_ind]['name'] = nav_data.callsignStr -- name is a little bit more self-explanatory.
|
||||
self.Navpoints[coa_name][nav_ind]['point'] = {} -- point is used by SSE, support it.
|
||||
self.Navpoints[coa_name][nav_ind]['point']['x'] = nav_data.x
|
||||
self.Navpoints[coa_name][nav_ind]['point']['y'] = 0
|
||||
self.Navpoints[coa_name][nav_ind]['point']['z'] = nav_data.y
|
||||
end
|
||||
end
|
||||
end
|
||||
-------------------------------------------------
|
||||
if coa_data.country then --there is a country table
|
||||
for cntry_id, cntry_data in pairs(coa_data.country) do
|
||||
|
||||
local countryName = string.lower(cntry_data.name)
|
||||
--self.Units[coa_name][countryName] = {}
|
||||
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
|
||||
|
||||
if type(cntry_data) == 'table' then --just making sure
|
||||
|
||||
for obj_type_name, obj_type_data in pairs(cntry_data) do
|
||||
|
||||
if obj_type_name == "helicopter" or obj_type_name == "ship" or obj_type_name == "plane" or obj_type_name == "vehicle" or obj_type_name == "static" then --should be an unncessary check
|
||||
|
||||
local category = obj_type_name
|
||||
|
||||
if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then --there's a group!
|
||||
|
||||
--self.Units[coa_name][countryName][category] = {}
|
||||
|
||||
for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||
|
||||
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
||||
self:_RegisterGroup( GroupTemplate )
|
||||
end --if GroupTemplate and GroupTemplate.units then
|
||||
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||
end --if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then
|
||||
end --if obj_type_name == "helicopter" or obj_type_name == "ship" or obj_type_name == "plane" or obj_type_name == "vehicle" or obj_type_name == "static" then
|
||||
end --for obj_type_name, obj_type_data in pairs(cntry_data) do
|
||||
end --if type(cntry_data) == 'table' then
|
||||
end --for cntry_id, cntry_data in pairs(coa_data.country) do
|
||||
end --if coa_data.country then --there is a country table
|
||||
end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then
|
||||
end --for coa_name, coa_data in pairs(mission.coalition) do
|
||||
|
||||
self:_RegisterDatabase()
|
||||
self:_RegisterPlayers()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #SET self
|
||||
-- @param DCSUnit#Unit DCSUnit
|
||||
-- @return #SET self
|
||||
function SET:_IsIncludeDCSUnit( DCSUnit )
|
||||
self:F( DCSUnit )
|
||||
local DCSUnitInclude = true
|
||||
|
||||
if self.Filter.Coalitions then
|
||||
local DCSUnitCoalition = false
|
||||
for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do
|
||||
self:T( { "Coalition:", DCSUnit:getCoalition(), self.FilterMeta.Coalitions[CoalitionName], CoalitionName } )
|
||||
if self.FilterMeta.Coalitions[CoalitionName] and self.FilterMeta.Coalitions[CoalitionName] == DCSUnit:getCoalition() then
|
||||
DCSUnitCoalition = true
|
||||
end
|
||||
end
|
||||
DCSUnitInclude = DCSUnitInclude and DCSUnitCoalition
|
||||
end
|
||||
|
||||
if self.Filter.Categories then
|
||||
local DCSUnitCategory = false
|
||||
for CategoryID, CategoryName in pairs( self.Filter.Categories ) do
|
||||
self:T( { "Category:", DCSUnit:getDesc().category, self.FilterMeta.Categories[CategoryName], CategoryName } )
|
||||
if self.FilterMeta.Categories[CategoryName] and self.FilterMeta.Categories[CategoryName] == DCSUnit:getDesc().category then
|
||||
DCSUnitCategory = true
|
||||
end
|
||||
end
|
||||
DCSUnitInclude = DCSUnitInclude and DCSUnitCategory
|
||||
end
|
||||
|
||||
if self.Filter.Types then
|
||||
local DCSUnitType = false
|
||||
for TypeID, TypeName in pairs( self.Filter.Types ) do
|
||||
self:T( { "Type:", DCSUnit:getTypeName(), TypeName } )
|
||||
if TypeName == DCSUnit:getTypeName() then
|
||||
DCSUnitType = true
|
||||
end
|
||||
end
|
||||
DCSUnitInclude = DCSUnitInclude and DCSUnitType
|
||||
end
|
||||
|
||||
if self.Filter.Countries then
|
||||
local DCSUnitCountry = false
|
||||
for CountryID, CountryName in pairs( self.Filter.Countries ) do
|
||||
self:T( { "Country:", DCSUnit:getCountry(), CountryName } )
|
||||
if country.id[CountryName] == DCSUnit:getCountry() then
|
||||
DCSUnitCountry = true
|
||||
end
|
||||
end
|
||||
DCSUnitInclude = DCSUnitInclude and DCSUnitCountry
|
||||
end
|
||||
|
||||
if self.Filter.UnitPrefixes then
|
||||
local DCSUnitPrefix = false
|
||||
for UnitPrefixId, UnitPrefix in pairs( self.Filter.UnitPrefixes ) do
|
||||
self:T( { "Unit Prefix:", string.find( DCSUnit:getName(), UnitPrefix, 1 ), UnitPrefix } )
|
||||
if string.find( DCSUnit:getName(), UnitPrefix, 1 ) then
|
||||
DCSUnitPrefix = true
|
||||
end
|
||||
end
|
||||
DCSUnitInclude = DCSUnitInclude and DCSUnitPrefix
|
||||
end
|
||||
|
||||
self:T( DCSUnitInclude )
|
||||
return DCSUnitInclude
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #SET self
|
||||
-- @param DCSUnit#Unit DCSUnit
|
||||
-- @return #SET self
|
||||
function SET:_IsAliveDCSUnit( DCSUnit )
|
||||
self:F( DCSUnit )
|
||||
local DCSUnitAlive = false
|
||||
if DCSUnit and DCSUnit:isExist() and DCSUnit:isActive() then
|
||||
if self.DCSUnits[DCSUnit:getName()] then
|
||||
DCSUnitAlive = true
|
||||
end
|
||||
end
|
||||
self:T( DCSUnitAlive )
|
||||
return DCSUnitAlive
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #SET self
|
||||
-- @param DCSGroup#Group DCSGroup
|
||||
-- @return #SET self
|
||||
function SET:_IsAliveDCSGroup( DCSGroup )
|
||||
self:F( DCSGroup )
|
||||
local DCSGroupAlive = false
|
||||
if DCSGroup and DCSGroup:isExist() then
|
||||
if self.DCSGroups[DCSGroup:getName()] then
|
||||
DCSGroupAlive = true
|
||||
end
|
||||
end
|
||||
self:T( DCSGroupAlive )
|
||||
return DCSGroupAlive
|
||||
end
|
||||
|
||||
|
||||
--- Traces the current SET contents in the log ... (for debug reasons).
|
||||
-- @param #SET self
|
||||
-- @return #SET self
|
||||
function SET:TraceDatabase()
|
||||
self:F()
|
||||
|
||||
self:T( { "DCSUnits:", self.DCSUnits } )
|
||||
self:T( { "DCSUnitsAlive:", self.DCSUnitsAlive } )
|
||||
end
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ end
|
||||
function STAGEBRIEF:Execute( Mission, Client, Task )
|
||||
local Valid = BASE:Inherited(self):Execute( Mission, Client, Task )
|
||||
self:F()
|
||||
Mission:ShowBriefing( Client )
|
||||
Client:ShowBriefing()
|
||||
self.StageBriefingTime = timer.getTime()
|
||||
return Valid
|
||||
end
|
||||
|
||||
751
Moose/Unit.lua
751
Moose/Unit.lua
@ -1,5 +1,77 @@
|
||||
--- 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 DCS Unit.
|
||||
--
|
||||
--
|
||||
-- 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 name.
|
||||
--
|
||||
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
||||
--
|
||||
-- DCS UNIT APIs
|
||||
-- =============
|
||||
-- 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 @{DCSUnit#Unit.getName}()
|
||||
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
||||
--
|
||||
-- Additional UNIT APIs
|
||||
-- ====================
|
||||
-- The UNIT class comes with additional methods. Find below a summary.
|
||||
--
|
||||
-- Smoke, Flare Units
|
||||
-- ------------------
|
||||
-- The UNIT class provides methods to smoke or flare units easily.
|
||||
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
||||
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
||||
-- When the DCS Unit moves for whatever reason, the smoking will still continue!
|
||||
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
||||
-- 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.
|
||||
--
|
||||
-- Position, Point
|
||||
-- ---------------
|
||||
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
||||
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetPointVec3}() 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 @{#UNIT.GetPositionVec3}() method respectively.
|
||||
--
|
||||
-- Alive
|
||||
-- -----
|
||||
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
||||
--
|
||||
-- Test for other units in radius
|
||||
-- ------------------------------
|
||||
-- One can test if another DCS Unit is within a given radius of the current DCS Unit, by using the @{#UNIT.OtherUnitInRadius}() method.
|
||||
--
|
||||
-- More functions will be added
|
||||
-- ----------------------------
|
||||
-- During the MOOSE development, more functions will be added. A complete list of the current functions is below.
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
-- @module Unit
|
||||
-- @author FlightControl
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
@ -7,7 +79,7 @@ Include.File( "Message" )
|
||||
|
||||
--- The UNIT class
|
||||
-- @type UNIT
|
||||
-- @Extends Base#BASE
|
||||
-- @extends Base#BASE
|
||||
-- @field #UNIT.FlareColor FlareColor
|
||||
-- @field #UNIT.SmokeColor SmokeColor
|
||||
UNIT = {
|
||||
@ -48,206 +120,639 @@ UNIT = {
|
||||
-- @field White
|
||||
-- @field Orange
|
||||
-- @field Blue
|
||||
|
||||
|
||||
-- Registration.
|
||||
|
||||
--- Create a new UNIT from DCSUnit.
|
||||
-- @param #UNIT self
|
||||
-- @param DCSUnit#Unit DCSUnit
|
||||
-- @param Database#DATABASE Database
|
||||
-- @return Unit#UNIT
|
||||
function UNIT:New( DCSUnit )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( DCSUnit )
|
||||
function UNIT:Register( UnitName )
|
||||
|
||||
self.DCSUnit = DCSUnit
|
||||
if DCSUnit then
|
||||
self.UnitName = DCSUnit:getName()
|
||||
self.UnitID = DCSUnit:getID()
|
||||
end
|
||||
|
||||
return self
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F2( UnitName )
|
||||
self.UnitName = UnitName
|
||||
return self
|
||||
end
|
||||
|
||||
function UNIT:IsAlive()
|
||||
self:F( self.UnitName )
|
||||
|
||||
return ( self.DCSUnit and self.DCSUnit:isExist() )
|
||||
-- Reference methods.
|
||||
|
||||
--- Finds a UNIT from the _DATABASE using a DCSUnit object.
|
||||
-- @param #UNIT self
|
||||
-- @param DCSUnit#Unit DCSUnit An existing DCS Unit object reference.
|
||||
-- @return Unit#UNIT self
|
||||
function UNIT:Find( DCSUnit )
|
||||
|
||||
local UnitName = DCSUnit:getName()
|
||||
local UnitFound = _DATABASE:FindUnit( UnitName )
|
||||
return UnitFound
|
||||
end
|
||||
|
||||
--- Find a UNIT in the _DATABASE using the name of an existing DCS Unit.
|
||||
-- @param #UNIT self
|
||||
-- @param #string UnitName The Unit Name.
|
||||
-- @return Unit#UNIT self
|
||||
function UNIT:FindByName( UnitName )
|
||||
|
||||
local UnitFound = _DATABASE:FindUnit( UnitName )
|
||||
return UnitFound
|
||||
end
|
||||
|
||||
function UNIT:GetDCSUnit()
|
||||
self:F( self.DCSUnit )
|
||||
|
||||
return self.DCSUnit
|
||||
end
|
||||
|
||||
function UNIT:GetID()
|
||||
self:F( self.UnitID )
|
||||
|
||||
return self.UnitID
|
||||
end
|
||||
|
||||
|
||||
function UNIT:GetName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
return self.UnitName
|
||||
end
|
||||
|
||||
function UNIT:GetPlayerName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.UnitName )
|
||||
|
||||
local PlayerName = DCSUnit:getPlayerName()
|
||||
if PlayerName == nil then
|
||||
PlayerName = ""
|
||||
if DCSUnit then
|
||||
return DCSUnit
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns coalition of the Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSCoalitionObject#coalition.side The side of the coalition.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetCoalition()
|
||||
self:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
return PlayerName
|
||||
end
|
||||
function UNIT:GetTypeName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
return self.DCSUnit:getTypeName()
|
||||
if DCSUnit then
|
||||
local UnitCoalition = DCSUnit:getCoalition()
|
||||
self:T3( UnitCoalition )
|
||||
return UnitCoalition
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function UNIT:GetPrefix()
|
||||
self:F( self.UnitName )
|
||||
|
||||
local UnitPrefix = string.match( self.UnitName, ".*#" ):sub( 1, -2 )
|
||||
self:T( UnitPrefix )
|
||||
--- Returns country of the Unit.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCScountry#country.id The country identifier.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetCountry()
|
||||
self:F2( self.UnitName )
|
||||
|
||||
return UnitPrefix
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitCountry = DCSUnit:getCountry()
|
||||
self:T3( UnitCountry )
|
||||
return UnitCountry
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- 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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitName = self.UnitName
|
||||
return UnitName
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
function UNIT:GetCallSign()
|
||||
self:F( self.UnitName )
|
||||
--- 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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitIsAlive = DCSUnit:isExist()
|
||||
return UnitIsAlive
|
||||
end
|
||||
|
||||
return self.DCSUnit:getCallsign()
|
||||
end
|
||||
|
||||
|
||||
function UNIT:GetPointVec2()
|
||||
self:F( self.UnitName )
|
||||
|
||||
local UnitPos = self.DCSUnit:getPosition().p
|
||||
|
||||
local UnitPoint = {}
|
||||
UnitPoint.x = UnitPos.x
|
||||
UnitPoint.y = UnitPos.z
|
||||
|
||||
self:T( UnitPoint )
|
||||
return UnitPoint
|
||||
end
|
||||
|
||||
|
||||
function UNIT:GetPositionVec3()
|
||||
self:F( self.UnitName )
|
||||
|
||||
local UnitPos = self.DCSUnit:getPosition().p
|
||||
|
||||
self:T( UnitPos )
|
||||
return UnitPos
|
||||
end
|
||||
|
||||
function UNIT:OtherUnitInRadius( AwaitUnit, Radius )
|
||||
self:F( { self.UnitName, AwaitUnit.UnitName, Radius } )
|
||||
|
||||
local UnitPos = self:GetPositionVec3()
|
||||
local AwaitUnitPos = AwaitUnit:GetPositionVec3()
|
||||
|
||||
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
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
|
||||
local UnitIsActive = DCSUnit:isActive()
|
||||
return UnitIsActive
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
|
||||
local PlayerName = DCSUnit:getPlayerName()
|
||||
if PlayerName == nil then
|
||||
PlayerName = ""
|
||||
end
|
||||
return PlayerName
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitID = DCSUnit:getID()
|
||||
return UnitID
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the unit's number in the group.
|
||||
-- The number is the same number the unit has in ME.
|
||||
-- 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.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #number The Unit number.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetNumber()
|
||||
self:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitNumber = DCSUnit:getNumber()
|
||||
return UnitNumber
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitGroup = DCSUnit:getGroup()
|
||||
return UnitGroup
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitCallSign = DCSUnit:getCallsign()
|
||||
return UnitCallSign
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitLife = DCSUnit:getLife()
|
||||
return UnitLife
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitLife0 = DCSUnit:getLife0()
|
||||
return UnitLife0
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitFuel = DCSUnit:getFuel()
|
||||
return UnitFuel
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitAmmo = DCSUnit:getAmmo()
|
||||
return UnitAmmo
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitSensors = DCSUnit:getSensors()
|
||||
return UnitSensors
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
-- Need to add here a function per sensortype
|
||||
-- unit:hasSensors(Unit.SensorType.RADAR, Unit.RadarType.AS)
|
||||
|
||||
--- Returns two values:
|
||||
--
|
||||
-- * First value indicates if at least one of the unit's radar(s) is on.
|
||||
-- * Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.
|
||||
-- @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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitRadarOn, UnitRadarObject = DCSUnit:getRadar()
|
||||
return UnitRadarOn, UnitRadarObject
|
||||
end
|
||||
|
||||
return nil, nil
|
||||
end
|
||||
|
||||
-- Need to add here functions to check if radar is on and which object etc.
|
||||
|
||||
--- 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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitDesc = DCSUnit:getDesc()
|
||||
return UnitDesc
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitTypeName = DCSUnit:getTypeName()
|
||||
self:T3( UnitTypeName )
|
||||
return UnitTypeName
|
||||
end
|
||||
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitPrefix = string.match( self.UnitName, ".*#" ):sub( 1, -2 )
|
||||
self:T3( 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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitPointVec3 = DCSUnit:getPosition().p
|
||||
|
||||
local UnitPointVec2 = {}
|
||||
UnitPointVec2.x = UnitPointVec3.x
|
||||
UnitPointVec2.y = UnitPointVec3.z
|
||||
|
||||
self:T3( UnitPointVec2 )
|
||||
return UnitPointVec2
|
||||
end
|
||||
|
||||
return nil
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitPointVec3 = DCSUnit:getPosition().p
|
||||
self:T3( UnitPointVec3 )
|
||||
return UnitPointVec3
|
||||
end
|
||||
|
||||
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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitPosition = DCSUnit:getPosition()
|
||||
self:T3( UnitPosition )
|
||||
return UnitPosition
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the DCS Unit velocity vector.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return DCSTypes#Vec3 The velocity vector
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function UNIT:GetVelocity()
|
||||
self:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitVelocityVec3 = DCSUnit:getVelocity()
|
||||
self:T3( UnitVelocityVec3 )
|
||||
return UnitVelocityVec3
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- 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:F2( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitInAir = DCSUnit:inAir()
|
||||
self:T3( UnitInAir )
|
||||
return UnitInAir
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- 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:F2()
|
||||
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitPointVec3 = DCSUnit:getPoint() --DCSTypes#Vec3
|
||||
return UnitPointVec3.y
|
||||
end
|
||||
|
||||
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:F2( { self.UnitName, AwaitUnit.UnitName, Radius } )
|
||||
|
||||
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:T3( "true" )
|
||||
return true
|
||||
else
|
||||
self:T3( "false" )
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the DCS Unit category name as defined within the DCS Unit Descriptor.
|
||||
-- @param Unit#UNIT self
|
||||
-- @return #string The DCS Unit Category Name
|
||||
function UNIT:GetCategoryName()
|
||||
return self.CategoryName[ self.DCSUnit:getDesc().category ]
|
||||
local DCSUnit = self:GetDCSUnit()
|
||||
|
||||
if DCSUnit then
|
||||
local UnitCategoryName = self.CategoryName[ self:GetDesc().category ]
|
||||
return UnitCategoryName
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Signal a flare at the position of the UNIT.
|
||||
-- @param #UNIT self
|
||||
function UNIT:Flare( FlareColor )
|
||||
self:F()
|
||||
trigger.action.signalFlare( self:GetPositionVec3(), FlareColor , 0 )
|
||||
self:F2()
|
||||
trigger.action.signalFlare( self:GetPointVec3(), FlareColor , 0 )
|
||||
end
|
||||
|
||||
--- Signal a white flare at the position of the UNIT.
|
||||
-- @param #UNIT self
|
||||
function UNIT:FlareWhite()
|
||||
self:F()
|
||||
trigger.action.signalFlare( self:GetPositionVec3(), trigger.flareColor.White , 0 )
|
||||
self:F2()
|
||||
trigger.action.signalFlare( self:GetPointVec3(), trigger.flareColor.White , 0 )
|
||||
end
|
||||
|
||||
--- Signal a yellow flare at the position of the UNIT.
|
||||
-- @param #UNIT self
|
||||
function UNIT:FlareYellow()
|
||||
self:F()
|
||||
trigger.action.signalFlare( self:GetPositionVec3(), trigger.flareColor.Yellow , 0 )
|
||||
self:F2()
|
||||
trigger.action.signalFlare( self:GetPointVec3(), trigger.flareColor.Yellow , 0 )
|
||||
end
|
||||
|
||||
--- Signal a green flare at the position of the UNIT.
|
||||
-- @param #UNIT self
|
||||
function UNIT:FlareGreen()
|
||||
self:F()
|
||||
trigger.action.signalFlare( self:GetPositionVec3(), trigger.flareColor.Green , 0 )
|
||||
self:F2()
|
||||
trigger.action.signalFlare( self:GetPointVec3(), trigger.flareColor.Green , 0 )
|
||||
end
|
||||
|
||||
--- Signal a red flare at the position of the UNIT.
|
||||
-- @param #UNIT self
|
||||
function UNIT:FlareRed()
|
||||
self:F()
|
||||
trigger.action.signalFlare( self:GetPositionVec3(), trigger.flareColor.Red, 0 )
|
||||
self:F2()
|
||||
trigger.action.signalFlare( self:GetPointVec3(), trigger.flareColor.Red, 0 )
|
||||
end
|
||||
|
||||
--- Smoke the UNIT.
|
||||
-- @param #UNIT self
|
||||
function UNIT:Smoke( SmokeColor )
|
||||
self:F()
|
||||
trigger.action.smoke( self:GetPositionVec3(), SmokeColor )
|
||||
self:F2()
|
||||
trigger.action.smoke( self:GetPointVec3(), SmokeColor )
|
||||
end
|
||||
|
||||
--- Smoke the UNIT Green.
|
||||
-- @param #UNIT self
|
||||
function UNIT:SmokeGreen()
|
||||
self:F()
|
||||
trigger.action.smoke( self:GetPositionVec3(), trigger.smokeColor.Green )
|
||||
self:F2()
|
||||
trigger.action.smoke( self:GetPointVec3(), trigger.smokeColor.Green )
|
||||
end
|
||||
|
||||
--- Smoke the UNIT Red.
|
||||
-- @param #UNIT self
|
||||
function UNIT:SmokeRed()
|
||||
self:F()
|
||||
trigger.action.smoke( self:GetPositionVec3(), trigger.smokeColor.Red )
|
||||
self:F2()
|
||||
trigger.action.smoke( self:GetPointVec3(), trigger.smokeColor.Red )
|
||||
end
|
||||
|
||||
--- Smoke the UNIT White.
|
||||
-- @param #UNIT self
|
||||
function UNIT:SmokeWhite()
|
||||
self:F()
|
||||
trigger.action.smoke( self:GetPositionVec3(), trigger.smokeColor.White )
|
||||
self:F2()
|
||||
trigger.action.smoke( self:GetPointVec3(), trigger.smokeColor.White )
|
||||
end
|
||||
|
||||
--- Smoke the UNIT Orange.
|
||||
-- @param #UNIT self
|
||||
function UNIT:SmokeOrange()
|
||||
self:F()
|
||||
trigger.action.smoke( self:GetPositionVec3(), trigger.smokeColor.Orange )
|
||||
self:F2()
|
||||
trigger.action.smoke( self:GetPointVec3(), trigger.smokeColor.Orange )
|
||||
end
|
||||
|
||||
--- Smoke the UNIT Blue.
|
||||
-- @param #UNIT self
|
||||
function UNIT:SmokeBlue()
|
||||
self:F()
|
||||
trigger.action.smoke( self:GetPositionVec3(), trigger.smokeColor.Blue )
|
||||
self:F2()
|
||||
trigger.action.smoke( self:GetPointVec3(), trigger.smokeColor.Blue )
|
||||
end
|
||||
|
||||
-- Is methods
|
||||
@ -257,14 +762,14 @@ end
|
||||
-- @param #UNIT self
|
||||
-- @return #boolean Air category evaluation result.
|
||||
function UNIT:IsAir()
|
||||
self:F()
|
||||
self:F2()
|
||||
|
||||
local UnitDescriptor = self.DCSUnit:getDesc()
|
||||
self:T( { UnitDescriptor.category, Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
self:T3( { UnitDescriptor.category, Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
|
||||
local IsAirResult = ( UnitDescriptor.category == Unit.Category.AIRPLANE ) or ( UnitDescriptor.category == Unit.Category.HELICOPTER )
|
||||
|
||||
self:T( IsAirResult )
|
||||
self:T3( IsAirResult )
|
||||
return IsAirResult
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -12,7 +12,7 @@ Include.File( "Event" )
|
||||
do
|
||||
local Mission = MISSION:New( 'Destroy Gound', 'Ground', 'Briefing', 'CCCP' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Client Plane', "Just wait and observe the SU-25T destoying targets. Your mission goal should increase..." ) )
|
||||
Mission:AddClient( CLIENT:FindByName( 'Client Plane', "Just wait and observe the SU-25T destoying targets. Your mission goal should increase..." ) )
|
||||
|
||||
local DESTROYGROUPSTASK = DESTROYGROUPSTASK:New( 'Ground Vehicle', 'Ground Vehicles', { 'DESTROY Test 1' }, 100 ) -- 75% of a patriot battery needs to be destroyed to achieve mission success...
|
||||
DESTROYGROUPSTASK:SetGoalTotal( 1 )
|
||||
@ -25,7 +25,7 @@ end
|
||||
do
|
||||
local Mission = MISSION:New( 'Destroy Helicopters', 'Helicopters', 'Briefing', 'CCCP' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Client Plane', "Just wait and observe the SU-25T destoying the helicopters. The helicopter mission goal should increase once all are destroyed ..." ) )
|
||||
Mission:AddClient( CLIENT:FindByName( 'Client Plane', "Just wait and observe the SU-25T destoying the helicopters. The helicopter mission goal should increase once all are destroyed ..." ) )
|
||||
|
||||
local DESTROYGROUPSTASK = DESTROYGROUPSTASK:New( 'Helicopter', 'Helicopters', { 'DESTROY Test 2' }, 50 )
|
||||
DESTROYGROUPSTASK:SetGoalTotal( 2 )
|
||||
|
||||
@ -53,8 +53,8 @@ do
|
||||
SpawnEscortGround = SPAWN:New( "Escort Ground" )
|
||||
SpawnEscortShip = SPAWN:New( "Escort Ship" )
|
||||
|
||||
EscortClientHeli = CLIENT:New( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter )
|
||||
EscortClientPlane = CLIENT:New( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." )
|
||||
EscortClientHeli = CLIENT:FindByName( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter )
|
||||
EscortClientPlane = CLIENT:FindByName( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." )
|
||||
:Alive( EventAlivePlane )
|
||||
|
||||
end
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -26,7 +26,7 @@ Group_Vehicle6 = Spawn_Vehicle:Spawn()
|
||||
Group_Vehicle1:TaskRouteToZone( ZONE:New( "Landing Zone" ), true, 40, "Cone" )
|
||||
|
||||
-- Now land the spawned plane on to the Vinson, by copying the route of another object.
|
||||
Route_Plane = GROUP:NewFromName( "Spawn Helicopter Route Copy" ):CopyRoute( 1, 0 )
|
||||
Route_Plane = GROUP:FindByName( "Spawn Helicopter Route Copy" ):CopyRoute( 1, 0 )
|
||||
|
||||
Group_Plane:Route( Route_Plane )
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@ Include.File( "CleanUp" )
|
||||
do
|
||||
local Mission = MISSION:New( 'Pickup', 'Operational', 'Pickup Troops', 'NATO' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'DE Pickup Test 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:New( 'DE Pickup Test 2' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'DE Pickup Test 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'DE Pickup Test 2' ):Transport() )
|
||||
|
||||
local CargoTable = {}
|
||||
|
||||
@ -62,7 +62,7 @@ end
|
||||
do
|
||||
local Mission = MISSION:New( 'Deliver secret letter', 'Operational', 'Pickup letter to the commander.', 'NATO' )
|
||||
|
||||
Client_Package_1 = CLIENT:New( 'BE Package Test 1' ):Transport()
|
||||
Client_Package_1 = CLIENT:FindByName( 'BE Package Test 1' ):Transport()
|
||||
|
||||
Mission:AddClient( Client_Package_1 )
|
||||
|
||||
@ -95,8 +95,8 @@ end
|
||||
do
|
||||
local Mission = MISSION:New( 'Sling load Cargo', 'Operational', 'Sling Load Cargo to Deploy Zone.', 'NATO' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Sling Load Test Client 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:New( 'Sling Load Test Client 2' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'Sling Load Test Client 1' ):Transport() )
|
||||
Mission:AddClient( CLIENT:FindByName( 'Sling Load Test Client 2' ):Transport() )
|
||||
|
||||
Sling_Load_Pickup_Zone = CARGO_ZONE:New( 'Sling Load Pickup Zone', 'Sling Load Guard' ):RedSmoke()
|
||||
|
||||
|
||||
Binary file not shown.
39
Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.lua
Normal file
39
Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.lua
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
Include.File( "Group" )
|
||||
Include.File( "Unit" )
|
||||
Include.File( "Client" )
|
||||
|
||||
BASE:TraceClass( "UNIT" )
|
||||
BASE:TraceClass( "GROUP" )
|
||||
BASE:TraceClass( "CLIENT" )
|
||||
|
||||
UnitTankAI1 = _DATABASE:FindUnit( "Smoke Test 1" )
|
||||
UnitTankAI2 = _DATABASE:FindUnit( "Smoke Test 2" )
|
||||
UnitTankAI3 = UNIT:FindByName( "Smoke Test 3" )
|
||||
UnitTankAI4 = _DATABASE:FindUnit( "Smoke Test 4" )
|
||||
|
||||
UnitTankAI1:SmokeBlue()
|
||||
|
||||
UnitTankAI3:SmokeOrange()
|
||||
|
||||
UnitTankAI2:T( UnitTankAI2:GetAmmo() )
|
||||
|
||||
GroupTanks = GROUP:FindByName( "Smoke Test" )
|
||||
|
||||
GroupTanks:T( GroupTanks:OptionROEOpenFirePossible() )
|
||||
|
||||
GroupTanks:OptionROEOpenFire()
|
||||
|
||||
local function ClientAlive( Client, ClientNumber )
|
||||
GroupTanks:MessageToClient( "Hello Client " .. ClientNumber .. "! We are reporting to you on our way...", 5, Client )
|
||||
end
|
||||
|
||||
|
||||
ClientHeli = CLIENT:FindByName( "Client Test 1", "Fly slowly to waypoint 3 of the Command Post!" ):Alive( ClientAlive, 1 )
|
||||
ClientHeli2 = CLIENT:FindByName( "Client Test 2", "Fly slowly to waypoint 3 of the Command Post!" ):Alive( ClientAlive, 2 )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
Normal file
BIN
Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user