mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Progress, changed and reworked protocols
2016-08-14 - Changed Spawn APIs to express Group position and Unit position randomization. - Changed the API protocol of SpawnInZone() method. -- Removed OuterRadius and InnerRadius parameters !!! - Changed the API protocol of SpawnFromUnit() method. -- Removed OuterRadius and InnerRadius parameters !!! - Added InitRandomizeUnits() method, taking 3 parameters: -- RandomizeUnits given the value true, will randomize the units upon spawning, false (default) will not randomize the untis. -- OuterRadius is the outer radius of the band where the units will be spawned, if RandomizeUnits is true. -- InnerRadius is the inner radius of the band where the units will not be spawned, if RandomizeUnits is true. - Removed SpawnFunction() method. - Added OnSpawnGroup() method as the new official CallBack function method to catch when a new function will be called. -- Documented OnSpawnGroup() method. - Renamed Limit() method to InitLimit() method. - Renamed Array() method to InitArray() method. - Renamed RandomizeRoute() method to InitRandomizeRoute() method. - Renamed RandomizeTemplate() method to InitRandomizeTemplate() method. - Reviewed all test missions for the changes executed and made adaptions where necessary + re-tests.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<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="Controllable.html">Controllable</a></li>
|
||||
@@ -65,6 +65,7 @@
|
||||
<li><a href="Process.html">Process</a></li>
|
||||
<li><a href="Process_Destroy.html">Process_Destroy</a></li>
|
||||
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
||||
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
||||
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
@@ -80,6 +81,7 @@
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_Assign.html">Task_Assign</a></li>
|
||||
<li><a href="Task_Client_Menu.html">Task_Client_Menu</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Task_Route.html">Task_Route</a></li>
|
||||
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
|
||||
<li>Unit</li>
|
||||
@@ -143,7 +145,7 @@ methods will fire off a flare in the air with the corresponding color. Note that
|
||||
|
||||
<h2>1.4) Location Position, Point</h2>
|
||||
<p>The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
||||
The <a href="##(UNIT).GetPointVec2">UNIT.GetPointVec2</a>(), <a href="##(UNIT).GetPointVec3">UNIT.GetPointVec3</a>() will obtain the current <strong>location</strong> of the DCS Unit in a Vec2 (2D) or a <strong>point</strong> in a Vec3 (3D) vector respectively.
|
||||
The <a href="##(UNIT).GetPointVec2">UNIT.GetPointVec2</a>(), <a href="##(UNIT).GetVec3">UNIT.GetVec3</a>() will obtain the current <strong>location</strong> of the DCS Unit in a Vec2 (2D) or a <strong>point</strong> in a Vec3 (3D) vector respectively.
|
||||
If you want to obtain the complete <strong>3D position</strong> including ori<72>ntation and direction vectors, consult the <a href="##(UNIT).GetPositionVec3">UNIT.GetPositionVec3</a>() method respectively.</p>
|
||||
|
||||
<h2>1.5) Test if alive</h2>
|
||||
@@ -174,12 +176,6 @@ If you want to obtain the complete <strong>3D position</strong> including ori<72>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).ClassName">UNIT.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).Destroy">UNIT:Destroy()</a></td>
|
||||
<td class="summary">
|
||||
<p>Destroys the <a href="Unit.html">Unit</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -364,12 +360,24 @@ If you want to obtain the complete <strong>3D position</strong> including ori<72>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsShip">UNIT:IsShip()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if the unit is of a ship category.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).Name">UNIT:Name()</a></td>
|
||||
<td class="summary">
|
||||
<p>Return the name of the UNIT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).OtherUnitInRadius">UNIT:OtherUnitInRadius(AwaitUnit, Radius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns true if there is an <strong>other</strong> DCS Unit within a radius of the current 2D point of the DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).ReSpawn">UNIT:ReSpawn(SpawnVec3, Heading)</a></td>
|
||||
<td class="summary">
|
||||
<p>Respawn the <a href="Unit.html">Unit</a> using a (tweaked) template of the parent Group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -546,24 +554,6 @@ If you want to obtain the complete <strong>3D position</strong> including ori<72>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).Destroy" >
|
||||
<strong>UNIT:Destroy()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Destroys the <a href="Unit.html">Unit</a>.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The DCS Unit is not existing or alive. </p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1332,6 +1322,24 @@ Ship category evaluation result.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).Name" >
|
||||
<strong>UNIT:Name()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Return the name of the UNIT.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The UNIT name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).OtherUnitInRadius" >
|
||||
<strong>UNIT:OtherUnitInRadius(AwaitUnit, Radius)</strong>
|
||||
</a>
|
||||
@@ -1375,6 +1383,45 @@ The DCS Unit is not existing or alive. </p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).ReSpawn" >
|
||||
<strong>UNIT:ReSpawn(SpawnVec3, Heading)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Respawn the <a href="Unit.html">Unit</a> using a (tweaked) template of the parent Group.</p>
|
||||
|
||||
|
||||
|
||||
<p>This function will:</p>
|
||||
|
||||
<ul>
|
||||
<li>Get the current position and heading of the group.</li>
|
||||
<li>When the unit is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.</li>
|
||||
<li>Then it will respawn the re-modelled group.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> SpawnVec3 </em></code>:
|
||||
The position where to Spawn the new Unit at.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Heading </em></code>:
|
||||
The heading of the unit respawn.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).Register" >
|
||||
<strong>UNIT:Register(UnitName)</strong>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user