Many Fixes

This commit is contained in:
FlightControl_Master
2017-08-08 09:42:42 +02:00
parent 63866e4aa9
commit 2aecf45316
26 changed files with 455 additions and 138 deletions

View File

@@ -341,13 +341,13 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBHold">AI_A2A.RTBHold(AIGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBHold">AI_A2A.RTBHold(AIGroup, Fsm)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBRoute">AI_A2A.RTBRoute(AIGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBRoute">AI_A2A.RTBRoute(AIGroup, Fsm)</a></td>
<td class="summary">
</td>
@@ -359,7 +359,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).Resume">AI_A2A.Resume(AIGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).Resume">AI_A2A.Resume(AIGroup, Fsm)</a></td>
<td class="summary">
</td>
@@ -1476,19 +1476,24 @@ Return false to cancel Transition.</p>
<dt>
<a id="#(AI_A2A).RTBHold" >
<strong>AI_A2A.RTBHold(AIGroup)</strong>
<strong>AI_A2A.RTBHold(AIGroup, Fsm)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
</li>
<li>
<p><code><em> Fsm </em></code>: </p>
</li>
</ul>
</dd>
@@ -1497,19 +1502,24 @@ Return false to cancel Transition.</p>
<dt>
<a id="#(AI_A2A).RTBRoute" >
<strong>AI_A2A.RTBRoute(AIGroup)</strong>
<strong>AI_A2A.RTBRoute(AIGroup, Fsm)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
</li>
<li>
<p><code><em> Fsm </em></code>: </p>
</li>
</ul>
</dd>
@@ -1531,19 +1541,24 @@ Return false to cancel Transition.</p>
<dt>
<a id="#(AI_A2A).Resume" >
<strong>AI_A2A.Resume(AIGroup)</strong>
<strong>AI_A2A.Resume(AIGroup, Fsm)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
</li>
<li>
<p><code><em> Fsm </em></code>: </p>
</li>
</ul>
</dd>

View File

@@ -171,7 +171,7 @@ and automatically engage any airborne enemies that are within a certain range or
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_CAP).AttackRoute">AI_A2A_CAP.AttackRoute(AIGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_CAP).AttackRoute">AI_A2A_CAP.AttackRoute(AIGroup, Fsm)</a></td>
<td class="summary">
</td>
@@ -553,19 +553,24 @@ Use the method <a href="AI_Cap.html##(AI_A2A_CAP).SetEngageZone">AI<em>Cap#AI</e
<dt>
<a id="#(AI_A2A_CAP).AttackRoute" >
<strong>AI_A2A_CAP.AttackRoute(AIGroup)</strong>
<strong>AI_A2A_CAP.AttackRoute(AIGroup, Fsm)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
</li>
<li>
<p><code><em> Fsm </em></code>: </p>
</li>
</ul>
</dd>

View File

@@ -204,7 +204,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCI).InterceptRoute">AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCI).InterceptRoute">AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup, Fsm)</a></td>
<td class="summary">
</td>
@@ -617,7 +617,7 @@ Use the method <a href="AI_Cap.html##(AI_A2A_GCI).SetEngageZone">AI<em>Cap#AI</e
<dt>
<a id="#(AI_A2A_GCI).InterceptRoute" >
<strong>AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup)</strong>
<strong>AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup, Fsm)</strong>
</a>
</dt>
<dd>
@@ -635,6 +635,11 @@ Use the method <a href="AI_Cap.html##(AI_A2A_GCI).SetEngageZone">AI<em>Cap#AI</e
<p><code><em> AIGroup </em></code>: </p>
</li>
<li>
<p><code><em> Fsm </em></code>: </p>
</li>
</ul>
</dd>

View File

@@ -242,7 +242,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_PATROL).PatrolRoute">AI_A2A_PATROL.PatrolRoute(AIGroup)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_PATROL).PatrolRoute">AI_A2A_PATROL.PatrolRoute(AIGroup, Fsm)</a></td>
<td class="summary">
</td>
@@ -852,14 +852,14 @@ Return false to cancel Transition.</p>
<dt>
<a id="#(AI_A2A_PATROL).PatrolRoute" >
<strong>AI_A2A_PATROL.PatrolRoute(AIGroup)</strong>
<strong>AI_A2A_PATROL.PatrolRoute(AIGroup, Fsm)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<h3>Parameters</h3>
<ul>
<li>
@@ -867,6 +867,11 @@ Return false to cancel Transition.</p>
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> Fsm </em></code>: </p>
</li>
</ul>
</dd>

