Set AI On or Off when spawning

-- Added AI On or Off functions for SPAWN
-- Added AI On or Off functions for GROUP
This commit is contained in:
FlightControl
2017-01-24 07:10:20 +01:00
parent 0c55d62763
commit 0cb456ef0c
5 changed files with 305 additions and 250 deletions

View File

@@ -128,6 +128,9 @@ So in principle, the group list will contain all parameters and configurations a
<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).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>
<li><a href="##(SPAWN).InitAIOff">SPAWN.InitAIOff</a>(): Turns the AI Off when spawning the new <a href="Group.html">Group</a> object.</li>
<li><a href="##(SPAWN).InitAIOnOff">SPAWN.InitAIOnOff</a>(): Turns the AI On or Off when spawning the new <a href="Group.html">Group</a> object.</li>
</ul>
<h2>1.3) SPAWN spawning methods</h2>
@@ -317,6 +320,12 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
<h2><a id="#(SPAWN)">Type <code>SPAWN</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AIOnOff">SPAWN.AIOnOff</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AliveUnits">SPAWN.AliveUnits</a></td>
<td class="summary">
@@ -362,6 +371,24 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetSpawnIndexFromGroup">SPAWN:GetSpawnIndexFromGroup(SpawnGroup)</a></td>
<td class="summary">
<p>Get the index from a given group.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOff">SPAWN:InitAIOff()</a></td>
<td class="summary">
<p>Turns the AI Off for the <a href="Group.html">Group</a> when spawning.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOn">SPAWN:InitAIOn()</a></td>
<td class="summary">
<p>Turns the AI On for the <a href="Group.html">Group</a> when spawning.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOnOff">SPAWN:InitAIOnOff(AIOnOff)</a></td>
<td class="summary">
<p>Turns the AI On or Off for the <a href="Group.html">Group</a> when spawning.</p>
</td>
</tr>
<tr>
@@ -883,6 +910,23 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
<dl class="function">
<dt>
<em>#boolean</em>
<a id="#(SPAWN).AIOnOff" >
<strong>SPAWN.AIOnOff</strong>
</a>
</dt>
<dd>
<p> The AI is on by default when spawning a group.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(SPAWN).AliveUnits" >
<strong>SPAWN.AliveUnits</strong>
@@ -1098,6 +1142,68 @@ end</code></pre>
<dl class="function">
<dt>
<a id="#(SPAWN).InitAIOff" >
<strong>SPAWN:InitAIOff()</strong>
</a>
</dt>
<dd>
<p>Turns the AI Off for the <a href="Group.html">Group</a> when spawning.</p>
<h3>Return value</h3>
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
The SPAWN object</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).InitAIOn" >
<strong>SPAWN:InitAIOn()</strong>
</a>
</dt>
<dd>
<p>Turns the AI On for the <a href="Group.html">Group</a> when spawning.</p>
<h3>Return value</h3>
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
The SPAWN object</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).InitAIOnOff" >
<strong>SPAWN:InitAIOnOff(AIOnOff)</strong>
</a>
</dt>
<dd>
<p>Turns the AI On or Off for the <a href="Group.html">Group</a> when spawning.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#boolean AIOnOff </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
The SPAWN object</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPAWN).InitArray" >
<strong>SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)</strong>
</a>
@@ -2171,7 +2277,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em>#number</em>
<em></em>
<a id="#(SPAWN).SpawnMaxGroups" >
<strong>SPAWN.SpawnMaxGroups</strong>
</a>
@@ -2188,7 +2294,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em>#number</em>
<em></em>
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
</a>