mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Updated documentation
This commit is contained in:
@@ -79,93 +79,16 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
and automatically engage any airborne enemies that are within a certain range or within a certain zone.</p>
|
||||
<p>AI CAP classes makes AI Controllables execute a Combat Air Patrol.</p>
|
||||
|
||||
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia3.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI<em>CAP</em>ZONE is assigned a <a href="Group.html">Group</a> and this must be done before the AI<em>CAP</em>ZONE process can be started using the <strong>Start</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia4.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.
|
||||
Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia5.JPG" alt="Process"/></p>
|
||||
|
||||
<p>This cycle will continue.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia6.JPG" alt="Process"/></p>
|
||||
|
||||
<p>During the patrol, the AI will detect enemy targets, which are reported through the <strong>Detected</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia9.JPG" alt="Process"/></p>
|
||||
|
||||
<p>When enemies are detected, the AI will automatically engage the enemy.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia10.JPG" alt="Process"/></p>
|
||||
|
||||
<p>Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
|
||||
When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia13.JPG" alt="Process"/></p>
|
||||
|
||||
<h2>1.1) AI<em>CAP</em>ZONE constructor</h2>
|
||||
<p>There are the following types of CAP classes defined:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CAP_ZONE).New">AI<em>CAP</em>ZONE.New</a>(): Creates a new AI<em>CAP</em>ZONE object.</li>
|
||||
<li><a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a>: Perform a CAP in a zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>CAP</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>CAP</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
<li><strong>Patrolling</strong> ( Group ): The AI is patrolling the Patrol Zone.</li>
|
||||
<li><strong>Engaging</strong> ( Group ): The AI is engaging the bogeys.</li>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base..</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>CAP</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Route">AI<em>Patrol#AI</em>PATROL_ZONE.Route</a>**: Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Engage">AI<em>CAP</em>ZONE.Engage</a>**: Let the AI engage the bogeys.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Abort">AI<em>CAP</em>ZONE.Abort</a>**: Aborts the engagement and return patrolling in the patrol zone.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).RTB">AI<em>Patrol#AI</em>PATROL_ZONE.RTB</a>**: Route the AI to the home base.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detect">AI<em>Patrol#AI</em>PATROL_ZONE.Detect</a>**: The AI is detecting targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detected">AI<em>Patrol#AI</em>PATROL_ZONE.Detected</a>**: The AI has detected new targets.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Destroy">AI<em>CAP</em>ZONE.Destroy</a>**: The AI has destroyed a bogey <a href="Unit.html">Unit</a>.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Destroyed">AI<em>CAP</em>ZONE.Destroyed</a>**: The AI has destroyed all bogeys <a href="Unit.html">Unit</a>s assigned in the CAS task.</li>
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) Set the Range of Engagement</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia11.JPG" alt="Range"/></p>
|
||||
|
||||
<p>An optional range can be set in meters,
|
||||
that will define when the AI will engage with the detected airborne enemy targets.
|
||||
The range can be beyond or smaller than the range of the Patrol Zone.
|
||||
The range is applied at the position of the AI.
|
||||
Use the method <a href="AI_CAP.html##(AI_CAP_ZONE).SetEngageRange">AI<em>CAP#AI</em>CAP_ZONE.SetEngageRange</a>() to define that range.</p>
|
||||
|
||||
<h2>1.4) Set the Zone of Engagement</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia12.JPG" alt="Zone"/></p>
|
||||
|
||||
<p>An optional <a href="Zone.html">Zone</a> can be set,
|
||||
that will define when the AI will engage with the detected airborne enemy targets.
|
||||
Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</em>CAP_ZONE.SetEngageZone</a>() to define that Zone.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
@@ -207,7 +130,10 @@ Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CAP_ZONE">AI_CAP_ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
and automatically engage any airborne enemies that are within a certain range or within a certain zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -241,12 +167,6 @@ Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAP_ZONE).Accomplished">AI_CAP_ZONE.Accomplished</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAP_ZONE).ClassName">AI_CAP_ZONE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -472,6 +392,94 @@ Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
and automatically engage any airborne enemies that are within a certain range or within a certain zone.</p>
|
||||
|
||||
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia3.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI<em>CAP</em>ZONE is assigned a <a href="Group.html">Group</a> and this must be done before the AI<em>CAP</em>ZONE process can be started using the <strong>Start</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia4.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.
|
||||
Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia5.JPG" alt="Process"/></p>
|
||||
|
||||
<p>This cycle will continue.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia6.JPG" alt="Process"/></p>
|
||||
|
||||
<p>During the patrol, the AI will detect enemy targets, which are reported through the <strong>Detected</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia9.JPG" alt="Process"/></p>
|
||||
|
||||
<p>When enemies are detected, the AI will automatically engage the enemy.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia10.JPG" alt="Process"/></p>
|
||||
|
||||
<p>Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
|
||||
When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia13.JPG" alt="Process"/></p>
|
||||
|
||||
<h2>1.1) AI<em>CAP</em>ZONE constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CAP_ZONE).New">AI<em>CAP</em>ZONE.New</a>(): Creates a new AI<em>CAP</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>CAP</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>CAP</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
<li><strong>Patrolling</strong> ( Group ): The AI is patrolling the Patrol Zone.</li>
|
||||
<li><strong>Engaging</strong> ( Group ): The AI is engaging the bogeys.</li>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base..</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>CAP</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Route">AI<em>Patrol#AI</em>PATROL_ZONE.Route</a>**: Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Engage">AI<em>CAP</em>ZONE.Engage</a>**: Let the AI engage the bogeys.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Abort">AI<em>CAP</em>ZONE.Abort</a>**: Aborts the engagement and return patrolling in the patrol zone.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).RTB">AI<em>Patrol#AI</em>PATROL_ZONE.RTB</a>**: Route the AI to the home base.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detect">AI<em>Patrol#AI</em>PATROL_ZONE.Detect</a>**: The AI is detecting targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detected">AI<em>Patrol#AI</em>PATROL_ZONE.Detected</a>**: The AI has detected new targets.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Destroy">AI<em>CAP</em>ZONE.Destroy</a>**: The AI has destroyed a bogey <a href="Unit.html">Unit</a>.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Destroyed">AI<em>CAP</em>ZONE.Destroyed</a>**: The AI has destroyed all bogeys <a href="Unit.html">Unit</a>s assigned in the CAS task.</li>
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) Set the Range of Engagement</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia11.JPG" alt="Range"/></p>
|
||||
|
||||
<p>An optional range can be set in meters,
|
||||
that will define when the AI will engage with the detected airborne enemy targets.
|
||||
The range can be beyond or smaller than the range of the Patrol Zone.
|
||||
The range is applied at the position of the AI.
|
||||
Use the method <a href="AI_CAP.html##(AI_CAP_ZONE).SetEngageRange">AI<em>CAP#AI</em>CAP_ZONE.SetEngageRange</a>() to define that range.</p>
|
||||
|
||||
<h2>1.4) Set the Zone of Engagement</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia12.JPG" alt="Zone"/></p>
|
||||
|
||||
<p>An optional <a href="Zone.html">Zone</a> can be set,
|
||||
that will define when the AI will engage with the detected airborne enemy targets.
|
||||
Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</em>CAP_ZONE.SetEngageZone</a>() to define that Zone.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -500,10 +508,7 @@ Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</
|
||||
<h2><a id="#(AI_Cap)" >Type <code>AI_Cap</code></a></h2>
|
||||
|
||||
<h2><a id="#(AI_CAP_ZONE)" >Type <code>AI_CAP_ZONE</code></a></h2>
|
||||
|
||||
<p>AI<em>CAP</em>ZONE class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -556,20 +561,6 @@ Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_CAP_ZONE).ClassName" >
|
||||
<strong>AI_CAP_ZONE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -79,100 +79,14 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
<p>AI CAS classes makes AI Controllables execute a Close Air Support.</p>
|
||||
|
||||
|
||||
<p>
|
||||
The <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class implements the core functions to provide Close Air Support in an Engage <a href="Zone.html">Zone</a> by an AIR <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.
|
||||
The AI<em>CAS</em>ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia3.JPG" alt="HoldAndEngage"/></p>
|
||||
|
||||
<p>The AI<em>CAS</em>ZONE is assigned a <a href="Group.html">Group</a> and this must be done before the AI<em>CAS</em>ZONE process can be started through the <strong>Start</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia4.JPG" alt="Start Event"/></p>
|
||||
|
||||
<p>Upon started, The AI will <strong>Route</strong> itself towards the random 3D point within a patrol zone,
|
||||
using a random speed within the given altitude and speed limits.
|
||||
Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
|
||||
This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia5.JPG" alt="Route Event"/></p>
|
||||
|
||||
<p>When the AI is commanded to provide Close Air Support (through the event <strong>Engage</strong>), the AI will fly towards the Engage Zone.
|
||||
Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia6.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>The AI will detect the targets and will only destroy the targets within the Engage Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia7.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>Every target that is destroyed, is reported< by the AI.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia8.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone. </p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia9.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>Until it is notified through the event <strong>Accomplish</strong>, which is to be triggered by an observing party:</p>
|
||||
<p>There are the following types of CAS classes defined:</p>
|
||||
|
||||
<ul>
|
||||
<li>a FAC</li>
|
||||
<li>a timed event</li>
|
||||
<li>a menu option selected by a human</li>
|
||||
<li>a condition</li>
|
||||
<li>others ...</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia10.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>When the AI has accomplished the CAS, it will fly back to the Patrol Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia11.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>It will keep patrolling there, until it is notified to RTB or move to another CAS Zone.
|
||||
It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
|
||||
<p>When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia12.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<h1>1.1) AI<em>CAS</em>ZONE constructor</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CAS_ZONE).New">AI<em>CAS</em>ZONE.New</a>(): Creates a new AI<em>CAS</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>CAS</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>CAS</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
<li><strong>Patrolling</strong> ( Group ): The AI is patrolling the Patrol Zone.</li>
|
||||
<li><strong>Engaging</strong> ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.</li>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base..</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>CAS</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Route">AI<em>Patrol#AI</em>PATROL_ZONE.Route</a>**: Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Engage">AI<em>CAS</em>ZONE.Engage</a>**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Abort">AI<em>CAS</em>ZONE.Abort</a>**: Aborts the engagement and return patrolling in the patrol zone.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).RTB">AI<em>Patrol#AI</em>PATROL_ZONE.RTB</a>**: Route the AI to the home base.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detect">AI<em>Patrol#AI</em>PATROL_ZONE.Detect</a>**: The AI is detecting targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detected">AI<em>Patrol#AI</em>PATROL_ZONE.Detected</a>**: The AI has detected new targets.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Destroy">AI<em>CAS</em>ZONE.Destroy</a>**: The AI has destroyed a target <a href="Unit.html">Unit</a>.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Destroyed">AI<em>CAS</em>ZONE.Destroyed</a>**: The AI has destroyed all target <a href="Unit.html">Unit</a>s assigned in the CAS task.</li>
|
||||
<li><strong>Status</strong>: The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
<li><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a>: Perform a CAS in a zone.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
@@ -214,7 +128,9 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CAS_ZONE">AI_CAS_ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -248,12 +164,6 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAS_ZONE).Accomplished">AI_CAS_ZONE.Accomplished</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAS_ZONE).ClassName">AI_CAS_ZONE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -491,6 +401,103 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
|
||||
|
||||
<p>
|
||||
The <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class implements the core functions to provide Close Air Support in an Engage <a href="Zone.html">Zone</a> by an AIR <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.
|
||||
The AI<em>CAS</em>ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia3.JPG" alt="HoldAndEngage"/></p>
|
||||
|
||||
<p>The AI<em>CAS</em>ZONE is assigned a <a href="Group.html">Group</a> and this must be done before the AI<em>CAS</em>ZONE process can be started through the <strong>Start</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia4.JPG" alt="Start Event"/></p>
|
||||
|
||||
<p>Upon started, The AI will <strong>Route</strong> itself towards the random 3D point within a patrol zone,
|
||||
using a random speed within the given altitude and speed limits.
|
||||
Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
|
||||
This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia5.JPG" alt="Route Event"/></p>
|
||||
|
||||
<p>When the AI is commanded to provide Close Air Support (through the event <strong>Engage</strong>), the AI will fly towards the Engage Zone.
|
||||
Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia6.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>The AI will detect the targets and will only destroy the targets within the Engage Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia7.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>Every target that is destroyed, is reported< by the AI.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia8.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone. </p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia9.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>Until it is notified through the event <strong>Accomplish</strong>, which is to be triggered by an observing party:</p>
|
||||
|
||||
<ul>
|
||||
<li>a FAC</li>
|
||||
<li>a timed event</li>
|
||||
<li>a menu option selected by a human</li>
|
||||
<li>a condition</li>
|
||||
<li>others ...</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia10.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>When the AI has accomplished the CAS, it will fly back to the Patrol Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia11.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<p>It will keep patrolling there, until it is notified to RTB or move to another CAS Zone.
|
||||
It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
|
||||
<p>When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia12.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<h1>1.1) AI<em>CAS</em>ZONE constructor</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CAS_ZONE).New">AI<em>CAS</em>ZONE.New</a>(): Creates a new AI<em>CAS</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>CAS</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>CAS</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
<li><strong>Patrolling</strong> ( Group ): The AI is patrolling the Patrol Zone.</li>
|
||||
<li><strong>Engaging</strong> ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.</li>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base..</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>CAS</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Route">AI<em>Patrol#AI</em>PATROL_ZONE.Route</a>**: Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Engage">AI<em>CAS</em>ZONE.Engage</a>**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Abort">AI<em>CAS</em>ZONE.Abort</a>**: Aborts the engagement and return patrolling in the patrol zone.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).RTB">AI<em>Patrol#AI</em>PATROL_ZONE.RTB</a>**: Route the AI to the home base.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detect">AI<em>Patrol#AI</em>PATROL_ZONE.Detect</a>**: The AI is detecting targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detected">AI<em>Patrol#AI</em>PATROL_ZONE.Detected</a>**: The AI has detected new targets.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Destroy">AI<em>CAS</em>ZONE.Destroy</a>**: The AI has destroyed a target <a href="Unit.html">Unit</a>.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Destroyed">AI<em>CAS</em>ZONE.Destroyed</a>**: The AI has destroyed all target <a href="Unit.html">Unit</a>s assigned in the CAS task.</li>
|
||||
<li><strong>Status</strong>: The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -575,20 +582,6 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_CAS_ZONE).ClassName" >
|
||||
<strong>AI_CAS_ZONE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -79,121 +79,16 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
<p>AI PATROL classes makes AI Controllables execute an Patrol.</p>
|
||||
|
||||
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia3.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI<em>PATROL</em>ZONE is assigned a <a href="Group.html">Group</a> and this must be done before the AI<em>PATROL</em>ZONE process can be started using the <strong>Start</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia4.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.
|
||||
Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia5.JPG" alt="Process"/></p>
|
||||
|
||||
<p>This cycle will continue.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia6.JPG" alt="Process"/></p>
|
||||
|
||||
<p>During the patrol, the AI will detect enemy targets, which are reported through the <strong>Detected</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia9.JPG" alt="Process"/></p>
|
||||
|
||||
<p>-- Note that the enemy is not engaged! To model enemy engagement, either tailor the <strong>Detected</strong> event, or
|
||||
use derived AI_ classes to model AI offensive or defensive behaviour.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia10.JPG" alt="Process"/></p>
|
||||
|
||||
<p>Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
|
||||
When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia11.JPG" alt="Process"/></p>
|
||||
|
||||
<h2>1.1) AI<em>PATROL</em>ZONE constructor</h2>
|
||||
<p>There are the following types of PATROL classes defined:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).New">AI<em>PATROL</em>ZONE.New</a>(): Creates a new AI<em>PATROL</em>ZONE object.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>: Perform a PATROL in a zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>PATROL</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>PATROL</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
<li><strong>Patrolling</strong> ( Group ): The AI is patrolling the Patrol Zone.</li>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base.</li>
|
||||
<li><strong>Stopped</strong> ( Group ): The process is stopped.</li>
|
||||
<li><strong>Crashed</strong> ( Group ): The AI has crashed or is dead.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>PATROL</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Start</strong> ( Group ): Start the process.</li>
|
||||
<li><strong>Stop</strong> ( Group ): Stop the process.</li>
|
||||
<li><strong>Route</strong> ( Group ): Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li><strong>RTB</strong> ( Group ): Route the AI to the home base.</li>
|
||||
<li><strong>Detect</strong> ( Group ): The AI is detecting targets.</li>
|
||||
<li><strong>Detected</strong> ( Group ): The AI has detected new targets.</li>
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) Set or Get the AI controllable</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetControllable">AI<em>PATROL</em>ZONE.SetControllable</a>(): Set the AIControllable.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).GetControllable">AI<em>PATROL</em>ZONE.GetControllable</a>(): Get the AIControllable.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) Set the Speed and Altitude boundaries of the AI controllable</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetSpeed">AI<em>PATROL</em>ZONE.SetSpeed</a>(): Set the patrol speed boundaries of the AI, for the next patrol.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetAltitude">AI<em>PATROL</em>ZONE.SetAltitude</a>(): Set altitude boundaries of the AI, for the next patrol.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) Manage the detection process of the AI controllable</h2>
|
||||
|
||||
<p>The detection process of the AI controllable can be manipulated.
|
||||
Detection requires an amount of CPU power, which has an impact on your mission performance.
|
||||
Only put detection on when absolutely necessary, and the frequency of the detection can also be set.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetDetectionOn">AI<em>PATROL</em>ZONE.SetDetectionOn</a>(): Set the detection on. The AI will detect for targets.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetDetectionOff">AI<em>PATROL</em>ZONE.SetDetectionOff</a>(): Set the detection off, the AI will not detect for targets. The existing target list will NOT be erased.</li>
|
||||
</ul>
|
||||
|
||||
<p>The detection frequency can be set with <a href="##(AI_PATROL_ZONE).SetDetectionInterval">AI<em>PATROL</em>ZONE.SetDetectionInterval</a>( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).GetDetectedUnits">AI<em>PATROL</em>ZONE.GetDetectedUnits</a>() to obtain a list of the <a href="Unit.html">Unit</a>s detected by the AI.</p>
|
||||
|
||||
<p>The detection can be filtered to potential targets in a specific zone.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).SetDetectionZone">AI<em>PATROL</em>ZONE.SetDetectionZone</a>() to set the zone where targets need to be detected.
|
||||
Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected
|
||||
according the weather conditions.</p>
|
||||
|
||||
<h2>1.6) Manage the "out of fuel" in the AI<em>PATROL</em>ZONE</h2>
|
||||
|
||||
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
|
||||
Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
|
||||
When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit,
|
||||
while a new AI is targetted to the AI<em>PATROL</em>ZONE.
|
||||
Once the time is finished, the old AI will return to the base.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).ManageFuel">AI<em>PATROL</em>ZONE.ManageFuel</a>() to have this proces in place.</p>
|
||||
|
||||
<h2>1.7) Manage "damage" behaviour of the AI in the AI<em>PATROL</em>ZONE</h2>
|
||||
|
||||
<p>When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on.
|
||||
Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB).
|
||||
Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.ManageDamage</a>() to have this proces in place.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>OPEN ISSUES</strong></h1>
|
||||
@@ -247,7 +142,9 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_PATROL_ZONE">AI_PATROL_ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -263,12 +160,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).CheckStatus">AI_PATROL_ZONE.CheckStatus</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).ClassName">AI_PATROL_ZONE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -746,6 +637,122 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
|
||||
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia3.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI<em>PATROL</em>ZONE is assigned a <a href="Group.html">Group</a> and this must be done before the AI<em>PATROL</em>ZONE process can be started using the <strong>Start</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia4.JPG" alt="Process"/></p>
|
||||
|
||||
<p>The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.
|
||||
Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia5.JPG" alt="Process"/></p>
|
||||
|
||||
<p>This cycle will continue.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia6.JPG" alt="Process"/></p>
|
||||
|
||||
<p>During the patrol, the AI will detect enemy targets, which are reported through the <strong>Detected</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia9.JPG" alt="Process"/></p>
|
||||
|
||||
<p>-- Note that the enemy is not engaged! To model enemy engagement, either tailor the <strong>Detected</strong> event, or
|
||||
use derived AI_ classes to model AI offensive or defensive behaviour.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia10.JPG" alt="Process"/></p>
|
||||
|
||||
<p>Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
|
||||
When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia11.JPG" alt="Process"/></p>
|
||||
|
||||
<h2>1.1) AI<em>PATROL</em>ZONE constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).New">AI<em>PATROL</em>ZONE.New</a>(): Creates a new AI<em>PATROL</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>PATROL</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>PATROL</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
<li><strong>Patrolling</strong> ( Group ): The AI is patrolling the Patrol Zone.</li>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base.</li>
|
||||
<li><strong>Stopped</strong> ( Group ): The process is stopped.</li>
|
||||
<li><strong>Crashed</strong> ( Group ): The AI has crashed or is dead.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>PATROL</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Start</strong> ( Group ): Start the process.</li>
|
||||
<li><strong>Stop</strong> ( Group ): Stop the process.</li>
|
||||
<li><strong>Route</strong> ( Group ): Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li><strong>RTB</strong> ( Group ): Route the AI to the home base.</li>
|
||||
<li><strong>Detect</strong> ( Group ): The AI is detecting targets.</li>
|
||||
<li><strong>Detected</strong> ( Group ): The AI has detected new targets.</li>
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) Set or Get the AI controllable</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetControllable">AI<em>PATROL</em>ZONE.SetControllable</a>(): Set the AIControllable.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).GetControllable">AI<em>PATROL</em>ZONE.GetControllable</a>(): Get the AIControllable.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) Set the Speed and Altitude boundaries of the AI controllable</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetSpeed">AI<em>PATROL</em>ZONE.SetSpeed</a>(): Set the patrol speed boundaries of the AI, for the next patrol.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetAltitude">AI<em>PATROL</em>ZONE.SetAltitude</a>(): Set altitude boundaries of the AI, for the next patrol.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) Manage the detection process of the AI controllable</h2>
|
||||
|
||||
<p>The detection process of the AI controllable can be manipulated.
|
||||
Detection requires an amount of CPU power, which has an impact on your mission performance.
|
||||
Only put detection on when absolutely necessary, and the frequency of the detection can also be set.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetDetectionOn">AI<em>PATROL</em>ZONE.SetDetectionOn</a>(): Set the detection on. The AI will detect for targets.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetDetectionOff">AI<em>PATROL</em>ZONE.SetDetectionOff</a>(): Set the detection off, the AI will not detect for targets. The existing target list will NOT be erased.</li>
|
||||
</ul>
|
||||
|
||||
<p>The detection frequency can be set with <a href="##(AI_PATROL_ZONE).SetDetectionInterval">AI<em>PATROL</em>ZONE.SetDetectionInterval</a>( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).GetDetectedUnits">AI<em>PATROL</em>ZONE.GetDetectedUnits</a>() to obtain a list of the <a href="Unit.html">Unit</a>s detected by the AI.</p>
|
||||
|
||||
<p>The detection can be filtered to potential targets in a specific zone.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).SetDetectionZone">AI<em>PATROL</em>ZONE.SetDetectionZone</a>() to set the zone where targets need to be detected.
|
||||
Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected
|
||||
according the weather conditions.</p>
|
||||
|
||||
<h2>1.6) Manage the "out of fuel" in the AI<em>PATROL</em>ZONE</h2>
|
||||
|
||||
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
|
||||
Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
|
||||
When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit,
|
||||
while a new AI is targetted to the AI<em>PATROL</em>ZONE.
|
||||
Once the time is finished, the old AI will return to the base.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).ManageFuel">AI<em>PATROL</em>ZONE.ManageFuel</a>() to have this proces in place.</p>
|
||||
|
||||
<h2>1.7) Manage "damage" behaviour of the AI in the AI<em>PATROL</em>ZONE</h2>
|
||||
|
||||
<p>When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on.
|
||||
Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB).
|
||||
Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.ManageDamage</a>() to have this proces in place.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -783,20 +790,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_PATROL_ZONE).ClassName" >
|
||||
<strong>AI_PATROL_ZONE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -82,187 +82,7 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(BASE)">#BASE</a> class</h1>
|
||||
|
||||
<p>All classes within the MOOSE framework are derived from the <a href="##(BASE)">#BASE</a> class. </p>
|
||||
|
||||
<p>BASE provides facilities for :</p>
|
||||
|
||||
<ul>
|
||||
<li>The construction and inheritance of MOOSE classes.</li>
|
||||
<li>The class naming and numbering system.</li>
|
||||
<li>The class hierarchy search system.</li>
|
||||
<li>The tracing of information or objects during mission execution for debuggin purposes.</li>
|
||||
<li>The subscription to DCS events for event handling in MOOSE objects.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note: The BASE class is an abstract class and is not meant to be used directly.</p>
|
||||
|
||||
<h2>1.1) BASE constructor</h2>
|
||||
|
||||
<p>Any class derived from BASE, will use the <a href="Base.html##(BASE).New">Base#BASE.New</a> constructor embedded in the <a href="Base.html##(BASE).Inherit">Base#BASE.Inherit</a> method.
|
||||
See an example at the <a href="Base.html##(BASE).New">Base#BASE.New</a> method how this is done.</p>
|
||||
|
||||
<h2>1.2) Trace information for debugging</h2>
|
||||
|
||||
<p>The BASE class contains trace methods to trace progress within a mission execution of a certain object.
|
||||
These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.</p>
|
||||
|
||||
<p>Any type of information can be passed to these tracing methods. See the following examples:</p>
|
||||
|
||||
<pre><code>self:E( "Hello" )
|
||||
</code></pre>
|
||||
|
||||
<p>Result in the word "Hello" in the dcs.log.</p>
|
||||
|
||||
<pre><code>local Array = { 1, nil, "h", { "a","b" }, "x" }
|
||||
self:E( Array )
|
||||
</code></pre>
|
||||
|
||||
<p>Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log. </p>
|
||||
|
||||
<pre><code>local Object1 = "Object1"
|
||||
local Object2 = 3
|
||||
local Object3 = { Object 1, Object 2 }
|
||||
self:E( { Object1, Object2, Object3 } )
|
||||
</code></pre>
|
||||
|
||||
<p>Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.</p>
|
||||
|
||||
<pre><code>local SpawnObject = SPAWN:New( "Plane" )
|
||||
local GroupObject = GROUP:FindByName( "Group" )
|
||||
self:E( { Spawn = SpawnObject, Group = GroupObject } )
|
||||
</code></pre>
|
||||
|
||||
<p>Results with the text [1]={Spawn={....),Group={...}} in the dcs.log. </p>
|
||||
|
||||
<p>Below a more detailed explanation of the different method types for tracing.</p>
|
||||
|
||||
<h3>1.2.1) Tracing methods categories</h3>
|
||||
|
||||
<p>There are basically 3 types of tracing methods available:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F">BASE.F</a>: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.</li>
|
||||
<li><a href="##(BASE).T">BASE.T</a>: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.</li>
|
||||
<li><a href="##(BASE).E">BASE.E</a>: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) Tracing levels</h3>
|
||||
|
||||
<p>There are 3 tracing levels within MOOSE. <br/>
|
||||
These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.</p>
|
||||
|
||||
<p>As such, the F and T methods have additional variants to trace level 2 and 3 respectively:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F2">BASE.F2</a>: Trace the beginning of a function and its given parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).F3">BASE.F3</a>: Trace the beginning of a function and its given parameters with tracing level 3.</li>
|
||||
<li><a href="##(BASE).T2">BASE.T2</a>: Trace further logic within a function giving optional variables or parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).T3">BASE.T3</a>: Trace further logic within a function giving optional variables or parameters with tracing level 3.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.3) Trace activation.</h3>
|
||||
|
||||
<p>Tracing can be activated in several ways:</p>
|
||||
|
||||
<ul>
|
||||
<li>Switch tracing on or off through the <a href="##(BASE).TraceOnOff">BASE.TraceOnOff</a>() method.</li>
|
||||
<li>Activate all tracing through the <a href="##(BASE).TraceAll">BASE.TraceAll</a>() method.</li>
|
||||
<li>Activate only the tracing of a certain class (name) through the <a href="##(BASE).TraceClass">BASE.TraceClass</a>() method.</li>
|
||||
<li>Activate only the tracing of a certain method of a certain class through the <a href="##(BASE).TraceClassMethod">BASE.TraceClassMethod</a>() method.</li>
|
||||
<li>Activate only the tracing of a certain level through the <a href="##(BASE).TraceLevel">BASE.TraceLevel</a>() method.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.4) Check if tracing is on.</h3>
|
||||
|
||||
<p>The method <a href="##(BASE).IsTrace">BASE.IsTrace</a>() will validate if tracing is activated or not.</p>
|
||||
|
||||
<h2>1.3 DCS simulator Event Handling</h2>
|
||||
|
||||
<p>The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator,
|
||||
and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.</p>
|
||||
|
||||
<h3>1.3.1 Subscribe / Unsubscribe to DCS Events</h3>
|
||||
|
||||
<p>At first, the mission designer will need to <strong>Subscribe</strong> to a specific DCS event for the class.
|
||||
So, when the DCS event occurs, the class will be notified of that event.
|
||||
There are two methods which you use to subscribe to or unsubscribe from an event.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).HandleEvent">BASE.HandleEvent</a>(): Subscribe to a DCS Event.</li>
|
||||
<li><a href="##(BASE).UnHandleEvent">BASE.UnHandleEvent</a>(): Unsubscribe from a DCS Event.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.3.2 Event Handling of DCS Events</h3>
|
||||
|
||||
<p>Once the class is subscribed to the event, an <strong>Event Handling</strong> method on the object or class needs to be written that will be called
|
||||
when the DCS event occurs. The Event Handling method receives an <a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> structure, which contains a lot of information
|
||||
about the event that occurred.</p>
|
||||
|
||||
<p>Find below an example of the prototype how to write an event handling function for two units: </p>
|
||||
|
||||
<pre><code> local Tank1 = UNIT:FindByName( "Tank A" )
|
||||
local Tank2 = UNIT:FindByName( "Tank B" )
|
||||
|
||||
-- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
|
||||
Tank1:HandleEvent( EVENTS.Dead )
|
||||
Tank2:HandleEvent( EVENTS.Dead )
|
||||
|
||||
--- This function is an Event Handling function that will be called when Tank1 is Dead.
|
||||
-- @param Wrapper.Unit#UNIT self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function Tank1:OnEventDead( EventData )
|
||||
|
||||
self:SmokeGreen()
|
||||
end
|
||||
|
||||
--- This function is an Event Handling function that will be called when Tank2 is Dead.
|
||||
-- @param Wrapper.Unit#UNIT self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function Tank2:OnEventDead( EventData )
|
||||
|
||||
self:SmokeBlue()
|
||||
end
|
||||
</code></pre>
|
||||
|
||||
|
||||
|
||||
<p>See the <a href="Event.html">Event</a> module for more information about event handling.</p>
|
||||
|
||||
<h2>1.4) Class identification methods</h2>
|
||||
|
||||
<p>BASE provides methods to get more information of each object:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).GetClassID">BASE.GetClassID</a>(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.</li>
|
||||
<li><a href="##(BASE).GetClassName">BASE.GetClassName</a>(): Gets the name of the object, which is the name of the class the object was instantiated from.</li>
|
||||
<li><a href="##(BASE).GetClassNameAndID">BASE.GetClassNameAndID</a>(): Gets the name and ID of the object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) All objects derived from BASE can have "States"</h2>
|
||||
|
||||
<p>A mechanism is in place in MOOSE, that allows to let the objects administer <strong>states</strong>. <br/>
|
||||
States are essentially properties of objects, which are identified by a <strong>Key</strong> and a <strong>Value</strong>. </p>
|
||||
|
||||
<p>The method <a href="##(BASE).SetState">BASE.SetState</a>() can be used to set a Value with a reference Key to the object. <br/>
|
||||
To <strong>read or retrieve</strong> a state Value based on a Key, use the <a href="##(BASE).GetState">BASE.GetState</a> method. </p>
|
||||
|
||||
<p>These two methods provide a very handy way to keep state at long lasting processes.
|
||||
Values can be stored within the objects, and later retrieved or changed when needed.
|
||||
There is one other important thing to note, the <a href="##(BASE).SetState">BASE.SetState</a>() and <a href="##(BASE).GetState">BASE.GetState</a> methods
|
||||
receive as the <strong>first parameter the object for which the state needs to be set</strong>.
|
||||
Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same
|
||||
object name to the method.</p>
|
||||
|
||||
<h2>1.10) Inheritance</h2>
|
||||
|
||||
<p>The following methods are available to implement inheritance</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).Inherit">BASE.Inherit</a>: Inherits from a class.</li>
|
||||
<li><a href="##(BASE).GetParent">BASE.GetParent</a>: Returns the parent object from the object it is handling, or nil if there is no parent object.</li>
|
||||
</ul>
|
||||
<p>The <a href="##(BASE)">#BASE</a> class is the core root class from where every other class in moose is derived.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
@@ -302,7 +122,9 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#BASE">BASE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) #BASE class</h1>
|
||||
|
||||
<p>All classes within the MOOSE framework are derived from the BASE class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -366,12 +188,6 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).EventRemoveAll">BASE:EventRemoveAll()</a></td>
|
||||
<td class="summary">
|
||||
<p>Remove all subscribed events</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).Events">BASE.Events</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -591,12 +407,6 @@ place: Object that the unit landed on.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).SetState">BASE:SetState(Object, Key, Value)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set a state or property of the Object given a Key and a Value.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).States">BASE.States</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -665,12 +475,6 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE)._F">BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</a></td>
|
||||
<td class="summary">
|
||||
<p>Trace a function call.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE)._Private">BASE._Private</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -714,6 +518,191 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) #BASE class</h1>
|
||||
|
||||
<p>All classes within the MOOSE framework are derived from the BASE class.</p>
|
||||
|
||||
|
||||
<p>
|
||||
BASE provides facilities for :</p>
|
||||
|
||||
<ul>
|
||||
<li>The construction and inheritance of MOOSE classes.</li>
|
||||
<li>The class naming and numbering system.</li>
|
||||
<li>The class hierarchy search system.</li>
|
||||
<li>The tracing of information or objects during mission execution for debuggin purposes.</li>
|
||||
<li>The subscription to DCS events for event handling in MOOSE objects.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note: The BASE class is an abstract class and is not meant to be used directly.</p>
|
||||
|
||||
<h2>1.1) BASE constructor</h2>
|
||||
|
||||
<p>Any class derived from BASE, will use the <a href="Base.html##(BASE).New">Base#BASE.New</a> constructor embedded in the <a href="Base.html##(BASE).Inherit">Base#BASE.Inherit</a> method.
|
||||
See an example at the <a href="Base.html##(BASE).New">Base#BASE.New</a> method how this is done.</p>
|
||||
|
||||
<h2>1.2) Trace information for debugging</h2>
|
||||
|
||||
<p>The BASE class contains trace methods to trace progress within a mission execution of a certain object.
|
||||
These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.</p>
|
||||
|
||||
<p>Any type of information can be passed to these tracing methods. See the following examples:</p>
|
||||
|
||||
<pre><code>self:E( "Hello" )
|
||||
</code></pre>
|
||||
|
||||
<p>Result in the word "Hello" in the dcs.log.</p>
|
||||
|
||||
<pre><code>local Array = { 1, nil, "h", { "a","b" }, "x" }
|
||||
self:E( Array )
|
||||
</code></pre>
|
||||
|
||||
<p>Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log. </p>
|
||||
|
||||
<pre><code>local Object1 = "Object1"
|
||||
local Object2 = 3
|
||||
local Object3 = { Object 1, Object 2 }
|
||||
self:E( { Object1, Object2, Object3 } )
|
||||
</code></pre>
|
||||
|
||||
<p>Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.</p>
|
||||
|
||||
<pre><code>local SpawnObject = SPAWN:New( "Plane" )
|
||||
local GroupObject = GROUP:FindByName( "Group" )
|
||||
self:E( { Spawn = SpawnObject, Group = GroupObject } )
|
||||
</code></pre>
|
||||
|
||||
<p>Results with the text [1]={Spawn={....),Group={...}} in the dcs.log. </p>
|
||||
|
||||
<p>Below a more detailed explanation of the different method types for tracing.</p>
|
||||
|
||||
<h3>1.2.1) Tracing methods categories</h3>
|
||||
|
||||
<p>There are basically 3 types of tracing methods available:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F">BASE.F</a>: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.</li>
|
||||
<li><a href="##(BASE).T">BASE.T</a>: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.</li>
|
||||
<li><a href="##(BASE).E">BASE.E</a>: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) Tracing levels</h3>
|
||||
|
||||
<p>There are 3 tracing levels within MOOSE. <br/>
|
||||
These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.</p>
|
||||
|
||||
<p>As such, the F and T methods have additional variants to trace level 2 and 3 respectively:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F2">BASE.F2</a>: Trace the beginning of a function and its given parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).F3">BASE.F3</a>: Trace the beginning of a function and its given parameters with tracing level 3.</li>
|
||||
<li><a href="##(BASE).T2">BASE.T2</a>: Trace further logic within a function giving optional variables or parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).T3">BASE.T3</a>: Trace further logic within a function giving optional variables or parameters with tracing level 3.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.3) Trace activation.</h3>
|
||||
|
||||
<p>Tracing can be activated in several ways:</p>
|
||||
|
||||
<ul>
|
||||
<li>Switch tracing on or off through the <a href="##(BASE).TraceOnOff">BASE.TraceOnOff</a>() method.</li>
|
||||
<li>Activate all tracing through the <a href="##(BASE).TraceAll">BASE.TraceAll</a>() method.</li>
|
||||
<li>Activate only the tracing of a certain class (name) through the <a href="##(BASE).TraceClass">BASE.TraceClass</a>() method.</li>
|
||||
<li>Activate only the tracing of a certain method of a certain class through the <a href="##(BASE).TraceClassMethod">BASE.TraceClassMethod</a>() method.</li>
|
||||
<li>Activate only the tracing of a certain level through the <a href="##(BASE).TraceLevel">BASE.TraceLevel</a>() method.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.4) Check if tracing is on.</h3>
|
||||
|
||||
<p>The method <a href="##(BASE).IsTrace">BASE.IsTrace</a>() will validate if tracing is activated or not.</p>
|
||||
|
||||
<h2>1.3 DCS simulator Event Handling</h2>
|
||||
|
||||
<p>The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator,
|
||||
and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.</p>
|
||||
|
||||
<h3>1.3.1 Subscribe / Unsubscribe to DCS Events</h3>
|
||||
|
||||
<p>At first, the mission designer will need to <strong>Subscribe</strong> to a specific DCS event for the class.
|
||||
So, when the DCS event occurs, the class will be notified of that event.
|
||||
There are two methods which you use to subscribe to or unsubscribe from an event.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).HandleEvent">BASE.HandleEvent</a>(): Subscribe to a DCS Event.</li>
|
||||
<li><a href="##(BASE).UnHandleEvent">BASE.UnHandleEvent</a>(): Unsubscribe from a DCS Event.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.3.2 Event Handling of DCS Events</h3>
|
||||
|
||||
<p>Once the class is subscribed to the event, an <strong>Event Handling</strong> method on the object or class needs to be written that will be called
|
||||
when the DCS event occurs. The Event Handling method receives an <a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> structure, which contains a lot of information
|
||||
about the event that occurred.</p>
|
||||
|
||||
<p>Find below an example of the prototype how to write an event handling function for two units: </p>
|
||||
|
||||
<pre><code> local Tank1 = UNIT:FindByName( "Tank A" )
|
||||
local Tank2 = UNIT:FindByName( "Tank B" )
|
||||
|
||||
-- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
|
||||
Tank1:HandleEvent( EVENTS.Dead )
|
||||
Tank2:HandleEvent( EVENTS.Dead )
|
||||
|
||||
--- This function is an Event Handling function that will be called when Tank1 is Dead.
|
||||
-- @param Wrapper.Unit#UNIT self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function Tank1:OnEventDead( EventData )
|
||||
|
||||
self:SmokeGreen()
|
||||
end
|
||||
|
||||
--- This function is an Event Handling function that will be called when Tank2 is Dead.
|
||||
-- @param Wrapper.Unit#UNIT self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function Tank2:OnEventDead( EventData )
|
||||
|
||||
self:SmokeBlue()
|
||||
end
|
||||
</code></pre>
|
||||
|
||||
|
||||
|
||||
<p>See the <a href="Event.html">Event</a> module for more information about event handling.</p>
|
||||
|
||||
<h2>1.4) Class identification methods</h2>
|
||||
|
||||
<p>BASE provides methods to get more information of each object:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).GetClassID">BASE.GetClassID</a>(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.</li>
|
||||
<li><a href="##(BASE).GetClassName">BASE.GetClassName</a>(): Gets the name of the object, which is the name of the class the object was instantiated from.</li>
|
||||
<li><a href="##(BASE).GetClassNameAndID">BASE.GetClassNameAndID</a>(): Gets the name and ID of the object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) All objects derived from BASE can have "States"</h2>
|
||||
|
||||
<p>A mechanism is in place in MOOSE, that allows to let the objects administer <strong>states</strong>. <br/>
|
||||
States are essentially properties of objects, which are identified by a <strong>Key</strong> and a <strong>Value</strong>. </p>
|
||||
|
||||
<p>The method <a href="##(BASE).SetState">BASE.SetState</a>() can be used to set a Value with a reference Key to the object. <br/>
|
||||
To <strong>read or retrieve</strong> a state Value based on a Key, use the <a href="##(BASE).GetState">BASE.GetState</a> method. </p>
|
||||
|
||||
<p>These two methods provide a very handy way to keep state at long lasting processes.
|
||||
Values can be stored within the objects, and later retrieved or changed when needed.
|
||||
There is one other important thing to note, the <a href="##(BASE).SetState">BASE.SetState</a>() and <a href="##(BASE).GetState">BASE.GetState</a> methods
|
||||
receive as the <strong>first parameter the object for which the state needs to be set</strong>.
|
||||
Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same
|
||||
object name to the method.</p>
|
||||
|
||||
<h2>1.10) Inheritance</h2>
|
||||
|
||||
<p>The following methods are available to implement inheritance</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).Inherit">BASE.Inherit</a>: Inherits from a class.</li>
|
||||
<li><a href="##(BASE).GetParent">BASE.GetParent</a>: Returns the parent object from the object it is handling, or nil if there is no parent object.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -735,10 +724,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
|
||||
<h2><a id="#(Base)" >Type <code>Base</code></a></h2>
|
||||
|
||||
<h2><a id="#(BASE)" >Type <code>BASE</code></a></h2>
|
||||
|
||||
<p>The BASE Class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -935,20 +921,6 @@ A #table or any field.</p>
|
||||
<p><em><a href="##(BASE)">#BASE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(BASE).Events" >
|
||||
<strong>BASE.Events</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1902,20 +1874,6 @@ The Key was not found and thus the Value could not be retrieved.</p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(BASE).States" >
|
||||
<strong>BASE.States</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2190,20 +2148,6 @@ A #table or any field.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(BASE)._Private" >
|
||||
<strong>BASE._Private</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -2112,6 +2112,7 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemCount" >
|
||||
<strong>DETECTION_BASE.DetectedItemCount</strong>
|
||||
</a>
|
||||
@@ -2125,6 +2126,7 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemMax" >
|
||||
<strong>DETECTION_BASE.DetectedItemMax</strong>
|
||||
</a>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1859,9 +1859,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2332,9 +2329,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2370,7 +2364,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||
</a>
|
||||
@@ -2387,7 +2381,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
@@ -2705,7 +2699,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>
|
||||
@@ -2729,7 +2723,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>
|
||||
|
||||
@@ -102,148 +102,16 @@
|
||||
<p>Each of these ZONE classes have a zone name, and specific parameters defining the zone type:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>: The ZONE_BASE class defining the base for all other zone classes.</li>
|
||||
<li><a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a>: The ZONE_RADIUS class defined by a zone name, a location and a radius.</li>
|
||||
<li><a href="Zone.html##(ZONE)">Zone#ZONE</a>: The ZONE class, defined by the zone name as defined within the Mission Editor.</li>
|
||||
<li><a href="Zone.html##(ZONE_UNIT)">Zone#ZONE_UNIT</a>: The ZONE_UNIT class defines by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</li>
|
||||
<li><a href="Zone.html##(ZONE_GROUP)">Zone#ZONE_GROUP</a>: The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius.</li>
|
||||
<li><a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a>: The ZONE_POLYGON class defines by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</li>
|
||||
<li><a href="##(ZONE_BASE)">#ZONE_BASE</a>: The ZONE_BASE class defining the base for all other zone classes.</li>
|
||||
<li><a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a>: The ZONE_RADIUS class defined by a zone name, a location and a radius.</li>
|
||||
<li><a href="##(ZONE)">#ZONE</a>: The ZONE class, defined by the zone name as defined within the Mission Editor.</li>
|
||||
<li><a href="##(ZONE_UNIT)">#ZONE_UNIT</a>: The ZONE_UNIT class defines by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</li>
|
||||
<li><a href="##(ZONE_GROUP)">#ZONE_GROUP</a>: The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius.</li>
|
||||
<li><a href="##(ZONE_POLYGON)">#ZONE_POLYGON</a>: The ZONE_POLYGON class defines by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
|
||||
<h2>1.1) Each zone has a name:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetName">ZONE_BASE.GetName</a>(): Returns the name of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).IsVec2InZone">ZONE_BASE.IsVec2InZone</a>(): Returns if a Vec2 is within the zone.</li>
|
||||
<li><a href="##(ZONE_BASE).IsVec3InZone">ZONE_BASE.IsVec3InZone</a>(): Returns if a Vec3 is within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) A zone has a probability factor that can be set to randomize a selection between zones:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).SetRandomizeProbability">ZONE_BASE.SetRandomizeProbability</a>(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
|
||||
<li><a href="##(ZONE_BASE).GetRandomizeProbability">ZONE_BASE.GetRandomizeProbability</a>(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
|
||||
<li><a href="##(ZONE_BASE).GetZoneMaybe">ZONE_BASE.GetZoneMaybe</a>(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) A zone manages Vectors:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetVec2">ZONE_BASE.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> coordinate of the zone.</li>
|
||||
<li><a href="##(ZONE_BASE).GetRandomVec2">ZONE_BASE.GetRandomVec2</a>(): Define a random <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) A zone has a bounding square:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetBoundingSquare">ZONE_BASE.GetBoundingSquare</a>(): Get the outer most bounding square of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.6) A zone can be marked:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).SmokeZone">ZONE_BASE.SmokeZone</a>(): Smokes the zone boundaries in a color.</li>
|
||||
<li><a href="##(ZONE_BASE).FlareZone">ZONE_BASE.FlareZone</a>(): Flares the zone boundaries in a color.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE<em>RADIUS class defined by a zone name, a location and a radius.
|
||||
This class implements the inherited functions from Core.Zone#ZONE</em>BASE taking into account the own zone format and properties.</p>
|
||||
|
||||
<h2>2.1) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).New">ZONE_RADIUS.New</a>(): Constructor.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.2) Manage the radius of the zone</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).SetRadius">ZONE_RADIUS.SetRadius</a>(): Sets the radius of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRadius">ZONE_RADIUS.GetRadius</a>(): Returns the radius of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.3) Manage the location of the zone</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).SetVec2">ZONE_RADIUS.SetVec2</a>(): Sets the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetVec2">ZONE_RADIUS.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetVec3">ZONE_RADIUS.GetVec3</a>(): Returns the <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> of the zone, taking an additional height parameter.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.4) Zone point randomization</h2>
|
||||
|
||||
<p>Various functions exist to find random points within the zone.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomVec2">ZONE_RADIUS.GetRandomVec2</a>(): Gets a random 2D point in the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomPointVec2">ZONE_RADIUS.GetRandomPointVec2</a>(): Gets a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> object representing a random 2D point in the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomPointVec3">ZONE_RADIUS.GetRandomPointVec3</a>(): Gets a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> object representing a random 3D point in the zone. Note that the height of the point is at landheight.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>3) <a href="Zone.html##(ZONE)">Zone#ZONE</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.
|
||||
This class implements the inherited functions from {Core.Zone#ZONE_RADIUS} taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>4) <a href="Zone.html##(ZONE_UNIT)">Zone#ZONE_UNIT</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.
|
||||
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>5) <a href="Zone.html##(ZONE_GROUP)">Zone#ZONE_GROUP</a> class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius. The current leader of the group defines the center of the zone.
|
||||
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>6) <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE<em>POLYGON</em>BASE class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.
|
||||
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.
|
||||
This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
|
||||
<h2>6.1) Zone point randomization</h2>
|
||||
|
||||
<p>Various functions exist to find random points within the zone.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomVec2">ZONE<em>POLYGON</em>BASE.GetRandomVec2</a>(): Gets a random 2D point in the zone.</li>
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomPointVec2">ZONE<em>POLYGON</em>BASE.GetRandomPointVec2</a>(): Return a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> object representing a random 2D point within the zone.</li>
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomPointVec3">ZONE<em>POLYGON</em>BASE.GetRandomPointVec3</a>(): Return a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> object representing a random 3D point at landheight within the zone.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>7) <a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a> class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
|
||||
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.
|
||||
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
@@ -286,55 +154,63 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE">ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>3) ZONE class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_BASE">ZONE_BASE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) ZONE_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_GROUP">ZONE_GROUP</a></td>
|
||||
<td class="summary">
|
||||
<h1>5) #ZONE_GROUP class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_POLYGON">ZONE_POLYGON</a></td>
|
||||
<td class="summary">
|
||||
<h1>7) ZONE_POLYGON class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
|
||||
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_POLYGON_BASE">ZONE_POLYGON_BASE</a></td>
|
||||
<td class="summary">
|
||||
<h1>6) ZONE<em>POLYGON</em>BASE class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE<em>POLYGON</em>BASE class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_RADIUS">ZONE_RADIUS</a></td>
|
||||
<td class="summary">
|
||||
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE_RADIUS class defined by a zone name, a location and a radius.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_UNIT">ZONE_UNIT</a></td>
|
||||
<td class="summary">
|
||||
<h1>4) #ZONE_UNIT class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(ZONE)">Type <code>ZONE</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE).ClassName">ZONE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE).New">ZONE:New(ZoneName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Constructor of ZONE, taking the zone name.</p>
|
||||
@@ -348,12 +224,6 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).BoundZone">ZONE_BASE:BoundZone()</a></td>
|
||||
<td class="summary">
|
||||
<p>Bound the zone boundaries with a tires.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).ClassName">ZONE_BASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -497,12 +367,6 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<h2><a id="#(ZONE_GROUP)">Type <code>ZONE_GROUP</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_GROUP).ClassName">ZONE_GROUP.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_GROUP).GetRandomVec2">ZONE_GROUP:GetRandomVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns a random location within the zone of the <a href="Group.html">Group</a>.</p>
|
||||
@@ -531,12 +395,6 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<h2><a id="#(ZONE_POLYGON)">Type <code>ZONE_POLYGON</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_POLYGON).ClassName">ZONE_POLYGON.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_POLYGON).New">ZONE_POLYGON:New(ZoneName, ZoneGroup)</a></td>
|
||||
<td class="summary">
|
||||
<p>Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the <a href="Group.html##(GROUP)">Group#GROUP</a> defined within the Mission Editor.</p>
|
||||
@@ -550,12 +408,6 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_POLYGON_BASE).BoundZone">ZONE_POLYGON_BASE:BoundZone(UnBound)</a></td>
|
||||
<td class="summary">
|
||||
<p>Smokes the zone boundaries in a color.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_POLYGON_BASE).ClassName">ZONE_POLYGON_BASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -620,12 +472,6 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).BoundZone">ZONE_RADIUS:BoundZone(Points, UnBound, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Bounds the zone with tires.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).ClassName">ZONE_RADIUS.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -723,12 +569,6 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<h2><a id="#(ZONE_UNIT)">Type <code>ZONE_UNIT</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_UNIT).ClassName">ZONE_UNIT.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_UNIT).GetRandomVec2">ZONE_UNIT:GetRandomVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns a random location within the zone.</p>
|
||||
@@ -777,6 +617,14 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>3) ZONE class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -791,7 +639,54 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) ZONE_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
|
||||
|
||||
|
||||
<h2>1.1) Each zone has a name:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetName">ZONE_BASE.GetName</a>(): Returns the name of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).IsVec2InZone">ZONE_BASE.IsVec2InZone</a>(): Returns if a Vec2 is within the zone.</li>
|
||||
<li><a href="##(ZONE_BASE).IsVec3InZone">ZONE_BASE.IsVec3InZone</a>(): Returns if a Vec3 is within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) A zone has a probability factor that can be set to randomize a selection between zones:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).SetRandomizeProbability">ZONE_BASE.SetRandomizeProbability</a>(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
|
||||
<li><a href="##(ZONE_BASE).GetRandomizeProbability">ZONE_BASE.GetRandomizeProbability</a>(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
|
||||
<li><a href="##(ZONE_BASE).GetZoneMaybe">ZONE_BASE.GetZoneMaybe</a>(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) A zone manages Vectors:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetVec2">ZONE_BASE.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> coordinate of the zone.</li>
|
||||
<li><a href="##(ZONE_BASE).GetRandomVec2">ZONE_BASE.GetRandomVec2</a>(): Define a random <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) A zone has a bounding square:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetBoundingSquare">ZONE_BASE.GetBoundingSquare</a>(): Get the outer most bounding square of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.6) A zone can be marked:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).SmokeZone">ZONE_BASE.SmokeZone</a>(): Smokes the zone boundaries in a color.</li>
|
||||
<li><a href="##(ZONE_BASE).FlareZone">ZONE_BASE.FlareZone</a>(): Flares the zone boundaries in a color.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -805,6 +700,15 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>5) #ZONE_GROUP class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius.</p>
|
||||
|
||||
|
||||
<p>The current leader of the group defines the center of the zone.
|
||||
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -819,6 +723,14 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>7) ZONE_POLYGON class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
|
||||
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -833,6 +745,25 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>6) ZONE<em>POLYGON</em>BASE class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE<em>POLYGON</em>BASE class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.
|
||||
This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
|
||||
<h2>6.1) Zone point randomization</h2>
|
||||
|
||||
<p>Various functions exist to find random points within the zone.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomVec2">ZONE<em>POLYGON</em>BASE.GetRandomVec2</a>(): Gets a random 2D point in the zone.</li>
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomPointVec2">ZONE<em>POLYGON</em>BASE.GetRandomPointVec2</a>(): Return a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> object representing a random 2D point within the zone.</li>
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomPointVec3">ZONE<em>POLYGON</em>BASE.GetRandomPointVec3</a>(): Return a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> object representing a random 3D point at landheight within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -847,6 +778,45 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE_RADIUS class defined by a zone name, a location and a radius.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from Core.Zone#ZONE_BASE taking into account the own zone format and properties.</p>
|
||||
|
||||
<h2>2.1) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).New">ZONE_RADIUS.New</a>(): Constructor.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.2) Manage the radius of the zone</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).SetRadius">ZONE_RADIUS.SetRadius</a>(): Sets the radius of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRadius">ZONE_RADIUS.GetRadius</a>(): Returns the radius of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.3) Manage the location of the zone</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).SetVec2">ZONE_RADIUS.SetVec2</a>(): Sets the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetVec2">ZONE_RADIUS.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetVec3">ZONE_RADIUS.GetVec3</a>(): Returns the <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> of the zone, taking an additional height parameter.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.4) Zone point randomization</h2>
|
||||
|
||||
<p>Various functions exist to find random points within the zone.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomVec2">ZONE_RADIUS.GetRandomVec2</a>(): Gets a random 2D point in the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomPointVec2">ZONE_RADIUS.GetRandomPointVec2</a>(): Gets a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> object representing a random 2D point in the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomPointVec3">ZONE_RADIUS.GetRandomPointVec3</a>(): Gets a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> object representing a random 3D point in the zone. Note that the height of the point is at landheight.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -861,6 +831,14 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>4) #ZONE_UNIT class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -868,27 +846,7 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<h2><a id="#(Zone)" >Type <code>Zone</code></a></h2>
|
||||
|
||||
<h2><a id="#(ZONE)" >Type <code>ZONE</code></a></h2>
|
||||
|
||||
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
|
||||
|
||||
|
||||
<p>The location and the radius are automatically collected from the mission settings.</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE).ClassName" >
|
||||
<strong>ZONE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -933,20 +891,6 @@ The name of the zone as defined within the mission editor.</p>
|
||||
|
||||
<p>Bound the zone boundaries with a tires.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE_BASE).ClassName" >
|
||||
<strong>ZONE_BASE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1401,24 +1345,7 @@ The smoke color.</p>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(ZONE_GROUP)" >Type <code>ZONE_GROUP</code></a></h2>
|
||||
|
||||
<p>The ZONE_GROUP class defined by a zone around a <a href="Group.html">Group</a>, taking the average center point of all the units within the Group, with a radius.</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE_GROUP).ClassName" >
|
||||
<strong>ZONE_GROUP.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -1510,24 +1437,7 @@ self</p>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(ZONE_POLYGON)" >Type <code>ZONE_POLYGON</code></a></h2>
|
||||
|
||||
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE_POLYGON).ClassName" >
|
||||
<strong>ZONE_POLYGON.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -1566,10 +1476,7 @@ self</p>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(ZONE_POLYGON_BASE)" >Type <code>ZONE_POLYGON_BASE</code></a></h2>
|
||||
|
||||
<p>The ZONE<em>POLYGON</em>BASE class defined by an array of <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>, forming a polygon.</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -1595,20 +1502,6 @@ If true, the tyres will be destroyed.</p>
|
||||
<p><em><a href="##(ZONE_POLYGON_BASE)">#ZONE<em>POLYGON</em>BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE_POLYGON_BASE).ClassName" >
|
||||
<strong>ZONE_POLYGON_BASE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1857,20 +1750,6 @@ If true the tyres will be destroyed.</p>
|
||||
<p><em><a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE_RADIUS).ClassName" >
|
||||
<strong>ZONE_RADIUS.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2291,20 +2170,6 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(ZONE_UNIT).ClassName" >
|
||||
<strong>ZONE_UNIT.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_UNIT).GetRandomVec2" >
|
||||
<strong>ZONE_UNIT:GetRandomVec2()</strong>
|
||||
</a>
|
||||
|
||||
@@ -99,10 +99,7 @@ CLIENTS in a SET_CLIENT collection, which are not occupied by human players.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
and automatically engage any airborne enemies that are within a certain range or within a certain zone.</p>
|
||||
<p>AI CAP classes makes AI Controllables execute a Combat Air Patrol.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -114,9 +111,7 @@ and automatically engage any airborne enemies that are within a certain range or
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
<p>AI CAS classes makes AI Controllables execute a Close Air Support.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -128,9 +123,7 @@ and automatically engage any airborne enemies that are within a certain range or
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
<p>AI PATROL classes makes AI Controllables execute an Patrol.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user