View File

@@ -3417,7 +3417,6 @@ The range till cargo will board.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(CARGO_UNIT).CargoCarrier" >
<strong>CARGO_UNIT.CargoCarrier</strong>
</a>
@@ -3543,7 +3542,6 @@ The range till cargo will board.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(CARGO_UNIT).RunCount" >
<strong>CARGO_UNIT.RunCount</strong>
</a>

View File

@@ -235,6 +235,12 @@
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).GetDetectedTargets">CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK)</a></td>
<td class="summary">
<p>Return the detected targets of the controllable.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).GetFuel">CONTROLLABLE:GetFuel()</a></td>
<td class="summary">
<p>Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.</p>
</td>
</tr>
<tr>
@@ -424,7 +430,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).Route">CONTROLLABLE:Route(GoPoints)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).Route">CONTROLLABLE:Route(Route, DelaySeconds)</a></td>
<td class="summary">
<p>Make the controllable to follow a given route.</p>
</td>
@@ -451,6 +457,12 @@
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).SetTask">CONTROLLABLE:SetTask(DCSTask, WaitTime)</a></td>
<td class="summary">
<p>Clearing the Task Queue and Setting the Task on the queue from the controllable.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).SetTaskAtWaypoint">CONTROLLABLE:SetTaskAtWaypoint(RouteList, WaypointNumber, Task)</a></td>
<td class="summary">
<p>Set a Task at a Waypoint using a Route list.</p>
</td>
</tr>
<tr>
@@ -538,9 +550,9 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).TaskFunction">CONTROLLABLE:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).TaskFunction">CONTROLLABLE:TaskFunction(FunctionString, ...)</a></td>
<td class="summary">
<p>This creates a Task element, with an action to call a function as part of a Wrapped Task.</p>
</td>
</tr>
<tr>
@@ -769,6 +781,22 @@ This is different from the EnRoute tasks, where the targets of the task need to
<li><a href="##(CONTROLLABLE).TaskControlled">CONTROLLABLE.TaskControlled</a>: Return a Controlled Task taking a Task and a TaskCondition.</li>
</ul>
<h3>Call a function as a Task</h3>
<p>A function can be called which is part of a Task. The method <a href="##(CONTROLLABLE).TaskFunction">CONTROLLABLE.TaskFunction</a>() prepares
a Task that can call a GLOBAL function from within the Controller execution.
This method can also be used to <strong>embed a function call when a certain waypoint has been reached</strong>.
See below the <strong>Tasks at Waypoints</strong> section.</p>
<p>Demonstration Mission: <a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/GRP - Group Commands/GRP-502 - Route at waypoint to random point">GRP-502 - Route at waypoint to random point</a></p>
<h3>Tasks at Waypoints</h3>
<p>Special Task methods are available to set tasks at certain waypoints.
The method <a href="##(CONTROLLABLE).SetTaskAtWaypoint">CONTROLLABLE.SetTaskAtWaypoint</a>() helps preparing a Route, embedding a Task at the Waypoint of the Route.</p>
<p>This creates a Task element, with an action to call a function as part of a Wrapped Task.</p>
<h3>Obtain the mission from controllable templates</h3>
<p>Controllable templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a controllable and assign it to another:</p>
@@ -1478,6 +1506,27 @@ DetectedTargets</p>
<dl class="function">
<dt>
<a id="#(CONTROLLABLE).GetFuel" >
<strong>CONTROLLABLE:GetFuel()</strong>
</a>
</dt>
<dd>
<p>Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.</p>
<p>This method returns nil to ensure polymorphic behaviour! This method needs to be overridden by GROUP or UNIT.</p>
<h3>Return value</h3>
<p><em>#nil:</em>
The CONTROLLABLE is not existing or alive. </p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(CONTROLLABLE).GetLife" >
<strong>CONTROLLABLE:GetLife()</strong>
</a>
@@ -2133,26 +2182,32 @@ self</p>
<dt>
<a id="#(CONTROLLABLE).Route" >
<strong>CONTROLLABLE:Route(GoPoints)</strong>
<strong>CONTROLLABLE:Route(Route, DelaySeconds)</strong>
</a>
</dt>
<dd>
<p>Make the controllable to follow a given route.</p>
<h3>Parameter</h3>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#table GoPoints </em></code>:
<p><code><em>#table Route </em></code>:
A table of Route Points.</p>
</li>
<li>
<p><code><em>#number DelaySeconds </em></code>:
Wait for the specified seconds before executing the Route.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(CONTROLLABLE)">#CONTROLLABLE</a>:</em>
self</p>
The CONTROLLABLE.</p>
</dd>
</dl>
@@ -2277,6 +2332,45 @@ self</p>
<p><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(CONTROLLABLE).SetTaskAtWaypoint" >
<strong>CONTROLLABLE:SetTaskAtWaypoint(RouteList, WaypointNumber, Task)</strong>
</a>
</dt>
<dd>
<p>Set a Task at a Waypoint using a Route list.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE.RouteList)">Wrapper.Controllable#CONTROLLABLE.RouteList</a> RouteList </em></code>:
A list of Waypoints.</p>
</li>
<li>
<p><code><em>#number WaypointNumber </em></code>:
The number of the Waypoint. The first Waypoint starts at 1!</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTasking.Task.html##(Task)">Dcs.DCSTasking.Task#Task</a> Task </em></code>:
The Task structure to be executed!</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Dcs.DCSTasking.Task.html##(Task)">Dcs.DCSTasking.Task#Task</a>:</em></p>
</dd>
</dl>
<dl class="function">
@@ -2971,36 +3065,79 @@ The DCS task structure.</p>
<dt>
<a id="#(CONTROLLABLE).TaskFunction" >
<strong>CONTROLLABLE:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments)</strong>
<strong>CONTROLLABLE:TaskFunction(FunctionString, ...)</strong>
</a>
</dt>
<dd>
<p>This creates a Task element, with an action to call a function as part of a Wrapped Task.</p>
<p>This Task can then be embedded at a Waypoint by calling the method <a href="##(CONTROLLABLE).SetTaskAtWaypoint">CONTROLLABLE.SetTaskAtWaypoint</a>.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> WayPoint </em></code>: </p>
<p><code><em>#string FunctionString </em></code>:
The function name embedded as a string that will be called.</p>
</li>
<li>
<p><code><em> WayPointIndex </em></code>: </p>
</li>
<li>
<p><code><em> FunctionString </em></code>: </p>
</li>
<li>
<p><code><em> FunctionArguments </em></code>: </p>
<p><code><em> ... </em></code>:
The variable arguments passed to the function when called! These arguments can be of any type!</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(CONTROLLABLE)">#CONTROLLABLE</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local ZoneList = {
ZONE:New( "ZONE1" ),
ZONE:New( "ZONE2" ),
ZONE:New( "ZONE3" ),
ZONE:New( "ZONE4" ),
ZONE:New( "ZONE5" )
}
GroundGroup = GROUP:FindByName( "Vehicle" )
--- @param Wrapper.Group#GROUP GroundGroup
function RouteToZone( Vehicle, ZoneRoute )
local Route = {}
Vehicle:E( { ZoneRoute = ZoneRoute } )
Vehicle:MessageToAll( "Moving to zone " .. ZoneRoute:GetName(), 10 )
-- Get the current coordinate of the Vehicle
local FromCoord = Vehicle:GetCoordinate()
-- Select a random Zone and get the Coordinate of the new Zone.
local RandomZone = ZoneList[ math.random( 1, #ZoneList ) ] -- Core.Zone#ZONE
local ToCoord = RandomZone:GetCoordinate()
-- Create a "ground route point", which is a "point" structure that can be given as a parameter to a Task
Route[#Route+1] = FromCoord:RoutePointGround( 72 )
Route[#Route+1] = ToCoord:RoutePointGround( 60, "Vee" )
local TaskRouteToZone = Vehicle:TaskFunction( "RouteToZone", RandomZone )
Vehicle:SetTaskAtWaypoint( Route, #Route, TaskRouteToZone ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone.
Vehicle:Route( Route, math.random( 10, 20 ) ) -- Move after a random seconds to the Route. See the Route method for details.
end
RouteToZone( GroundGroup, ZoneList[1] )
</code></pre>
</dd>
</dl>
<dl class="function">

View File

@@ -923,6 +923,7 @@ function below will use the range 1-7 just in case</p>
<dl class="function">
<dt>
<em></em>
<a id="#(DESIGNATE).LaserCodes" >
<strong>DESIGNATE.LaserCodes</strong>
</a>

View File

@@ -1598,7 +1598,7 @@ A string defining the start state.</p>
<dl class="function">
<dt>
<em></em>
<em>#string</em>
<a id="#(FSM)._StartState" >
<strong>FSM._StartState</strong>
</a>
@@ -1897,7 +1897,6 @@ A string defining the start state.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(FSM).current" >
<strong>FSM.current</strong>
</a>

View File

@@ -256,6 +256,12 @@
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetDCSUnits">GROUP:GetDCSUnits()</a></td>
<td class="summary">
<p>Returns the DCS Units of the DCS Group.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetFuel">GROUP:GetFuel()</a></td>
<td class="summary">
<p>Returns relative amount of fuel (from 0.0 to 1.0) the group has in its internal tanks.</p>
</td>
</tr>
<tr>
@@ -1026,6 +1032,37 @@ The DCS Units.</p>
<dl class="function">
<dt>
<a id="#(GROUP).GetFuel" >
<strong>GROUP:GetFuel()</strong>
</a>
</dt>
<dd>
<p>Returns relative amount of fuel (from 0.0 to 1.0) the group has in its internal tanks.</p>
<p>If there are additional fuel tanks the value may be greater than 1.0.</p>
<h3>Return values</h3>
<ol>
<li>
<p><em>#number:</em>
The relative amount of fuel (from 0.0 to 1.0).</p>
</li>
<li>
<p><em>#nil:</em>
The GROUP is not existing or alive. </p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUP).GetHeading" >
<strong>GROUP:GetHeading()</strong>
</a>

View File

@@ -227,7 +227,6 @@ on defined intervals (currently every minute).</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MOVEMENT).AliveUnits" >
<strong>MOVEMENT.AliveUnits</strong>
</a>
@@ -236,9 +235,6 @@ on defined intervals (currently every minute).</p>
<p> Contains the counter how many units are currently alive</p>
</dd>
</dl>
<dl class="function">

View File

@@ -1838,6 +1838,7 @@ self</p>
<dl class="function">
<dt>
<em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a></em>
<a id="#(POSITIONABLE).Spot" >
<strong>POSITIONABLE.Spot</strong>
</a>

View File

@@ -2194,6 +2194,9 @@ 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">
@@ -2746,6 +2749,9 @@ when nothing was spawned.</p>
<p> By default, no InitLimit</p>
</dd>
</dl>
<dl class="function">
@@ -2781,7 +2787,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(SPAWN).SpawnMaxGroups" >
<strong>SPAWN.SpawnMaxGroups</strong>
</a>
@@ -2798,7 +2804,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
</a>

View File

@@ -765,6 +765,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).ScheduleID" >
<strong>SPOT.ScheduleID</strong>
</a>
@@ -778,6 +779,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotIR" >
<strong>SPOT.SpotIR</strong>
</a>
@@ -791,6 +793,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotLaser" >
<strong>SPOT.SpotLaser</strong>
</a>
@@ -804,6 +807,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).Target" >
<strong>SPOT.Target</strong>
</a>

View File

@@ -552,7 +552,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em></em>
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
<a id="#(FSM_PROCESS).Cargo" >
<strong>FSM_PROCESS.Cargo</strong>
</a>
@@ -566,6 +566,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em></em>
<a id="#(FSM_PROCESS).DeployZone" >
<strong>FSM_PROCESS.DeployZone</strong>
</a>
@@ -630,7 +631,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(TASK_CARGO).CargoLimit" >
<strong>TASK_CARGO.CargoLimit</strong>
</a>

View File

@@ -181,7 +181,7 @@
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetFuel">UNIT:GetFuel()</a></td>
<td class="summary">
<p>Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.</p>
<p>Returns relative amount of fuel (from 0.0 to 1.0) the UNIT has in its internal tanks.</p>
</td>
</tr>
<tr>
@@ -641,7 +641,7 @@ Category name = Helicopter, Airplane, Ground Unit, Ship</p>
</dt>
<dd>
<p>Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.</p>
<p>Returns relative amount of fuel (from 0.0 to 1.0) the UNIT has in its internal tanks.</p>
<p>If there are additional fuel tanks the value may be greater than 1.0.</p>