diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 808fb28ec..91680a842 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -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', diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua index 9aca34abf..459d74d40 100644 --- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua +++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua @@ -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', diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 9aca34abf..459d74d40 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -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', diff --git a/Moose Test Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua b/Moose Test Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua new file mode 100644 index 000000000..0246c8934 --- /dev/null +++ b/Moose Test Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua @@ -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 ) + + diff --git a/Moose Test Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz b/Moose Test Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz new file mode 100644 index 000000000..52b80a623 Binary files /dev/null and b/Moose Test Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz differ diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index 20cd2b005..f4e911447 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -913,9 +913,6 @@ Use the method AIPATROLZONE.M - -

This table contains the targets detected during patrol.

-
diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html index fa850fb75..0ee848d84 100644 --- a/docs/Documentation/Controllable.html +++ b/docs/Documentation/Controllable.html @@ -246,9 +246,9 @@ This is different from the EnRoute tasks, where the targets of the task need to - CONTROLLABLE:CommandStopRoute(StopRoute, Index) + CONTROLLABLE:CommandStopRoute(StopRoute) -

Perform stop route command

+

Create a stop route command, which returns a string containing the command.

@@ -794,23 +794,31 @@ A speed can be given in km/h.

-CONTROLLABLE:CommandStopRoute(StopRoute, Index) +CONTROLLABLE:CommandStopRoute(StopRoute)
-

Perform stop route command

+

Create a stop route command, which returns a string containing the command.

-

Parameters

+ +

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:

+ + + +

Parameter

diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/MOVEMENT.html index 2ec03bdbd..53e309a7e 100644 --- a/docs/Documentation/MOVEMENT.html +++ b/docs/Documentation/MOVEMENT.html @@ -191,6 +191,7 @@ on defined intervals (currently every minute).

+ #number MOVEMENT.AliveUnits @@ -199,6 +200,9 @@ on defined intervals (currently every minute).

+ +

Contains the counter how many units are currently alive

+
diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index b1b50b793..2f03970b6 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -1347,7 +1347,6 @@ The new calculated POINT_VEC2.

- POINT_VEC2.z diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index ee08c8d38..da89e649b 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -872,6 +872,12 @@ and any spaces before and after the resulting name are removed.

SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) + + + + SPAWN.uncontrolled + + @@ -2312,9 +2318,6 @@ when nothing was spawned.

- -

Overwrite unit names by default with group name.

-
@@ -3289,6 +3292,20 @@ True = Continue Scheduler

+ +
+
+
+ + + +SPAWN.uncontrolled + +
+
+ + +