2016-09-12 12:29:20 +02:00

460 lines
11 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="AIBalancer.html">AIBalancer</a></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="Controllable.html">Controllable</a></li>
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
<li><a href="DCSCommand.html">DCSCommand</a></li>
<li><a href="DCSController.html">DCSController</a></li>
<li><a href="DCSGroup.html">DCSGroup</a></li>
<li><a href="DCSObject.html">DCSObject</a></li>
<li><a href="DCSTask.html">DCSTask</a></li>
<li><a href="DCSTypes.html">DCSTypes</a></li>
<li><a href="DCSUnit.html">DCSUnit</a></li>
<li><a href="DCSWorld.html">DCSWorld</a></li>
<li><a href="DCScountry.html">DCScountry</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DCStrigger.html">DCStrigger</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="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="Patrol.html">Patrol</a></li>
<li><a href="Point.html">Point</a></li>
<li><a href="Positionable.html">Positionable</a></li>
<li><a href="Process.html">Process</a></li>
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li>Route</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="Spawn.html">Spawn</a></li>
<li><a href="StateMachine.html">StateMachine</a></li>
<li><a href="Static.html">Static</a></li>
<li><a href="StaticObject.html">StaticObject</a></li>
<li><a href="Task.html">Task</a></li>
<li><a href="Task_A2G.html">Task_A2G</a></li>
<li><a href="Task_Client_Menu.html">Task_Client_Menu</a></li>
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="Zone.html">Zone</a></li>
<li><a href="env.html">env</a></li>
<li><a href="land.html">land</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>Route</code></h1>
<p>(SP) (MP) (FSM) Route AI or players to waypoints or zones.</p>
<hr/>
<h1>1) <a href="##(ROUTEZONE)">#ROUTEZONE</a> class, extends <a href="StateMachine.html##(STATEMACHINE)">StateMachine#STATEMACHINE</a></h1>
<p>The <a href="##(ROUTEZONE)">#ROUTEZONE</a> class implements the core functions to route an AIR <a href="Controllable.html">Controllable</a> player <a href="Unit.html">Unit</a> to a <a href="Zone.html">Zone</a>.
The player receives on perioding times messages with the coordinates of the route to follow.
Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.</p>
<h2>1.1) ROUTEZONE constructor:</h2>
<ul>
<li><a href="##(ROUTEZONE).New">ROUTEZONE.New</a>(): Creates a new ROUTEZONE object.</li>
</ul>
<h2>1.2) ROUTEZONE state machine:</h2>
<p>The ROUTEZONE is a state machine: it manages the different events and states of the Controllable it is controlling.</p>
<h3>1.2.1) ROUTEZONE Events:</h3>
<ul>
<li><a href="##(ROUTEZONE).Start">ROUTEZONE.Start</a>( Controllable ): Start the route to the zone. Messages will appear within defined intervals.</li>
</ul>
<h3>1.2.2) ROUTEZONE States:</h3>
<ul>
<li><strong>UnArrived</strong>: The player is still underway to the zone.</li>
<li><strong>Arrived</strong>: The Controllable has arrived at the zone.</li>
</ul>
<h3>1.2.3) ROUTEZONE state transition functions:</h3>
<p>State transition functions can be set <strong>by the mission designer</strong> customizing or improving the behaviour of the state.
There are 2 moments when state transition functions will be called by the state machine:</p>
<ul>
<li><p><strong>Before</strong> the state transition.
The state transition function needs to start with the name <strong>OnBefore + the name of the state</strong>.
If the state transition function returns false, then the processing of the state transition will not be done!
If you want to change the behaviour of the AIControllable at this event, return false,
but then you'll need to specify your own logic using the AIControllable!</p></li>
<li><p><strong>After</strong> the state transition.
The state transition function needs to start with the name <strong>OnAfter + the name of the state</strong>.
These state transition functions need to provide a return value, which is specified at the function description.</p></li>
</ul>
<h2>1.3) Manage the ROUTEZONE parameters:</h2>
<p>The following methods are available to modify the parameters of a ROUTEZONE object:</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#ROUTEZONE">ROUTEZONE</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(ROUTEZONE)">Type <code>ROUTEZONE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).ClassName">ROUTEZONE.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).DisplayCategory">ROUTEZONE.DisplayCategory</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).DisplayCount">ROUTEZONE.DisplayCount</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).DisplayInterval">ROUTEZONE.DisplayInterval</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).DisplayMessage">ROUTEZONE.DisplayMessage</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).DisplayTime">ROUTEZONE.DisplayTime</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).New">ROUTEZONE:New(Task, Unit, ProcessUnit, TargetZone)</a></td>
<td class="summary">
<p>Creates a new routing state machine.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).ProcessUnit">ROUTEZONE.ProcessUnit</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).TASK">ROUTEZONE.TASK</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).TargetZone">ROUTEZONE.TargetZone</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTEZONE).onleaveUnArrived">ROUTEZONE:onleaveUnArrived(ProcessUnit, Event, From, To)</a></td>
<td class="summary">
<p>StateMachine callback function</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(ROUTEZONE)">#ROUTEZONE</a></em>
<a id="ROUTEZONE" >
<strong>ROUTEZONE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(Route)" >Type <code>Route</code></a></h2>
<h2><a id="#(ROUTEZONE)" >Type <code>ROUTEZONE</code></a></h2>
<p>ROUTEZONE class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(ROUTEZONE).ClassName" >
<strong>ROUTEZONE.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(ROUTEZONE).DisplayCategory" >
<strong>ROUTEZONE.DisplayCategory</strong>
</a>
</dt>
<dd>
<p> Route is the default display category</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(ROUTEZONE).DisplayCount" >
<strong>ROUTEZONE.DisplayCount</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(ROUTEZONE).DisplayInterval" >
<strong>ROUTEZONE.DisplayInterval</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#boolean</em>
<a id="#(ROUTEZONE).DisplayMessage" >
<strong>ROUTEZONE.DisplayMessage</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(ROUTEZONE).DisplayTime" >
<strong>ROUTEZONE.DisplayTime</strong>
</a>
</dt>
<dd>
<p> 10 seconds is the default</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ROUTEZONE).New" >
<strong>ROUTEZONE:New(Task, Unit, ProcessUnit, TargetZone)</strong>
</a>
</dt>
<dd>
<p>Creates a new routing state machine.</p>
<p>The task will route a CLIENT to a ZONE until the CLIENT is within that ZONE.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Task.html##(TASK)">Task#TASK</a> Task </em></code>: </p>
</li>
<li>
<p><code><em><a href="Unit.html##(UNIT)">Unit#UNIT</a> Unit </em></code>: </p>
</li>
<li>
<p><code><em> ProcessUnit </em></code>: </p>
</li>
<li>
<p><code><em> TargetZone </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(ROUTEZONE)">#ROUTEZONE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Unit.html##(UNIT)">Unit#UNIT</a></em>
<a id="#(ROUTEZONE).ProcessUnit" >
<strong>ROUTEZONE.ProcessUnit</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Task.html##(TASK)">Task#TASK</a></em>
<a id="#(ROUTEZONE).TASK" >
<strong>ROUTEZONE.TASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></em>
<a id="#(ROUTEZONE).TargetZone" >
<strong>ROUTEZONE.TargetZone</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ROUTEZONE).onleaveUnArrived" >
<strong>ROUTEZONE:onleaveUnArrived(ProcessUnit, Event, From, To)</strong>
</a>
</dt>
<dd>
<p>StateMachine callback function</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Controllable.html##(CONTROLLABLE)">Controllable#CONTROLLABLE</a> ProcessUnit </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
</div>
</div>
</body>
</html>