mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #351 from FlightControl-Master/master-bugfix-330
Master bugfix #330 . Please test. -- Created test mission GRP-310 that simulates a ground group stopping to move and continuing to move.
This commit is contained in:
commit
d4ab9e3e8a
@ -457,12 +457,20 @@ function CONTROLLABLE:CommandSwitchWayPoint( FromWayPoint, ToWayPoint )
|
||||
return CommandSwitchWayPoint
|
||||
end
|
||||
|
||||
--- Perform stop route command
|
||||
--- Create a stop route command, which returns a string containing the command.
|
||||
-- Use the result in the method @{#CONTROLLABLE.SetCommand}().
|
||||
-- A value of true will make the ground group stop, a value of false will make it continue.
|
||||
-- Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.
|
||||
--
|
||||
-- Example missions:
|
||||
--
|
||||
-- * GRP-310
|
||||
--
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #boolean StopRoute
|
||||
-- @param #boolean StopRoute true if the ground unit needs to stop, false if it needs to continue to move.
|
||||
-- @return Dcs.DCSTasking.Task#Task
|
||||
function CONTROLLABLE:CommandStopRoute( StopRoute, Index )
|
||||
self:F2( { StopRoute, Index } )
|
||||
function CONTROLLABLE:CommandStopRoute( StopRoute )
|
||||
self:F2( { StopRoute } )
|
||||
|
||||
local CommandStopRoute = {
|
||||
id = 'StopRoute',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170325_0623' )
|
||||
env.info( 'Moose Generation Timestamp: 20170325_2056' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@ -14305,12 +14305,20 @@ function CONTROLLABLE:CommandSwitchWayPoint( FromWayPoint, ToWayPoint )
|
||||
return CommandSwitchWayPoint
|
||||
end
|
||||
|
||||
--- Perform stop route command
|
||||
--- Create a stop route command, which returns a string containing the command.
|
||||
-- Use the result in the method @{#CONTROLLABLE.SetCommand}().
|
||||
-- A value of true will make the ground group stop, a value of false will make it continue.
|
||||
-- Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.
|
||||
--
|
||||
-- Example missions:
|
||||
--
|
||||
-- * GRP-310
|
||||
--
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #boolean StopRoute
|
||||
-- @param #boolean StopRoute true if the ground unit needs to stop, false if it needs to continue to move.
|
||||
-- @return Dcs.DCSTasking.Task#Task
|
||||
function CONTROLLABLE:CommandStopRoute( StopRoute, Index )
|
||||
self:F2( { StopRoute, Index } )
|
||||
function CONTROLLABLE:CommandStopRoute( StopRoute )
|
||||
self:F2( { StopRoute } )
|
||||
|
||||
local CommandStopRoute = {
|
||||
id = 'StopRoute',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170325_0623' )
|
||||
env.info( 'Moose Generation Timestamp: 20170325_2056' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@ -14305,12 +14305,20 @@ function CONTROLLABLE:CommandSwitchWayPoint( FromWayPoint, ToWayPoint )
|
||||
return CommandSwitchWayPoint
|
||||
end
|
||||
|
||||
--- Perform stop route command
|
||||
--- Create a stop route command, which returns a string containing the command.
|
||||
-- Use the result in the method @{#CONTROLLABLE.SetCommand}().
|
||||
-- A value of true will make the ground group stop, a value of false will make it continue.
|
||||
-- Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.
|
||||
--
|
||||
-- Example missions:
|
||||
--
|
||||
-- * GRP-310
|
||||
--
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #boolean StopRoute
|
||||
-- @param #boolean StopRoute true if the ground unit needs to stop, false if it needs to continue to move.
|
||||
-- @return Dcs.DCSTasking.Task#Task
|
||||
function CONTROLLABLE:CommandStopRoute( StopRoute, Index )
|
||||
self:F2( { StopRoute, Index } )
|
||||
function CONTROLLABLE:CommandStopRoute( StopRoute )
|
||||
self:F2( { StopRoute } )
|
||||
|
||||
local CommandStopRoute = {
|
||||
id = 'StopRoute',
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
---GRP-310 - Command StopRouteCAP-001 - Combat Air Patrol
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 25 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
-- A ground unit is moving.
|
||||
-- Using the command CommandStopMove it will stop moving after 10 seconds.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the ground group stopping to move.
|
||||
--
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroundGroup
|
||||
--
|
||||
function StopMove( GroundGroup )
|
||||
|
||||
BASE:E("Stop")
|
||||
local Command = GroundGroup:CommandStopRoute( true )
|
||||
GroundGroup:SetCommand(Command)
|
||||
|
||||
end
|
||||
|
||||
function StartMove( GroundGroup )
|
||||
|
||||
BASE:E("Start")
|
||||
local Command = GroundGroup:CommandStopRoute( false )
|
||||
GroundGroup:SetCommand(Command)
|
||||
|
||||
end
|
||||
|
||||
GroundGroup = GROUP:FindByName( "Ground" )
|
||||
|
||||
Scheduler = SCHEDULER:New( nil )
|
||||
ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 )
|
||||
ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 )
|
||||
|
||||
|
||||
Binary file not shown.
@ -913,9 +913,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
|
||||
|
||||
|
||||
|
||||
<p> This table contains the targets detected during patrol.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -246,9 +246,9 @@ This is different from the EnRoute tasks, where the targets of the task need to
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).CommandStopRoute">CONTROLLABLE:CommandStopRoute(StopRoute, Index)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).CommandStopRoute">CONTROLLABLE:CommandStopRoute(StopRoute)</a></td>
|
||||
<td class="summary">
|
||||
<p>Perform stop route command</p>
|
||||
<p>Create a stop route command, which returns a string containing the command.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -794,23 +794,31 @@ A speed can be given in km/h.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CONTROLLABLE).CommandStopRoute" >
|
||||
<strong>CONTROLLABLE:CommandStopRoute(StopRoute, Index)</strong>
|
||||
<strong>CONTROLLABLE:CommandStopRoute(StopRoute)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Perform stop route command</p>
|
||||
<p>Create a stop route command, which returns a string containing the command.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
|
||||
<p>Use the result in the method <a href="##(CONTROLLABLE).SetCommand">CONTROLLABLE.SetCommand</a>().
|
||||
A value of true will make the ground group stop, a value of false will make it continue.
|
||||
Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.</p>
|
||||
|
||||
<p>Example missions: </p>
|
||||
|
||||
<ul>
|
||||
<li>GRP-310
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean StopRoute </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
<p><code><em>#boolean StopRoute </em></code>:
|
||||
true if the ground unit needs to stop, false if it needs to continue to move.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -191,6 +191,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(MOVEMENT).AliveUnits" >
|
||||
<strong>MOVEMENT.AliveUnits</strong>
|
||||
</a>
|
||||
@ -199,6 +200,9 @@ on defined intervals (currently every minute).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Contains the counter how many units are currently alive</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -1347,7 +1347,6 @@ The new calculated POINT_VEC2.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(POINT_VEC2).z" >
|
||||
<strong>POINT_VEC2.z</strong>
|
||||
</a>
|
||||
|
||||
@ -872,6 +872,12 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2312,9 +2318,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Overwrite unit names by default with group name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -3289,6 +3292,20 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user