mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
2600 lines
61 KiB
HTML
2600 lines
61 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div>
|
|
<div id="main">
|
|
<div id="navigation">
|
|
<h2>Modules</h2>
|
|
<ul><li>
|
|
<a href="index.html">index</a>
|
|
</li></ul>
|
|
<ul>
|
|
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
|
|
<li><a href="AI_Cap.html">AI_Cap</a></li>
|
|
<li><a href="AI_Cas.html">AI_Cas</a></li>
|
|
<li>AI_Patrol</li>
|
|
<li><a href="Account.html">Account</a></li>
|
|
<li><a href="Airbase.html">Airbase</a></li>
|
|
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
|
<li><a href="Assign.html">Assign</a></li>
|
|
<li><a href="Base.html">Base</a></li>
|
|
<li><a href="Cargo.html">Cargo</a></li>
|
|
<li><a href="CleanUp.html">CleanUp</a></li>
|
|
<li><a href="Client.html">Client</a></li>
|
|
<li><a href="CommandCenter.html">CommandCenter</a></li>
|
|
<li><a href="Controllable.html">Controllable</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Detection.html">Detection</a></li>
|
|
<li><a href="DetectionManager.html">DetectionManager</a></li>
|
|
<li><a href="Escort.html">Escort</a></li>
|
|
<li><a href="Event.html">Event</a></li>
|
|
<li><a href="Fsm.html">Fsm</a></li>
|
|
<li><a href="Group.html">Group</a></li>
|
|
<li><a href="Identifiable.html">Identifiable</a></li>
|
|
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
|
<li><a href="Menu.html">Menu</a></li>
|
|
<li><a href="Message.html">Message</a></li>
|
|
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
|
<li><a href="Mission.html">Mission</a></li>
|
|
<li><a href="Object.html">Object</a></li>
|
|
<li><a href="Point.html">Point</a></li>
|
|
<li><a href="Positionable.html">Positionable</a></li>
|
|
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
|
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
|
<li><a href="Route.html">Route</a></li>
|
|
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
|
<li><a href="Scheduler.html">Scheduler</a></li>
|
|
<li><a href="Scoring.html">Scoring</a></li>
|
|
<li><a href="Sead.html">Sead</a></li>
|
|
<li><a href="Set.html">Set</a></li>
|
|
<li><a href="Smoke.html">Smoke</a></li>
|
|
<li><a href="Spawn.html">Spawn</a></li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="Task.html">Task</a></li>
|
|
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
|
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
|
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="Utils.html">Utils</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>AI_Patrol</code></h1>
|
|
|
|
<p>Single-Player:<strong>Yes</strong> / Multi-Player:<strong>Yes</strong> / AI:<strong>Yes</strong> / Human:<strong>No</strong> / Types:<strong>Air</strong> --
|
|
<strong>Air Patrolling or Staging.</strong></p>
|
|
|
|
<p><img src="..\Presentations\AI_PATROL\Dia1.JPG" alt="Banner Image"/></p>
|
|
|
|
<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><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>
|
|
</ul>
|
|
|
|
<h3>1.2.2) AI<em>PATROL</em>ZONE Events</h3>
|
|
|
|
<ul>
|
|
<li><strong>Start</strong> ( Group ): Start 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>
|
|
|
|
<p>2017-01-17: When Spawned AI is located at an airbase, it will be routed first back to the airbase after take-off.</p>
|
|
|
|
<p>2016-01-17:
|
|
-- Fixed problem with AI returning to base too early and unexpected.
|
|
-- ReSpawning of AI will reset the AI_PATROL and derived classes.
|
|
-- Checked the correct workings of SCHEDULER, and it DOES work correctly.</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>
|
|
|
|
<ul>
|
|
<li><strong>Added</strong> parts are expressed in bold type face.</li>
|
|
<li><em>Removed</em> parts are expressed in italic type face.</li>
|
|
</ul>
|
|
|
|
<p>Hereby the change log:</p>
|
|
|
|
<p>2017-01-17: Rename of class: <strong>AI_PATROL_ZONE</strong> is the new name for the old <em>AI_PATROLZONE</em>.</p>
|
|
|
|
<p>2017-01-15: Complete revision. AI<em>PATROL</em>ZONE is the base class for other AI_PATROL like classes.</p>
|
|
|
|
<p>2016-09-01: Initial class and API.</p>
|
|
|
|
<hr/>
|
|
|
|
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
|
|
|
<h3>Contributions:</h3>
|
|
|
|
<ul>
|
|
<li><strong><a href="https://forums.eagle.ru/member.php?u=112075">Dutch_Baron</a></strong>: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)</li>
|
|
<li><strong><a href="https://forums.eagle.ru/member.php?u=62835">Pikey</a></strong>: Testing and API concept review.</li>
|
|
</ul>
|
|
|
|
<h3>Authors:</h3>
|
|
|
|
<ul>
|
|
<li><strong>FlightControl</strong>: Design & Programming.</li>
|
|
</ul>
|
|
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#AI_PATROL_ZONE">AI_PATROL_ZONE</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(AI_PATROL_ZONE)">Type <code>AI_PATROL_ZONE</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).AIControllable">AI_PATROL_ZONE.AIControllable</a></td>
|
|
<td class="summary">
|
|
<p>The <a href="Controllable.html">Controllable</a> patrolling.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<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>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).ClearDetectedUnits">AI_PATROL_ZONE:ClearDetectedUnits()</a></td>
|
|
<td class="summary">
|
|
<p>Clears the list of <a href="Unit.html##(UNIT)">Unit#UNIT</a>s that were detected by the AI.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).CoordTest">AI_PATROL_ZONE.CoordTest</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).Detect">AI_PATROL_ZONE:Detect()</a></td>
|
|
<td class="summary">
|
|
<p>Synchronous Event Trigger for Event Detect.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).DetectActivated">AI_PATROL_ZONE.DetectActivated</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).DetectInterval">AI_PATROL_ZONE.DetectInterval</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).DetectOn">AI_PATROL_ZONE.DetectOn</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).DetectZone">AI_PATROL_ZONE.DetectZone</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).Detected">AI_PATROL_ZONE:Detected()</a></td>
|
|
<td class="summary">
|
|
<p>Synchronous Event Trigger for Event Detected.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).DetectedUnits">AI_PATROL_ZONE.DetectedUnits</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).GetDetectedUnits">AI_PATROL_ZONE:GetDetectedUnits()</a></td>
|
|
<td class="summary">
|
|
<p>Gets a list of <a href="Unit.html##(UNIT)">Unit#UNIT</a>s that were detected by the AI.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).ManageDamage">AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold)</a></td>
|
|
<td class="summary">
|
|
<p>When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).ManageFuel">AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)</a></td>
|
|
<td class="summary">
|
|
<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.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).New">AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType)</a></td>
|
|
<td class="summary">
|
|
<p>Creates a new AI<em>PATROL</em>ZONE object</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnAfterDetect">AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnAfter Transition Handler for Event Detect.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnAfterDetected">AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnAfter Transition Handler for Event Detected.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnAfterRTB">AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnAfter Transition Handler for Event RTB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnAfterRoute">AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnAfter Transition Handler for Event Route.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnAfterStart">AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnAfter Transition Handler for Event Start.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnAfterStatus">AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnAfter Transition Handler for Event Status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnBeforeDetect">AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnBefore Transition Handler for Event Detect.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnBeforeDetected">AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnBefore Transition Handler for Event Detected.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnBeforeRTB">AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnBefore Transition Handler for Event RTB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnBeforeRoute">AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnBefore Transition Handler for Event Route.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnBeforeStart">AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnBefore Transition Handler for Event Start.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnBeforeStatus">AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnBefore Transition Handler for Event Status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnCrash">AI_PATROL_ZONE:OnCrash(EventData)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnEjection">AI_PATROL_ZONE:OnEjection(EventData)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnEnterPatrolling">AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnEnter Transition Handler for State Patrolling.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnEnterReturning">AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnEnter Transition Handler for State Returning.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnLeavePatrolling">AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnLeave Transition Handler for State Patrolling.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnLeaveReturning">AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>OnLeave Transition Handler for State Returning.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).OnPilotDead">AI_PATROL_ZONE:OnPilotDead(EventData)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolAltType">AI_PATROL_ZONE.PatrolAltType</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolCeilingAltitude">AI_PATROL_ZONE.PatrolCeilingAltitude</a></td>
|
|
<td class="summary">
|
|
<p>The highest altitude in meters where to execute the patrol.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolDamageTreshold">AI_PATROL_ZONE.PatrolDamageTreshold</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolFloorAltitude">AI_PATROL_ZONE.PatrolFloorAltitude</a></td>
|
|
<td class="summary">
|
|
<p>The lowest altitude in meters where to execute the patrol.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolFuelTresholdPercentage">AI_PATROL_ZONE.PatrolFuelTresholdPercentage</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolManageDamage">AI_PATROL_ZONE.PatrolManageDamage</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolManageFuel">AI_PATROL_ZONE.PatrolManageFuel</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolMaxSpeed">AI_PATROL_ZONE.PatrolMaxSpeed</a></td>
|
|
<td class="summary">
|
|
<p>The maximum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolMinSpeed">AI_PATROL_ZONE.PatrolMinSpeed</a></td>
|
|
<td class="summary">
|
|
<p>The minimum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolOutOfFuelOrbitTime">AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).PatrolZone">AI_PATROL_ZONE.PatrolZone</a></td>
|
|
<td class="summary">
|
|
<p>The <a href="Zone.html">Zone</a> where the patrol needs to be executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).RTB">AI_PATROL_ZONE:RTB()</a></td>
|
|
<td class="summary">
|
|
<p>Synchronous Event Trigger for Event RTB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).Route">AI_PATROL_ZONE:Route()</a></td>
|
|
<td class="summary">
|
|
<p>Synchronous Event Trigger for Event Route.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetAltitude">AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)</a></td>
|
|
<td class="summary">
|
|
<p>Sets the floor and ceiling altitude of the patrol.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetDetectionActivated">AI_PATROL_ZONE:SetDetectionActivated()</a></td>
|
|
<td class="summary">
|
|
<p>Activate the detection.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetDetectionDeactivated">AI_PATROL_ZONE:SetDetectionDeactivated()</a></td>
|
|
<td class="summary">
|
|
<p>Deactivate the detection.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetDetectionInterval">AI_PATROL_ZONE:SetDetectionInterval(Seconds)</a></td>
|
|
<td class="summary">
|
|
<p>Set the interval in seconds between each detection executed by the AI.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetDetectionOff">AI_PATROL_ZONE:SetDetectionOff()</a></td>
|
|
<td class="summary">
|
|
<p>Set the detection off.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetDetectionOn">AI_PATROL_ZONE:SetDetectionOn()</a></td>
|
|
<td class="summary">
|
|
<p>Set the detection on.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetDetectionZone">AI_PATROL_ZONE:SetDetectionZone(DetectionZone)</a></td>
|
|
<td class="summary">
|
|
<p>Set the detection zone where the AI is detecting targets.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetSpeed">AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed)</a></td>
|
|
<td class="summary">
|
|
<p>Sets (modifies) the minimum and maximum speed of the patrol.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).SetStatusOff">AI_PATROL_ZONE:SetStatusOff()</a></td>
|
|
<td class="summary">
|
|
<p>Set the status checking off.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).Start">AI_PATROL_ZONE:Start()</a></td>
|
|
<td class="summary">
|
|
<p>Synchronous Event Trigger for Event Start.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).Status">AI_PATROL_ZONE:Status()</a></td>
|
|
<td class="summary">
|
|
<p>Synchronous Event Trigger for Event Status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE)._NewPatrolRoute">AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).__Detect">AI_PATROL_ZONE:__Detect(Delay)</a></td>
|
|
<td class="summary">
|
|
<p>Asynchronous Event Trigger for Event Detect.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).__Detected">AI_PATROL_ZONE:__Detected(Delay)</a></td>
|
|
<td class="summary">
|
|
<p>Asynchronous Event Trigger for Event Detected.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).__RTB">AI_PATROL_ZONE:__RTB(Delay)</a></td>
|
|
<td class="summary">
|
|
<p>Asynchronous Event Trigger for Event RTB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).__Route">AI_PATROL_ZONE:__Route(Delay)</a></td>
|
|
<td class="summary">
|
|
<p>Asynchronous Event Trigger for Event Route.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).__Start">AI_PATROL_ZONE:__Start(Delay)</a></td>
|
|
<td class="summary">
|
|
<p>Asynchronous Event Trigger for Event Start.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).__Status">AI_PATROL_ZONE:__Status(Delay)</a></td>
|
|
<td class="summary">
|
|
<p>Asynchronous Event Trigger for Event Status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onafterDead">AI_PATROL_ZONE:onafterDead()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onafterDetect">AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onafterRTB">AI_PATROL_ZONE:onafterRTB()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onafterRoute">AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>Defines a new patrol route using the <a href="Process_PatrolZone.html">Process_PatrolZone</a> parameters and settings.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onafterStart">AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
<p>Defines a new patrol route using the <a href="Process_PatrolZone.html">Process_PatrolZone</a> parameters and settings.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onafterStatus">AI_PATROL_ZONE:onafterStatus()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onbeforeDetect">AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AI_PATROL_ZONE).onbeforeStatus">AI_PATROL_ZONE:onbeforeStatus()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(AI_PATROL_ZONE)">#AI_PATROL_ZONE</a></em>
|
|
<a id="AI_PATROL_ZONE" >
|
|
<strong>AI_PATROL_ZONE</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(AI_Patrol)" >Type <code>AI_Patrol</code></a></h2>
|
|
|
|
<h2><a id="#(AI_PATROL_ZONE)" >Type <code>AI_PATROL_ZONE</code></a></h2>
|
|
|
|
<p>AI<em>PATROL</em>ZONE class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a></em>
|
|
<a id="#(AI_PATROL_ZONE).AIControllable" >
|
|
<strong>AI_PATROL_ZONE.AIControllable</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The <a href="Controllable.html">Controllable</a> patrolling.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AI_PATROL_ZONE).CheckStatus" >
|
|
<strong>AI_PATROL_ZONE.CheckStatus</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</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">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).ClearDetectedUnits" >
|
|
<strong>AI_PATROL_ZONE:ClearDetectedUnits()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Clears the list of <a href="Unit.html##(UNIT)">Unit#UNIT</a>s that were detected by the AI.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Functional.Spawn.html##(SPAWN)">Functional.Spawn#SPAWN</a></em>
|
|
<a id="#(AI_PATROL_ZONE).CoordTest" >
|
|
<strong>AI_PATROL_ZONE.CoordTest</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).Detect" >
|
|
<strong>AI_PATROL_ZONE:Detect()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Synchronous Event Trigger for Event Detect.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AI_PATROL_ZONE).DetectActivated" >
|
|
<strong>AI_PATROL_ZONE.DetectActivated</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AI_PATROL_ZONE).DetectInterval" >
|
|
<strong>AI_PATROL_ZONE.DetectInterval</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AI_PATROL_ZONE).DetectOn" >
|
|
<strong>AI_PATROL_ZONE.DetectOn</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AI_PATROL_ZONE).DetectZone" >
|
|
<strong>AI_PATROL_ZONE.DetectZone</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).Detected" >
|
|
<strong>AI_PATROL_ZONE:Detected()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Synchronous Event Trigger for Event Detected.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AI_PATROL_ZONE).DetectedUnits" >
|
|
<strong>AI_PATROL_ZONE.DetectedUnits</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> This table contains the targets detected during patrol.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).GetDetectedUnits" >
|
|
<strong>AI_PATROL_ZONE:GetDetectedUnits()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Gets a list of <a href="Unit.html##(UNIT)">Unit#UNIT</a>s that were detected by the AI.</p>
|
|
|
|
|
|
<p>No filtering is applied, so, ANY detected UNIT can be in this list.
|
|
It is up to the mission designer to use the <a href="Unit.html">Unit</a> class and methods to filter the targets.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#table:</em>
|
|
The list of <a href="Unit.html##(UNIT)">Unit#UNIT</a>s</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).ManageDamage" >
|
|
<strong>AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.</p>
|
|
|
|
|
|
<p>However, damage cannot be foreseen early on.
|
|
Therefore, when the damage treshold is reached,
|
|
the AI will return immediately to the home base (RTB).
|
|
Note that for groups, the average damage of the complete group will be calculated.
|
|
So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number PatrolDamageTreshold </em></code>:
|
|
The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).ManageFuel" >
|
|
<strong>AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<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.</p>
|
|
|
|
|
|
<p>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 AIControllable is targetted to the AI<em>PATROL</em>ZONE.
|
|
Once the time is finished, the old AI will return to the base.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number PatrolFuelTresholdPercentage </em></code>:
|
|
The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number PatrolOutOfFuelOrbitTime </em></code>:
|
|
The amount of seconds the out of fuel AIControllable will orbit before returning to the base.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).New" >
|
|
<strong>AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Creates a new AI<em>PATROL</em>ZONE object</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> PatrolZone </em></code>:
|
|
The <a href="Zone.html">Zone</a> where the patrol needs to be executed.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Altitude)">Dcs.DCSTypes#Altitude</a> PatrolFloorAltitude </em></code>:
|
|
The lowest altitude in meters where to execute the patrol.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Altitude)">Dcs.DCSTypes#Altitude</a> PatrolCeilingAltitude </em></code>:
|
|
The highest altitude in meters where to execute the patrol.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> PatrolMinSpeed </em></code>:
|
|
The minimum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> PatrolMaxSpeed </em></code>:
|
|
The maximum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(AltitudeType)">Dcs.DCSTypes#AltitudeType</a> PatrolAltType </em></code>:
|
|
The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Define a new AI_PATROL_ZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
|
|
PatrolZone = ZONE:New( 'PatrolZone' )
|
|
PatrolSpawn = SPAWN:New( 'Patrol Group' )
|
|
PatrolArea = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 600, 900 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnAfterDetect" >
|
|
<strong>AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnAfter Transition Handler for Event Detect.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnAfterDetected" >
|
|
<strong>AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnAfter Transition Handler for Event Detected.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnAfterRTB" >
|
|
<strong>AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnAfter Transition Handler for Event RTB.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnAfterRoute" >
|
|
<strong>AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnAfter Transition Handler for Event Route.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnAfterStart" >
|
|
<strong>AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnAfter Transition Handler for Event Start.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnAfterStatus" >
|
|
<strong>AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnAfter Transition Handler for Event Status.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnBeforeDetect" >
|
|
<strong>AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnBefore Transition Handler for Event Detect.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnBeforeDetected" >
|
|
<strong>AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnBefore Transition Handler for Event Detected.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnBeforeRTB" >
|
|
<strong>AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnBefore Transition Handler for Event RTB.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnBeforeRoute" >
|
|
<strong>AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnBefore Transition Handler for Event Route.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnBeforeStart" >
|
|
<strong>AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnBefore Transition Handler for Event Start.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnBeforeStatus" >
|
|
<strong>AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnBefore Transition Handler for Event Status.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnCrash" >
|
|
<strong>AI_PATROL_ZONE:OnCrash(EventData)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnEjection" >
|
|
<strong>AI_PATROL_ZONE:OnEjection(EventData)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnEnterPatrolling" >
|
|
<strong>AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnEnter Transition Handler for State Patrolling.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnEnterReturning" >
|
|
<strong>AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnEnter Transition Handler for State Returning.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnLeavePatrolling" >
|
|
<strong>AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnLeave Transition Handler for State Patrolling.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnLeaveReturning" >
|
|
<strong>AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>OnLeave Transition Handler for State Returning.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
Return false to cancel Transition.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).OnPilotDead" >
|
|
<strong>AI_PATROL_ZONE:OnPilotDead(EventData)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).PatrolAltType" >
|
|
<strong>AI_PATROL_ZONE.PatrolAltType</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> defafult PatrolAltType to "RADIO" if not specified</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Dcs.DCSTypes.html##(Altitude)">Dcs.DCSTypes#Altitude</a></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolCeilingAltitude" >
|
|
<strong>AI_PATROL_ZONE.PatrolCeilingAltitude</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The highest altitude in meters where to execute the patrol.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolDamageTreshold" >
|
|
<strong>AI_PATROL_ZONE.PatrolDamageTreshold</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Dcs.DCSTypes.html##(Altitude)">Dcs.DCSTypes#Altitude</a></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolFloorAltitude" >
|
|
<strong>AI_PATROL_ZONE.PatrolFloorAltitude</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The lowest altitude in meters where to execute the patrol.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolFuelTresholdPercentage" >
|
|
<strong>AI_PATROL_ZONE.PatrolFuelTresholdPercentage</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolManageDamage" >
|
|
<strong>AI_PATROL_ZONE.PatrolManageDamage</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolManageFuel" >
|
|
<strong>AI_PATROL_ZONE.PatrolManageFuel</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolMaxSpeed" >
|
|
<strong>AI_PATROL_ZONE.PatrolMaxSpeed</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The maximum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolMinSpeed" >
|
|
<strong>AI_PATROL_ZONE.PatrolMinSpeed</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The minimum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolOutOfFuelOrbitTime" >
|
|
<strong>AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a></em>
|
|
<a id="#(AI_PATROL_ZONE).PatrolZone" >
|
|
<strong>AI_PATROL_ZONE.PatrolZone</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The <a href="Zone.html">Zone</a> where the patrol needs to be executed.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).RTB" >
|
|
<strong>AI_PATROL_ZONE:RTB()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Synchronous Event Trigger for Event RTB.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).Route" >
|
|
<strong>AI_PATROL_ZONE:Route()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Synchronous Event Trigger for Event Route.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetAltitude" >
|
|
<strong>AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sets the floor and ceiling altitude of the patrol.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Altitude)">Dcs.DCSTypes#Altitude</a> PatrolFloorAltitude </em></code>:
|
|
The lowest altitude in meters where to execute the patrol.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Altitude)">Dcs.DCSTypes#Altitude</a> PatrolCeilingAltitude </em></code>:
|
|
The highest altitude in meters where to execute the patrol.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetDetectionActivated" >
|
|
<strong>AI_PATROL_ZONE:SetDetectionActivated()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Activate the detection.</p>
|
|
|
|
|
|
<p>The AI will detect for targets if the Detection is switched On.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetDetectionDeactivated" >
|
|
<strong>AI_PATROL_ZONE:SetDetectionDeactivated()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Deactivate the detection.</p>
|
|
|
|
|
|
<p>The AI will NOT detect for targets.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetDetectionInterval" >
|
|
<strong>AI_PATROL_ZONE:SetDetectionInterval(Seconds)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Set the interval in seconds between each detection executed by the AI.</p>
|
|
|
|
|
|
<p>The list of already detected targets will be kept and updated.
|
|
Newly detected targets will be added, but already detected targets that were
|
|
not detected in this cycle, will NOT be removed!
|
|
The default interval is 30 seconds.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Seconds </em></code>:
|
|
The interval in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetDetectionOff" >
|
|
<strong>AI_PATROL_ZONE:SetDetectionOff()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Set the detection off.</p>
|
|
|
|
|
|
<p>The AI will NOT detect for targets.
|
|
However, the list of already detected targets will be kept and can be enquired!</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetDetectionOn" >
|
|
<strong>AI_PATROL_ZONE:SetDetectionOn()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Set the detection on.</p>
|
|
|
|
|
|
<p>The AI will detect for targets.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetDetectionZone" >
|
|
<strong>AI_PATROL_ZONE:SetDetectionZone(DetectionZone)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Set the detection zone where the AI is detecting targets.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> DetectionZone </em></code>:
|
|
The zone where to detect targets.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetSpeed" >
|
|
<strong>AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sets (modifies) the minimum and maximum speed of the patrol.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> PatrolMinSpeed </em></code>:
|
|
The minimum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> PatrolMaxSpeed </em></code>:
|
|
The maximum speed of the <a href="Controllable.html">Controllable</a> in km/h.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).SetStatusOff" >
|
|
<strong>AI_PATROL_ZONE:SetStatusOff()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Set the status checking off.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).Start" >
|
|
<strong>AI_PATROL_ZONE:Start()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Synchronous Event Trigger for Event Start.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).Status" >
|
|
<strong>AI_PATROL_ZONE:Status()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Synchronous Event Trigger for Event Status.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE)._NewPatrolRoute" >
|
|
<strong>AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> AIControllable </em></code>:
|
|
This statis method is called from the route path within the last task at the last waaypoint of the Controllable.
|
|
Note that this method is required, as triggers the next route when patrolling for the Controllable.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> self </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).__Detect" >
|
|
<strong>AI_PATROL_ZONE:__Detect(Delay)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Asynchronous Event Trigger for Event Detect.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Delay </em></code>:
|
|
The delay in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).__Detected" >
|
|
<strong>AI_PATROL_ZONE:__Detected(Delay)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Asynchronous Event Trigger for Event Detected.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Delay </em></code>:
|
|
The delay in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).__RTB" >
|
|
<strong>AI_PATROL_ZONE:__RTB(Delay)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Asynchronous Event Trigger for Event RTB.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Delay </em></code>:
|
|
The delay in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).__Route" >
|
|
<strong>AI_PATROL_ZONE:__Route(Delay)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Asynchronous Event Trigger for Event Route.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Delay </em></code>:
|
|
The delay in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).__Start" >
|
|
<strong>AI_PATROL_ZONE:__Start(Delay)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Asynchronous Event Trigger for Event Start.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Delay </em></code>:
|
|
The delay in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).__Status" >
|
|
<strong>AI_PATROL_ZONE:__Status(Delay)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Asynchronous Event Trigger for Event Status.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Delay </em></code>:
|
|
The delay in seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onafterDead" >
|
|
<strong>AI_PATROL_ZONE:onafterDead()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onafterDetect" >
|
|
<strong>AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> Controllable </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> From </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Event </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> To </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onafterRTB" >
|
|
<strong>AI_PATROL_ZONE:onafterRTB()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onafterRoute" >
|
|
<strong>AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Defines a new patrol route using the <a href="Process_PatrolZone.html">Process_PatrolZone</a> parameters and settings.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onafterStart" >
|
|
<strong>AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Defines a new patrol route using the <a href="Process_PatrolZone.html">Process_PatrolZone</a> parameters and settings.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
|
The Controllable Object managed by the FSM.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string From </em></code>:
|
|
The From State string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Event </em></code>:
|
|
The Event string.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string To </em></code>:
|
|
The To State string.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onafterStatus" >
|
|
<strong>AI_PATROL_ZONE:onafterStatus()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onbeforeDetect" >
|
|
<strong>AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> Controllable </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> From </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Event </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> To </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AI_PATROL_ZONE).onbeforeStatus" >
|
|
<strong>AI_PATROL_ZONE:onbeforeStatus()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|