SPAWN: Added InitRandomizePosition API

-- SPAWN:InitRandomizePosition( RandomizePosition, OuterRadius,
InnerRadius ) added.
-- SPA-350 test missions
-- Documentation Update
-- testing.
This commit is contained in:
FlightControl
2017-03-14 09:09:48 +01:00
parent 8c8e95d8fb
commit a0100d0980
8 changed files with 302 additions and 14 deletions

View File

@@ -2425,7 +2425,6 @@ The UNIT carrying the package.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_CARGO_UNIT).CargoCarrier" >
<strong>AI_CARGO_UNIT.CargoCarrier</strong>
</a>

View File

@@ -1346,6 +1346,7 @@ The new calculated POINT_VEC2.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(POINT_VEC2).z" >
<strong>POINT_VEC2.z</strong>
</a>

View File

@@ -134,6 +134,7 @@ So in principle, the group list will contain all parameters and configurations a
<li><a href="##(SPAWN).InitUnControlled">SPAWN.InitUnControlled</a>(): Spawn plane groups uncontrolled.</li>
<li><a href="##(SPAWN).InitArray">SPAWN.InitArray</a>(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.</li>
<li><a href="##(SPAWN).InitRepeat">SPAWN.InitRepeat</a>(): Re-spawn groups when they land at the home base. Similar methods are <a href="##(SPAWN).InitRepeatOnLanding">SPAWN.InitRepeatOnLanding</a> and <a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN.InitRepeatOnEngineShutDown</a>.</li>
<li><a href="##(SPAWN).InitRandomizePosition">SPAWN.InitRandomizePosition</a>(): Randomizes the position of <a href="Group.html">Group</a>s that are spawned within a <strong>radius band</strong>, given an Outer and Inner radius, from the point that the spawn happens.</li>
<li><a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>(): Randomizes the <a href="Unit.html">Unit</a>s in the <a href="Group.html">Group</a> that is spawned within a <strong>radius band</strong>, given an Outer and Inner radius.</li>
<li><a href="##(SPAWN).InitRandomizeZones">SPAWN.InitRandomizeZones</a>(): Randomizes the spawning between a predefined list of <a href="Zone.html">Zone</a>s that are declared using this function. Each zone can be given a probability factor.</li>
<li><a href="##(SPAWN).InitAIOn">SPAWN.InitAIOn</a>(): Turns the AI On when spawning the new <a href="Group.html">Group</a> object.</li>
@@ -208,7 +209,8 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
<p>Hereby the change log:</p>
<p>2017-03-14: SPAWN:<strong>InitKeepUnitNames()</strong> added.</p>
<p>2017-03-14: SPAWN:<strong>InitKeepUnitNames()</strong> added. <br/>
2017-03-14: SPAWN:<strong>InitRandomizePosition( RandomizePosition, OuterRadious, InnerRadius )</strong> added.</p>
<p>2017-02-04: SPAWN:InitUnControlled( <strong>UnControlled</strong> ) replaces SPAWN:InitUnControlled().</p>
@@ -371,6 +373,12 @@ and any spaces before and after the resulting name are removed.</p>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitLimit">SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups)</a></td>
<td class="summary">
<p>Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRandomizePosition">SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius)</a></td>
<td class="summary">
<p>Randomizes the position of <a href="Group.html">Group</a>s that are spawned within a <strong>radius band</strong>, given an Outer and Inner radius, from the point that the spawn happens.</p>
</td>
</tr>
<tr>
@@ -611,6 +619,24 @@ and any spaces before and after the resulting name are removed.</p>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomize">SPAWN.SpawnRandomize</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizePosition">SPAWN.SpawnRandomizePosition</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizePositionInnerRadius">SPAWN.SpawnRandomizePositionInnerRadius</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizePositionOuterRadius">SPAWN.SpawnRandomizePositionOuterRadius</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -1328,6 +1354,45 @@ self</p>
-- There will be maximum 24 groups spawned during the whole mission lifetime.
Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).InitRandomizePosition" >
<strong>SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius)</strong>
</a>
</dt>
<dd>
<p>Randomizes the position of <a href="Group.html">Group</a>s that are spawned within a <strong>radius band</strong>, given an Outer and Inner radius, from the point that the spawn happens.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#boolean RandomizePosition </em></code>:
If true, SPAWN will perform the randomization of the <a href="Group.html">Group</a>s position between a given outer and inner radius. </p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> OuterRadius </em></code>:
(optional) The outer radius in meters where the new group will be spawned.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> InnerRadius </em></code>:
(optional) The inner radius in meters where the new group will NOT be spawned.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
</dd>
</dl>
<dl class="function">
@@ -2258,9 +2323,6 @@ when nothing was spawned.</p>
<p> Overwrite unit names by default with group name.</p>
</dd>
</dl>
<dl class="function">
@@ -2275,6 +2337,9 @@ when nothing was spawned.</p>
<p> By default, no InitLimit</p>
</dd>
</dl>
<dl class="function">
@@ -2310,7 +2375,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(SPAWN).SpawnMaxGroups" >
<strong>SPAWN.SpawnMaxGroups</strong>
</a>
@@ -2327,7 +2392,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
</a>
@@ -2369,6 +2434,45 @@ when nothing was spawned.</p>
<p> Sets the randomization flag of new Spawned units to false.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).SpawnRandomizePosition" >
<strong>SPAWN.SpawnRandomizePosition</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).SpawnRandomizePositionInnerRadius" >
<strong>SPAWN.SpawnRandomizePositionInnerRadius</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).SpawnRandomizePositionOuterRadius" >
<strong>SPAWN.SpawnRandomizePositionOuterRadius</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -2606,7 +2710,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<dl class="function">
<dt>
<em>#boolean</em>
<em></em>
<a id="#(SPAWN).SpawnUnControlled" >
<strong>SPAWN.SpawnUnControlled</strong>
</a>
@@ -2630,7 +2734,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
</dd>
</dl>