diff --git a/Moose Development/Dcs/DCScountry.lua b/Moose Development/Dcs/DCScountry.lua
index 5a277d1fb..e390894cd 100644
--- a/Moose Development/Dcs/DCScountry.lua
+++ b/Moose Development/Dcs/DCScountry.lua
@@ -3,6 +3,7 @@
--- @type country
-- @field #country.id id
+country = country -- #country
--- @type country.id
-- @field RUSSIA
@@ -23,4 +24,4 @@
-- @field INSURGENTS
-- @field ABKHAZIA
-- @field SOUTH_OSETIA
--- @field ITALY
\ No newline at end of file
+-- @field ITALY
diff --git a/Moose Development/Moose/Controllable.lua b/Moose Development/Moose/Controllable.lua
index 5cf7b8c1d..db46f5dae 100644
--- a/Moose Development/Moose/Controllable.lua
+++ b/Moose Development/Moose/Controllable.lua
@@ -353,8 +353,20 @@ end
-- @param #number FromWayPoint
-- @param #number ToWayPoint
-- @return DCSTask#Task
-function CONTROLLABLE:CommandSwitchWayPoint( FromWayPoint, ToWayPoint, Index )
- self:F2( { FromWayPoint, ToWayPoint, Index } )
+-- @usage
+-- --- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
+-- HeliGroup = GROUP:FindByName( "Helicopter" )
+--
+-- --- Route the helicopter back to the FARP after 60 seconds.
+-- -- We use the SCHEDULER class to do this.
+-- SCHEDULER:New( nil,
+-- function( HeliGroup )
+-- local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
+-- HeliGroup:SetCommand( CommandRTB )
+-- end, { HeliGroup }, 90
+-- )
+function CONTROLLABLE:CommandSwitchWayPoint( FromWayPoint, ToWayPoint )
+ self:F2( { FromWayPoint, ToWayPoint } )
local CommandSwitchWayPoint = {
id = 'SwitchWaypoint',
@@ -392,7 +404,7 @@ end
--- (AIR) Attack a Controllable.
-- @param #CONTROLLABLE self
--- @param Controllable#CONTROLLABLE AttackControllable The Controllable to be attacked.
+-- @param Controllable#CONTROLLABLE AttackGroup The Controllable to be attacked.
-- @param #number WeaponType (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
-- @param DCSTypes#AI.Task.WeaponExpend WeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
-- @param #number AttackQty (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
@@ -400,8 +412,8 @@ end
-- @param DCSTypes#Distance Altitude (optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.
-- @param #boolean AttackQtyLimit (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackControllable" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
-- @return DCSTask#Task The DCS task structure.
-function CONTROLLABLE:TaskAttackControllable( AttackControllable, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit )
- self:F2( { self.ControllableName, AttackControllable, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit } )
+function CONTROLLABLE:TaskAttackGroup( AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit )
+ self:F2( { self.ControllableName, AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit } )
-- AttackControllable = {
-- id = 'AttackControllable',
@@ -431,7 +443,7 @@ function CONTROLLABLE:TaskAttackControllable( AttackControllable, WeaponType, We
local DCSTask
DCSTask = { id = 'AttackControllable',
params = {
- controllableId = AttackControllable:GetID(),
+ controllableId = AttackGroup:GetID(),
weaponType = WeaponType,
expend = WeaponExpend,
attackQty = AttackQty,
@@ -923,13 +935,13 @@ end
-- The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
-- If the task is assigned to the controllable lead unit will be a FAC.
-- @param #CONTROLLABLE self
--- @param Controllable#CONTROLLABLE AttackControllable Target CONTROLLABLE.
+-- @param Controllable#CONTROLLABLE AttackGroup Target CONTROLLABLE.
-- @param #number WeaponType Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
-- @param DCSTypes#AI.Task.Designation Designation (optional) Designation type.
-- @param #boolean Datalink (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.
-- @return DCSTask#Task The DCS task structure.
-function CONTROLLABLE:TaskFAC_AttackControllable( AttackControllable, WeaponType, Designation, Datalink )
- self:F2( { self.ControllableName, AttackControllable, WeaponType, Designation, Datalink } )
+function CONTROLLABLE:TaskFAC_AttackGroup( AttackGroup, WeaponType, Designation, Datalink )
+ self:F2( { self.ControllableName, AttackGroup, WeaponType, Designation, Datalink } )
-- FAC_AttackControllable = {
-- id = 'FAC_AttackControllable',
@@ -944,7 +956,7 @@ function CONTROLLABLE:TaskFAC_AttackControllable( AttackControllable, WeaponType
local DCSTask
DCSTask = { id = 'FAC_AttackControllable',
params = {
- controllableId = AttackControllable:GetID(),
+ controllableId = AttackGroup:GetID(),
weaponType = WeaponType,
designation = Designation,
datalink = Datalink,
@@ -1027,7 +1039,7 @@ end
--- (AIR) Engaging a controllable. The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.
-- @param #CONTROLLABLE self
--- @param Controllable#CONTROLLABLE AttackControllable The Controllable to be attacked.
+-- @param Controllable#CONTROLLABLE AttackGroup The Controllable to be attacked.
-- @param #number Priority All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.
-- @param #number WeaponType (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
-- @param DCSTypes#AI.Task.WeaponExpend WeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
@@ -1036,8 +1048,8 @@ end
-- @param DCSTypes#Distance Altitude (optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.
-- @param #boolean AttackQtyLimit (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackControllable" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
-- @return DCSTask#Task The DCS task structure.
-function CONTROLLABLE:EnRouteTaskEngageControllable( AttackControllable, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit )
- self:F2( { self.ControllableName, AttackControllable, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit } )
+function CONTROLLABLE:EnRouteTaskEngageGroup( AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit )
+ self:F2( { self.ControllableName, AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit } )
-- EngageControllable = {
-- id = 'EngageControllable ',
@@ -1068,7 +1080,7 @@ function CONTROLLABLE:EnRouteTaskEngageControllable( AttackControllable, Priorit
local DCSTask
DCSTask = { id = 'EngageControllable',
params = {
- controllableId = AttackControllable:GetID(),
+ controllableId = AttackGroup:GetID(),
weaponType = WeaponType,
expend = WeaponExpend,
attackQty = AttackQty,
@@ -1211,14 +1223,14 @@ end
-- The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
-- If the task is assigned to the controllable lead unit will be a FAC.
-- @param #CONTROLLABLE self
--- @param Controllable#CONTROLLABLE AttackControllable Target CONTROLLABLE.
+-- @param Controllable#CONTROLLABLE AttackGroup Target CONTROLLABLE.
-- @param #number Priority All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.
-- @param #number WeaponType Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
-- @param DCSTypes#AI.Task.Designation Designation (optional) Designation type.
-- @param #boolean Datalink (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.
-- @return DCSTask#Task The DCS task structure.
-function CONTROLLABLE:EnRouteTaskFAC_EngageControllable( AttackControllable, Priority, WeaponType, Designation, Datalink )
- self:F2( { self.ControllableName, AttackControllable, WeaponType, Priority, Designation, Datalink } )
+function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponType, Designation, Datalink )
+ self:F2( { self.ControllableName, AttackGroup, WeaponType, Priority, Designation, Datalink } )
-- FAC_EngageControllable = {
-- id = 'FAC_EngageControllable',
@@ -1234,7 +1246,7 @@ function CONTROLLABLE:EnRouteTaskFAC_EngageControllable( AttackControllable, Pri
local DCSTask
DCSTask = { id = 'FAC_EngageControllable',
params = {
- controllableId = AttackControllable:GetID(),
+ controllableId = AttackGroup:GetID(),
weaponType = WeaponType,
designation = Designation,
datalink = Datalink,
diff --git a/Moose Development/Moose/Database.lua b/Moose Development/Moose/Database.lua
index c75bafc30..1dcc70cdb 100644
--- a/Moose Development/Moose/Database.lua
+++ b/Moose Development/Moose/Database.lua
@@ -380,6 +380,14 @@ function DATABASE:_RegisterTemplate( GroupTemplate, CoalitionID, CategoryID, Cou
self:E( TraceTable )
end
+function DATABASE:GetGroupTemplate( GroupName )
+ local GroupTemplate = self.Templates.Groups[GroupName].Template
+ GroupTemplate.SpawnCoalitionID = self.Templates.Groups[GroupName].CoalitionID
+ GroupTemplate.SpawnCategoryID = self.Templates.Groups[GroupName].CategoryID
+ GroupTemplate.SpawnCountryID = self.Templates.Groups[GroupName].CountryID
+ return GroupTemplate
+end
+
function DATABASE:GetCoalitionFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CoalitionID
end
diff --git a/Moose Development/Moose/Group.lua b/Moose Development/Moose/Group.lua
index 99c092ffd..039e4d0ae 100644
--- a/Moose Development/Moose/Group.lua
+++ b/Moose Development/Moose/Group.lua
@@ -31,7 +31,8 @@
-- 1.2) GROUP task methods
-- -----------------------
-- Several group task methods are available that help you to prepare tasks.
--- These methods return a string consisting of the task description, which can then be given to either a @{Group#GROUP.PushTask} or @{Group#SetTask} method to assign the task to the GROUP.
+-- These methods return a string consisting of the task description, which can then be given to either a
+-- @{Controllable#CONTROLLABLE.PushTask} or @{Controllable#CONTROLLABLE.SetTask} method to assign the task to the GROUP.
-- Tasks are specific for the category of the GROUP, more specific, for AIR, GROUND or AIR and GROUND.
-- Each task description where applicable indicates for which group category the task is valid.
-- There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.
@@ -43,63 +44,63 @@
--
-- Find below a list of the **assigned task** methods:
--
--- * @{#GROUP.TaskAttackGroup}: (AIR) Attack a Group.
--- * @{#GROUP.TaskAttackMapObject}: (AIR) Attacking the map object (building, structure, e.t.c).
--- * @{#GROUP.TaskAttackUnit}: (AIR) Attack the Unit.
--- * @{#GROUP.TaskBombing}: (AIR) Delivering weapon at the point on the ground.
--- * @{#GROUP.TaskBombingRunway}: (AIR) Delivering weapon on the runway.
--- * @{#GROUP.TaskEmbarking}: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.
--- * @{#GROUP.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location.
--- * @{#GROUP.TaskEscort}: (AIR) Escort another airborne group.
--- * @{#GROUP.TaskFAC_AttackGroup}: (AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.
--- * @{#GROUP.TaskFireAtPoint}: (GROUND) Fire at a VEC2 point until ammunition is finished.
--- * @{#GROUP.TaskFollow}: (AIR) Following another airborne group.
--- * @{#GROUP.TaskHold}: (GROUND) Hold ground group from moving.
--- * @{#GROUP.TaskHoldPosition}: (AIR) Hold position at the current position of the first unit of the group.
--- * @{#GROUP.TaskLand}: (AIR HELICOPTER) Landing at the ground. For helicopters only.
--- * @{#GROUP.TaskLandAtZone}: (AIR) Land the group at a @{Zone#ZONE_RADIUS).
--- * @{#GROUP.TaskOrbitCircle}: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.
--- * @{#GROUP.TaskOrbitCircleAtVec2}: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
--- * @{#GROUP.TaskRefueling}: (AIR) Refueling from the nearest tanker. No parameters.
--- * @{#GROUP.TaskRoute}: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
--- * @{#GROUP.TaskRouteToVec2}: (AIR + GROUND) Make the Group move to a given point.
--- * @{#GROUP.TaskRouteToVec3}: (AIR + GROUND) Make the Group move to a given point.
--- * @{#GROUP.TaskRouteToZone}: (AIR + GROUND) Route the group to a given zone.
--- * @{#GROUP.TaskReturnToBase}: (AIR) Route the group to an airbase.
+-- * @{Controllable#CONTROLLABLE.TaskAttackGroup}: (AIR) Attack a Group.
+-- * @{Controllable#CONTROLLABLE.TaskAttackMapObject}: (AIR) Attacking the map object (building, structure, e.t.c).
+-- * @{Controllable#CONTROLLABLE.TaskAttackUnit}: (AIR) Attack the Unit.
+-- * @{Controllable#CONTROLLABLE.TaskBombing}: (Controllable#CONTROLLABLEDelivering weapon at the point on the ground.
+-- * @{Controllable#CONTROLLABLE.TaskBombingRunway}: (AIR) Delivering weapon on the runway.
+-- * @{Controllable#CONTROLLABLE.TaskEmbarking}: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.
+-- * @{Controllable#CONTROLLABLE.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location.
+-- * @{Controllable#CONTROLLABLE.TaskEscort}: (AIR) Escort another airborne group.
+-- * @{Controllable#CONTROLLABLE.TaskFAC_AttackGroup}: (AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.
+-- * @{Controllable#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire at a VEC2 point until ammunition is finished.
+-- * @{Controllable#CONTROLLABLE.TaskFollow}: (AIR) Following another airborne group.
+-- * @{Controllable#CONTROLLABLE.TaskHold}: (GROUND) Hold ground group from moving.
+-- * @{Controllable#CONTROLLABLE.TaskHoldPosition}: (AIR) Hold position at the current position of the first unit of the group.
+-- * @{Controllable#CONTROLLABLE.TaskLand}: (AIR HELICOPTER) Landing at the ground. For helicopters only.
+-- * @{Controllable#CONTROLLABLE.TaskLandAtZone}: (AIR) Land the group at a @{Zone#ZONE_RADIUS).
+-- * @{Controllable#CONTROLLABLE.TaskOrbitCircle}: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.
+-- * @{Controllable#CONTROLLABLE.TaskOrbitCircleAtVec2}: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
+-- * @{Controllable#CONTROLLABLE.TaskRefueling}: (AIR) Refueling from the nearest tanker. No parameters.
+-- * @{Controllable#CONTROLLABLE.TaskRoute}: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
+-- * @{Controllable#CONTROLLABLE.TaskRouteToVec2}: (AIR + GROUND) Make the Group move to a given point.
+-- * @{Controllable#CONTROLLABLE.TaskRouteToVec3}: (AIR + GROUND) Make the Group move to a given point.
+-- * @{Controllable#CONTROLLABLE.TaskRouteToZone}: (AIR + GROUND) Route the group to a given zone.
+-- * @{Controllable#CONTROLLABLE.TaskReturnToBase}: (AIR) Route the group to an airbase.
--
-- ### 1.2.2) EnRoute task methods
--
-- EnRoute tasks require the targets of the task need to be detected by the group (using its sensors) before the task can be executed:
--
--- * @{#GROUP.EnRouteTaskAWACS}: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
--- * @{#GROUP.EnRouteTaskEngageGroup}: (AIR) Engaging a group. The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.
--- * @{#GROUP.EnRouteTaskEngageTargets}: (AIR) Engaging targets of defined types.
--- * @{#GROUP.EnRouteTaskEWR}: (AIR) Attack the Unit.
--- * @{#GROUP.EnRouteTaskFAC}: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.
--- * @{#GROUP.EnRouteTaskFAC_EngageGroup}: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose the target (enemy ground group) as well as other assigned targets.
--- * @{#GROUP.EnRouteTaskTanker}: (AIR) Aircraft will act as a tanker for friendly units. No parameters.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskAWACS}: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskEngageGroup}: (AIR) Engaging a group. The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskEngageTargets}: (AIR) Engaging targets of defined types.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskEWR}: (AIR) Attack the Unit.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskFAC}: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskFAC_EngageGroup}: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose the target (enemy ground group) as well as other assigned targets.
+-- * @{Controllable#CONTROLLABLE.EnRouteTaskTanker}: (AIR) Aircraft will act as a tanker for friendly units. No parameters.
--
-- ### 1.2.3) Preparation task methods
--
-- There are certain task methods that allow to tailor the task behaviour:
--
--- * @{#GROUP.TaskWrappedAction}: Return a WrappedAction Task taking a Command.
--- * @{#GROUP.TaskCombo}: Return a Combo Task taking an array of Tasks.
--- * @{#GROUP.TaskCondition}: Return a condition section for a controlled task.
--- * @{#GROUP.TaskControlled}: Return a Controlled Task taking a Task and a TaskCondition.
+-- * @{Controllable#CONTROLLABLE.TaskWrappedAction}: Return a WrappedAction Task taking a Command.
+-- * @{Controllable#CONTROLLABLE.TaskCombo}: Return a Combo Task taking an array of Tasks.
+-- * @{Controllable#CONTROLLABLE.TaskCondition}: Return a condition section for a controlled task.
+-- * @{Controllable#CONTROLLABLE.TaskControlled}: Return a Controlled Task taking a Task and a TaskCondition.
--
-- ### 1.2.4) Obtain the mission from group templates
--
-- Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:
--
--- * @{#GROUP.TaskMission}: (AIR + GROUND) Return a mission task from a mission template.
+-- * @{Controllable#CONTROLLABLE.TaskMission}: (AIR + GROUND) Return a mission task from a mission template.
--
-- 1.3) GROUP Command methods
-- --------------------------
--- Group **command methods** prepare the execution of commands using the @{#GROUP.SetCommand} method:
+-- Group **command methods** prepare the execution of commands using the @{Controllable#CONTROLLABLE.SetCommand} method:
--
--- * @{#GROUP.CommandDoScript}: Do Script command.
--- * @{#GROUP.CommandSwitchWayPoint}: Perform a switch waypoint command.
+-- * @{Controllable#CONTROLLABLE.CommandDoScript}: Do Script command.
+-- * @{Controllable#CONTROLLABLE.CommandSwitchWayPoint}: Perform a switch waypoint command.
--
-- 1.4) GROUP Option methods
-- -------------------------
@@ -107,31 +108,31 @@
--
-- ### 1.4.1) Rule of Engagement:
--
--- * @{#GROUP.OptionROEWeaponFree}
--- * @{#GROUP.OptionROEOpenFire}
--- * @{#GROUP.OptionROEReturnFire}
--- * @{#GROUP.OptionROEEvadeFire}
+-- * @{Controllable#CONTROLLABLE.OptionROEWeaponFree}
+-- * @{Controllable#CONTROLLABLE.OptionROEOpenFire}
+-- * @{Controllable#CONTROLLABLE.OptionROEReturnFire}
+-- * @{Controllable#CONTROLLABLE.OptionROEEvadeFire}
--
-- To check whether an ROE option is valid for a specific group, use:
--
--- * @{#GROUP.OptionROEWeaponFreePossible}
--- * @{#GROUP.OptionROEOpenFirePossible}
--- * @{#GROUP.OptionROEReturnFirePossible}
--- * @{#GROUP.OptionROEEvadeFirePossible}
+-- * @{Controllable#CONTROLLABLE.OptionROEWeaponFreePossible}
+-- * @{Controllable#CONTROLLABLE.OptionROEOpenFirePossible}
+-- * @{Controllable#CONTROLLABLE.OptionROEReturnFirePossible}
+-- * @{Controllable#CONTROLLABLE.OptionROEEvadeFirePossible}
--
-- ### 1.4.2) Rule on thread:
--
--- * @{#GROUP.OptionROTNoReaction}
--- * @{#GROUP.OptionROTPassiveDefense}
--- * @{#GROUP.OptionROTEvadeFire}
--- * @{#GROUP.OptionROTVertical}
+-- * @{Controllable#CONTROLLABLE.OptionROTNoReaction}
+-- * @{Controllable#CONTROLLABLE.OptionROTPassiveDefense}
+-- * @{Controllable#CONTROLLABLE.OptionROTEvadeFire}
+-- * @{Controllable#CONTROLLABLE.OptionROTVertical}
--
-- To test whether an ROT option is valid for a specific group, use:
--
--- * @{#GROUP.OptionROTNoReactionPossible}
--- * @{#GROUP.OptionROTPassiveDefensePossible}
--- * @{#GROUP.OptionROTEvadeFirePossible}
--- * @{#GROUP.OptionROTVerticalPossible}
+-- * @{Controllable#CONTROLLABLE.OptionROTNoReactionPossible}
+-- * @{Controllable#CONTROLLABLE.OptionROTPassiveDefensePossible}
+-- * @{Controllable#CONTROLLABLE.OptionROTEvadeFirePossible}
+-- * @{Controllable#CONTROLLABLE.OptionROTVerticalPossible}
--
-- 1.5) GROUP Zone validation methods
-- ----------------------------------
@@ -708,14 +709,34 @@ function GROUP:GetMaxHeight()
end
---- @param Group#GROUP self
+-- SPAWNING
+
+--- Respawn the @{GROUP} using a (tweaked) template of the Group.
+-- The template must be retrieved with the @{Group#GROUP.GetTemplate}() function.
+-- The template contains all the definitions as declared within the mission file.
+-- To understand templates, do the following:
+--
+-- * unpack your .miz file into a directory using 7-zip.
+-- * browse in the directory created to the file **mission**.
+-- * open the file and search for the country group definitions.
+--
+-- Your group template will contain the fields as described within the mission file.
+--
+-- This function will:
+--
+-- * Get the current position and heading of the group.
+-- * When the group is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
+-- * Then it will destroy the current alive group.
+-- * And it will respawn the group using your new template definition.
+-- @param Group#GROUP self
+-- @param #table Template The template of the Group retrieved with GROUP:GetTemplate()
function GROUP:Respawn( Template )
local Vec3 = self:GetPointVec3()
- --Template.x = Vec3.x
- --Template.y = Vec3.z
- Template.x = nil
- Template.y = nil
+ Template.x = Vec3.x
+ Template.y = Vec3.z
+ --Template.x = nil
+ --Template.y = nil
self:E( #Template.units )
for UnitID, UnitData in pairs( self:GetUnits() ) do
@@ -732,16 +753,49 @@ function GROUP:Respawn( Template )
end
end
+ self:Destroy()
_DATABASE:Spawn( Template )
-
end
+--- Returns the group template from the @{DATABASE} (_DATABASE object).
+-- @param #GROUP self
+-- @return #table
function GROUP:GetTemplate()
-
- return _DATABASE.Templates.Groups[self:GetName()].Template
-
+ local GroupName = self:GetName()
+ self:E( GroupName )
+ return _DATABASE:GetGroupTemplate( GroupName )
end
+--- Sets the controlled status in a Template.
+-- @param #GROUP self
+-- @param #boolean Controlled true is controlled, false is uncontrolled.
+-- @return #table
+function GROUP:SetTemplateControlled( Template, Controlled )
+ Template.uncontrolled = not Controlled
+ return Template
+end
+
+--- Sets the CountryID of the group in a Template.
+-- @param #GROUP self
+-- @param DCScountry#country.id CountryID The country ID.
+-- @return #table
+function GROUP:SetTemplateCountry( Template, CountryID )
+ Template.CountryID = CountryID
+ return Template
+end
+
+--- Sets the CoalitionID of the group in a Template.
+-- @param #GROUP self
+-- @param DCSCoalitionObject#coalition.side CoalitionID The coalition ID.
+-- @return #table
+function GROUP:SetTemplateCoalition( Template, CoalitionID )
+ Template.CoalitionID = CoalitionID
+ return Template
+end
+
+
+
+
--- Return the mission template of the group.
-- @param #GROUP self
-- @return #table The MissionTemplate
diff --git a/Moose Development/Moose/Zone.lua b/Moose Development/Moose/Zone.lua
index d1cc8baef..fde02747e 100644
--- a/Moose Development/Moose/Zone.lua
+++ b/Moose Development/Moose/Zone.lua
@@ -18,8 +18,9 @@
-- * @{Zone#ZONE_BASE}: The ZONE_BASE class defining the base for all other zone classes.
-- * @{Zone#ZONE_RADIUS}: The ZONE_RADIUS class defined by a zone name, a location and a radius.
-- * @{Zone#ZONE}: The ZONE class, defined by the zone name as defined within the Mission Editor.
--- * @{Zone#ZONE_UNIT}: The ZONE_UNIT class defined by a zone around a @{Unit#UNIT} with a radius.
--- * @{Zone#ZONE_POLYGON}: The ZONE_POLYGON class defined by a sequence of @{Group#GROUP} waypoints within the Mission Editor, forming a polygon.
+-- * @{Zone#ZONE_UNIT}: The ZONE_UNIT class defines by a zone around a @{Unit#UNIT} with a radius.
+-- * @{Zone#ZONE_GROUP}: The ZONE_GROUP class defines by a zone around a @{Group#GROUP} with a radius.
+-- * @{Zone#ZONE_POLYGON}: The ZONE_POLYGON class defines by a sequence of @{Group#GROUP} waypoints within the Mission Editor, forming a polygon.
--
-- Each zone implements two polymorphic functions defined in @{Zone#ZONE_BASE}:
--
@@ -52,7 +53,13 @@
--
-- ===
--
--- 5) @{Zone#ZONE_POLYGON} class, extends @{Zone#ZONE_BASE}
+-- 5) @{Zone#ZONE_GROUP} class, extends @{Zone#ZONE_RADIUS}
+-- =======================================================
+-- The ZONE_GROUP class defines by a zone around a @{Group#GROUP} with a radius. The current leader of the group defines the center of the zone.
+--
+-- ===
+--
+-- 6) @{Zone#ZONE_POLYGON} class, extends @{Zone#ZONE_BASE}
-- ========================================================
-- The ZONE_POLYGON class defined by a sequence of @{Group#GROUP} waypoints within the Mission Editor, forming a polygon.
--
@@ -62,13 +69,6 @@
-- @author FlightControl
-
-
-
-
-
-
-
--- The ZONE_BASE class
-- @type ZONE_BASE
-- @field #string ZoneName Name of the zone.
@@ -431,6 +431,64 @@ function ZONE_UNIT:GetRandomVec2()
return Point
end
+
+--- The ZONE_GROUP class defined by a zone around a @{Group}, taking the average center point of all the units within the Group, with a radius.
+-- @type ZONE_GROUP
+-- @field Group#GROUP ZoneGROUP
+-- @extends Zone#ZONE_RADIUS
+ZONE_GROUP = {
+ ClassName="ZONE_GROUP",
+ }
+
+--- Constructor to create a ZONE_GROUP instance, taking the zone name, a zone @{Group#GROUP} and a radius.
+-- @param #ZONE_GROUP self
+-- @param #string ZoneName Name of the zone.
+-- @param Group#GROUP ZoneGROUP The @{Group} as the center of the zone.
+-- @param DCSTypes#Distance Radius The radius of the zone.
+-- @return #ZONE_GROUP self
+function ZONE_GROUP:New( ZoneName, ZoneGROUP, Radius )
+ local self = BASE:Inherit( self, ZONE_RADIUS:New( ZoneName, ZoneGROUP:GetPointVec2(), Radius ) )
+ self:F( { ZoneName, ZoneGROUP:GetPointVec2(), Radius } )
+
+ self.ZoneGROUP = ZoneGROUP
+
+ return self
+end
+
+
+--- Returns the current location of the @{Group}.
+-- @param #ZONE_GROUP self
+-- @return DCSTypes#Vec2 The location of the zone based on the @{Group} location.
+function ZONE_GROUP:GetPointVec2()
+ self:F( self.ZoneName )
+
+ local ZonePointVec2 = self.ZoneGROUP:GetPointVec2()
+
+ self:T( { ZonePointVec2 } )
+
+ return ZonePointVec2
+end
+
+--- Returns a random location within the zone of the @{Group}.
+-- @param #ZONE_GROUP self
+-- @return DCSTypes#Vec2 The random location of the zone based on the @{Group} location.
+function ZONE_GROUP:GetRandomVec2()
+ self:F( self.ZoneName )
+
+ local Point = {}
+ local PointVec2 = self.ZoneGROUP:GetPointVec2()
+
+ local angle = math.random() * math.pi*2;
+ Point.x = PointVec2.x + math.cos( angle ) * math.random() * self:GetRadius();
+ Point.y = PointVec2.y + math.sin( angle ) * math.random() * self:GetRadius();
+
+ self:T( { Point } )
+
+ return Point
+end
+
+
+
-- Polygons
--- The ZONE_POLYGON_BASE class defined by an array of @{DCSTypes#Vec2}, forming a polygon.
diff --git a/Moose Test Missions/MOOSE_Test_Template.miz b/Moose Test Missions/MOOSE_Test_Template.miz
new file mode 100644
index 000000000..704fd8d76
Binary files /dev/null and b/Moose Test Missions/MOOSE_Test_Template.miz differ
diff --git a/Moose Test Missions/Moose_Test_GROUP_SwitchWayPoint/MOOSE_Test_GROUP_SwitchWayPoint.miz b/Moose Test Missions/Moose_Test_GROUP_SwitchWayPoint/MOOSE_Test_GROUP_SwitchWayPoint.miz
new file mode 100644
index 000000000..84912285c
Binary files /dev/null and b/Moose Test Missions/Moose_Test_GROUP_SwitchWayPoint/MOOSE_Test_GROUP_SwitchWayPoint.miz differ
diff --git a/Moose Test Missions/Moose_Test_GROUP_SwitchWayPoint/Moose_Test_GROUP_SwitchWayPoint.lua b/Moose Test Missions/Moose_Test_GROUP_SwitchWayPoint/Moose_Test_GROUP_SwitchWayPoint.lua
new file mode 100644
index 000000000..03258b2cf
--- /dev/null
+++ b/Moose Test Missions/Moose_Test_GROUP_SwitchWayPoint/Moose_Test_GROUP_SwitchWayPoint.lua
@@ -0,0 +1,12 @@
+--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
+
+HeliGroup = GROUP:FindByName( "Helicopter" )
+
+--- Route the helicopter back to the FARP after 60 seconds.
+-- We use the SCHEDULER class to do this.
+SCHEDULER:New( nil,
+ function( HeliGroup )
+ local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
+ HeliGroup:SetCommand( CommandRTB )
+ end, { HeliGroup }, 90
+)
diff --git a/Moose Test Missions/Moose_Test_SPAWN_CleanUp/MOOSE_Test_SPAWN_CleanUp.lua b/Moose Test Missions/Moose_Test_SPAWN_CleanUp/MOOSE_Test_SPAWN_CleanUp.lua
new file mode 100644
index 000000000..c0ff838b5
--- /dev/null
+++ b/Moose Test Missions/Moose_Test_SPAWN_CleanUp/MOOSE_Test_SPAWN_CleanUp.lua
@@ -0,0 +1,8 @@
+-- Tests Kutaisi
+-- -------------
+-- Tests the CleanUp functionality.
+-- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground.
+-- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn.
+Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 60 ):SpawnScheduled( 10, 0 )
+Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 )
+
diff --git a/Moose Test Missions/Moose_Test_SPAWN_CleanUp/MOOSE_Test_SPAWN_CleanUp.miz b/Moose Test Missions/Moose_Test_SPAWN_CleanUp/MOOSE_Test_SPAWN_CleanUp.miz
new file mode 100644
index 000000000..c41aaf3da
Binary files /dev/null and b/Moose Test Missions/Moose_Test_SPAWN_CleanUp/MOOSE_Test_SPAWN_CleanUp.miz differ
diff --git a/Moose Test Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.lua b/Moose Test Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.lua
new file mode 100644
index 000000000..ae074449d
--- /dev/null
+++ b/Moose Test Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.lua
@@ -0,0 +1,15 @@
+-- Tests Gudauta
+-- --------------
+-- Limited spawning of groups, scheduled every 30 seconds ...
+Spawn_Plane_Limited_Scheduled = SPAWN:New( "Spawn Plane Limited Scheduled" ):Limit( 2, 20 ):SpawnScheduled( 30, 0 )
+Spawn_Helicopter_Limited_Scheduled = SPAWN:New( "Spawn Helicopter Limited Scheduled" ):Limit( 2, 20 ):SpawnScheduled( 30, 0 )
+Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):Limit( 2, 20 ):SpawnScheduled( 90, 0 )
+
+-- Tests Sukhumi
+-- -------------
+-- Limited spawning of groups, scheduled every seconds with destruction.
+Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled Destroy" ):Limit( 5, 20 ):SpawnScheduled( 10, 0 )
+Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled Destroy" ):Limit( 5, 20 ):SpawnScheduled( 10, 0 )
+Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled Destroy" ):Limit( 5, 20 ):SpawnScheduled( 10, 0 )
+
+
diff --git a/Moose Test Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.miz b/Moose Test Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.miz
new file mode 100644
index 000000000..ebeaacc76
Binary files /dev/null and b/Moose Test Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.miz differ
diff --git a/Moose Training/Documentation/AIBalancer.html b/Moose Training/Documentation/AIBalancer.html
index c07c2ae71..c113e2ea1 100644
--- a/Moose Training/Documentation/AIBalancer.html
+++ b/Moose Training/Documentation/AIBalancer.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Airbase.html b/Moose Training/Documentation/Airbase.html
index 8e13e9b7f..b3024951a 100644
--- a/Moose Training/Documentation/Airbase.html
+++ b/Moose Training/Documentation/Airbase.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
@@ -161,75 +162,9 @@ is implemented in the AIRBASE class as AIRBASE.Get
- | AIRBASE:GetCallSign() |
-
- Returns the Airbase's callsign - the localized string.
- |
-
-
- | AIRBASE:GetCategory() |
-
- Returns the DCS Airbase category as defined within the DCS Airbase Descriptor.
- |
-
-
- | AIRBASE:GetCategoryName() |
-
- Returns the DCS Airbase category name as defined within the DCS Airbase Descriptor.
- |
-
-
- | AIRBASE:GetCoalition() |
-
- Returns coalition of the Airbase.
- |
-
-
- | AIRBASE:GetCountry() |
-
- Returns country of the Airbase.
- |
-
-
- | AIRBASE:GetDCSAirbase() |
+ AIRBASE:GetDCSObject() |
- |
-
-
- | AIRBASE:GetDesc() |
-
- Returns unit descriptor.
- |
-
-
- | AIRBASE:GetID() |
-
- Returns the unit's unique identifier.
- |
-
-
- | AIRBASE:GetName() |
-
- Returns DCS Airbase object name.
- |
-
-
- | AIRBASE:GetPointVec2() |
-
- Returns the DCSTypes#Vec2 vector indicating the point in 2D of the DCS Airbase within the mission.
- |
-
-
- | AIRBASE:GetTypeName() |
-
- Returns the type name of the DCS Airbase.
- |
-
-
- | AIRBASE:IsAlive() |
-
- Returns if the airbase is alive.
|
@@ -347,308 +282,14 @@ self
-
-
-AIRBASE:GetCallSign()
-
-
--
-
-
Returns the Airbase's callsign - the localized string.
-
- Return values
-
- -
-
-
#string:
-The Callsign of the Airbase.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetCategory()
-
-
--
-
-
Returns the DCS Airbase category as defined within the DCS Airbase Descriptor.
-
- Return value
-
-DCSAirbase#Airbase.Category:
-The DCS Airbase Category
-
-
-
-
--
-
-
-AIRBASE:GetCategoryName()
-
-
--
-
-
Returns the DCS Airbase category name as defined within the DCS Airbase Descriptor.
-
- Return value
-
-#string:
-The DCS Airbase Category Name
-
-
-
-
--
-
-
-AIRBASE:GetCoalition()
-
-
--
-
-
Returns coalition of the Airbase.
-
- Return values
-
- -
-
-
DCSCoalitionObject#coalition.side:
-The side of the coalition.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetCountry()
-
-
--
-
-
Returns country of the Airbase.
-
- Return values
-
- -
-
-
DCScountry#country.id:
-The country identifier.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetDCSAirbase()
+
+AIRBASE:GetDCSObject()
-
-
-
-
--
-
-
-AIRBASE:GetDesc()
-
-
--
-
-
Returns unit descriptor.
-
-
-Descriptor type depends on unit category.
-
- Return values
-
- -
-
-
DCSAirbase#Airbase.Desc:
-The Airbase descriptor.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetID()
-
-
--
-
-
Returns the unit's unique identifier.
-
- Return values
-
- -
-
-
DCSAirbase#Airbase.ID:
-Airbase ID
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetName()
-
-
--
-
-
Returns DCS Airbase object name.
-
-
-The function provides access to non-activated units too.
-
- Return values
-
- -
-
-
#string:
-The name of the DCS Airbase.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetPointVec2()
-
-
--
-
-
Returns the DCSTypes#Vec2 vector indicating the point in 2D of the DCS Airbase within the mission.
-
- Return values
-
- -
-
-
DCSTypes#Vec2:
-The 2D point vector of the DCS Airbase.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:GetTypeName()
-
-
--
-
-
Returns the type name of the DCS Airbase.
-
- Return values
-
- -
-
-
#string:
-The type name of the DCS Airbase.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
-
-
-
--
-
-
-AIRBASE:IsAlive()
-
-
--
-
-
Returns if the airbase is alive.
-
- Return values
-
- -
-
-
#boolean:
-true if Airbase is alive.
-
-
- -
-
-
#nil:
-The DCS Airbase is not existing or alive.
-
-
-
diff --git a/Moose Training/Documentation/AirbasePolice.html b/Moose Training/Documentation/AirbasePolice.html
index a6886630e..0e3559636 100644
--- a/Moose Training/Documentation/AirbasePolice.html
+++ b/Moose Training/Documentation/AirbasePolice.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Base.html b/Moose Training/Documentation/Base.html
index c2e1b8b10..dac7fe836 100644
--- a/Moose Training/Documentation/Base.html
+++ b/Moose Training/Documentation/Base.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/CARGO.html b/Moose Training/Documentation/CARGO.html
index 7692b518d..e6dfcbac7 100644
--- a/Moose Training/Documentation/CARGO.html
+++ b/Moose Training/Documentation/CARGO.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/CleanUp.html b/Moose Training/Documentation/CleanUp.html
index 1c06a75c8..f2a0ee524 100644
--- a/Moose Training/Documentation/CleanUp.html
+++ b/Moose Training/Documentation/CleanUp.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Client.html b/Moose Training/Documentation/Client.html
index ff68ca961..b0ae7e2f7 100644
--- a/Moose Training/Documentation/Client.html
+++ b/Moose Training/Documentation/Client.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Controllable.html b/Moose Training/Documentation/Controllable.html
index e20a7afc2..dd406caf8 100644
--- a/Moose Training/Documentation/Controllable.html
+++ b/Moose Training/Documentation/Controllable.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
@@ -253,7 +254,7 @@ This is different from the EnRoute tasks, where the targets of the task need to
- | CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index) |
+ CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) |
Perform a switch waypoint command
|
@@ -289,7 +290,7 @@ This is different from the EnRoute tasks, where the targets of the task need to
- | CONTROLLABLE:EnRouteTaskEngageControllable(AttackControllable, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) |
+ CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) |
(AIR) Engaging a controllable.
|
@@ -313,7 +314,7 @@ This is different from the EnRoute tasks, where the targets of the task need to
- | CONTROLLABLE:EnRouteTaskFAC_EngageControllable(AttackControllable, Priority, WeaponType, Designation, Datalink) |
+ CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) |
(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.
|
@@ -488,7 +489,7 @@ A speed can be given in km/h.
- | CONTROLLABLE:TaskAttackControllable(AttackControllable, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) |
+ CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) |
(AIR) Attack a Controllable.
|
@@ -554,7 +555,7 @@ A speed can be given in km/h.
- | CONTROLLABLE:TaskFAC_AttackControllable(AttackControllable, WeaponType, Designation, Datalink) |
+ CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) |
(AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.
|
@@ -790,7 +791,7 @@ A speed can be given in km/h.
-CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index)
+CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint)
@@ -808,11 +809,6 @@ A speed can be given in km/h.
#number ToWayPoint :
-
-
-
- Index :
-
Return value
@@ -820,6 +816,19 @@ A speed can be given in km/h.
DCSTask#Task:
+ Usage:
+ --- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
+HeliGroup = GROUP:FindByName( "Helicopter" )
+
+--- Route the helicopter back to the FARP after 60 seconds.
+-- We use the SCHEDULER class to do this.
+SCHEDULER:New( nil,
+ function( HeliGroup )
+ local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
+ HeliGroup:SetCommand( CommandRTB )
+ end, { HeliGroup }, 90
+)
+
@@ -935,8 +944,8 @@ The DCS task structure.
-
-
-CONTROLLABLE:EnRouteTaskEngageControllable(AttackControllable, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)
+
+CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)
-
@@ -950,7 +959,7 @@ The DCS task structure.
+
+ | DATABASE:GetGroupTemplate(GroupName) |
+
+
|
@@ -1177,6 +1184,27 @@ self
-
+
+DATABASE:GetGroupTemplate(GroupName)
+
+
+-
+
+
+
+
Parameter
+
+
+
+
+-
+
DATABASE:GetStatusGroup(GroupName)
diff --git a/Moose Training/Documentation/Detection.html b/Moose Training/Documentation/Detection.html
index d6df23ad5..88aef1870 100644
--- a/Moose Training/Documentation/Detection.html
+++ b/Moose Training/Documentation/Detection.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
@@ -89,7 +90,7 @@
The Detection#DETECTION_BASE class defines the core functions to administer detected objects.
1.1) DETECTION_BASE constructor
- Construct a new DETECTION_BASE instance using the Detection#DETECTION.New() method.
+ Construct a new DETECTION_BASE instance using the Detection#DETECTION_BASE.New() method.
1.2) DETECTION_BASE initialization
By default, detection will return detected objects with all the detection sensors available.
@@ -357,6 +358,12 @@
DETECTION_UNITGROUPS.DetectedZones |
A list of Zone#ZONE_UNITs containing the zones of the reference detected units.
+ |
+
+
+ | DETECTION_UNITGROUPS:FlareDetectedUnits() |
+
+ Flare the detected units
|
@@ -1093,6 +1100,24 @@ self
-
+
+DETECTION_UNITGROUPS:FlareDetectedUnits()
+
+
+-
+
+
Flare the detected units
+
+ Return value
+
+#DETECTION_UNITGROUPS:
+self
+
+
+
+
+-
+
DETECTION_UNITGROUPS:FlareDetectedZones()
diff --git a/Moose Training/Documentation/Escort.html b/Moose Training/Documentation/Escort.html
index 5482b333c..1c20a6ad6 100644
--- a/Moose Training/Documentation/Escort.html
+++ b/Moose Training/Documentation/Escort.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
@@ -1930,9 +1931,6 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the
-
-self.ReportTargetsScheduler = routines.scheduleFunction( self._ReportTargetsScheduler, { self }, timer.getTime() + 1, Seconds )
-
diff --git a/Moose Training/Documentation/Event.html b/Moose Training/Documentation/Event.html
index 79cbbd78e..294e68dfd 100644
--- a/Moose Training/Documentation/Event.html
+++ b/Moose Training/Documentation/Event.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
@@ -1540,7 +1541,7 @@ The self instance of the class for which the event is.
diff --git a/Moose Training/Documentation/Fac.html b/Moose Training/Documentation/Fac.html
index f0b494aff..9fbb3c811 100644
--- a/Moose Training/Documentation/Fac.html
+++ b/Moose Training/Documentation/Fac.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/GOHOMETASK.html b/Moose Training/Documentation/GOHOMETASK.html
index 9b5ed8c77..ab5a3150a 100644
--- a/Moose Training/Documentation/GOHOMETASK.html
+++ b/Moose Training/Documentation/GOHOMETASK.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Group.html b/Moose Training/Documentation/Group.html
index bb7cae5c9..42621b18c 100644
--- a/Moose Training/Documentation/Group.html
+++ b/Moose Training/Documentation/Group.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
@@ -116,7 +117,8 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
1.2) GROUP task methods
Several group task methods are available that help you to prepare tasks.
-These methods return a string consisting of the task description, which can then be given to either a Group#GROUP.PushTask or Group#SetTask method to assign the task to the GROUP.
+These methods return a string consisting of the task description, which can then be given to either a
+Controllable#CONTROLLABLE.PushTask or Controllable#CONTROLLABLE.SetTask method to assign the task to the GROUP.
Tasks are specific for the category of the GROUP, more specific, for AIR, GROUND or AIR and GROUND.
Each task description where applicable indicates for which group category the task is valid.
There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.
@@ -129,28 +131,28 @@ This is different from the EnRoute tasks, where the targets of the task need to
Find below a list of the assigned task methods:
1.2.2) EnRoute task methods
@@ -158,13 +160,13 @@ This is different from the EnRoute tasks, where the targets of the task need to
EnRoute tasks require the targets of the task need to be detected by the group (using its sensors) before the task can be executed:
1.2.3) Preparation task methods
@@ -172,10 +174,10 @@ This is different from the EnRoute tasks, where the targets of the task need to
There are certain task methods that allow to tailor the task behaviour:
1.2.4) Obtain the mission from group templates
@@ -183,15 +185,15 @@ This is different from the EnRoute tasks, where the targets of the task need to
Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:
1.3) GROUP Command methods
-Group command methods prepare the execution of commands using the GROUP.SetCommand method:
+Group command methods prepare the execution of commands using the Controllable#CONTROLLABLE.SetCommand method:
1.4) GROUP Option methods
@@ -200,37 +202,37 @@ This is different from the EnRoute tasks, where the targets of the task need to
1.4.1) Rule of Engagement:
To check whether an ROE option is valid for a specific group, use:
1.4.2) Rule on thread:
To test whether an ROT option is valid for a specific group, use:
1.5) GROUP Zone validation methods
@@ -406,7 +408,7 @@ Use the following Zone validation methods on the group:
| GROUP:GetTemplate() |
-
+ Returns the group template from the DATABASE (_DATABASE object).
|
@@ -526,7 +528,25 @@ Use the following Zone validation methods on the group:
| GROUP:Respawn(Template) |
-
+ Respawn the GROUP using a (tweaked) template of the Group.
+ |
+
+
+ | GROUP:SetTemplateCoalition(CoalitionID, Template) |
+
+ Sets the CoalitionID of the group in a Template.
+ |
+
+
+ | GROUP:SetTemplateControlled(Controlled, Template) |
+
+ Sets the controlled status in a Template.
+ |
+
+
+ | GROUP:SetTemplateCountry(CountryID, Template) |
+
+ Sets the CountryID of the group in a Template.
|
@@ -1066,6 +1086,11 @@ The mission route defined by points.
+Returns the group template from the DATABASE (_DATABASE object).
+
+ Return value
+
+#table:
@@ -1544,16 +1569,135 @@ self
+Respawn the GROUP using a (tweaked) template of the Group.
+
+The template must be retrieved with the Group#GROUP.GetTemplate() function.
+The template contains all the definitions as declared within the mission file.
+To understand templates, do the following:
+
+
+ - unpack your .miz file into a directory using 7-zip.
+ - browse in the directory created to the file mission.
+ - open the file and search for the country group definitions.
+
+
+Your group template will contain the fields as described within the mission file.
+
+This function will:
+
+
+ - Get the current position and heading of the group.
+ - When the group is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
+ - Then it will destroy the current alive group.
+ - And it will respawn the group using your new template definition.
+
Parameter
+
+
+
+-
+
+
+GROUP:SetTemplateCoalition(CoalitionID, Template)
+
+
+-
+
+
Sets the CoalitionID of the group in a Template.
+
+ Parameters
+
+ Return value
+
+#table:
+
+
+
+
+
+-
+
+
+GROUP:SetTemplateControlled(Controlled, Template)
+
+
+-
+
+
Sets the controlled status in a Template.
+
+ Parameters
+
+ Return value
+
+#table:
+
+
+
+
+
+-
+
+
+GROUP:SetTemplateCountry(CountryID, Template)
+
+
+-
+
+
Sets the CountryID of the group in a Template.
+
+ Parameters
+
+ Return value
+
+#table:
+
+
diff --git a/Moose Training/Documentation/Identifiable.html b/Moose Training/Documentation/Identifiable.html
index 3b30e11ca..0f3cc9c40 100644
--- a/Moose Training/Documentation/Identifiable.html
+++ b/Moose Training/Documentation/Identifiable.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
@@ -131,6 +132,12 @@
IDENTIFIABLE.ClassName |
+ |
+
+
+ | IDENTIFIABLE:GetCategory() |
+
+ Returns category of the DCS Identifiable.
|
@@ -223,6 +230,24 @@
+
+
+
+-
+
+
+IDENTIFIABLE:GetCategory()
+
+
+-
+
+
Returns category of the DCS Identifiable.
+
+ Return value
+
+DCSObject#Object.Category:
+The category ID
+
diff --git a/Moose Training/Documentation/MISSION.html b/Moose Training/Documentation/MISSION.html
index a44aece40..f349b86c9 100644
--- a/Moose Training/Documentation/MISSION.html
+++ b/Moose Training/Documentation/MISSION.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/MOVEMENT.html b/Moose Training/Documentation/MOVEMENT.html
index 305f917a3..90ec5605b 100644
--- a/Moose Training/Documentation/MOVEMENT.html
+++ b/Moose Training/Documentation/MOVEMENT.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Menu.html b/Moose Training/Documentation/Menu.html
index 0f175ce8f..cc6276f86 100644
--- a/Moose Training/Documentation/Menu.html
+++ b/Moose Training/Documentation/Menu.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Message.html b/Moose Training/Documentation/Message.html
index 238b511e6..8b494fb03 100644
--- a/Moose Training/Documentation/Message.html
+++ b/Moose Training/Documentation/Message.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/MissileTrainer.html b/Moose Training/Documentation/MissileTrainer.html
index e387d6ad0..03a1fd552 100644
--- a/Moose Training/Documentation/MissileTrainer.html
+++ b/Moose Training/Documentation/MissileTrainer.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/NOTASK.html b/Moose Training/Documentation/NOTASK.html
index d295f2fd7..f765ed02a 100644
--- a/Moose Training/Documentation/NOTASK.html
+++ b/Moose Training/Documentation/NOTASK.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/Object.html b/Moose Training/Documentation/Object.html
index eb36a3165..39b818c12 100644
--- a/Moose Training/Documentation/Object.html
+++ b/Moose Training/Documentation/Object.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
@@ -138,51 +139,9 @@
- | OBJECT:GetCallSign() |
+ OBJECT:GetID() |
- Returns the Object's callsign - the localized string.
- |
-
-
- | OBJECT:GetCategoryName() |
-
- Returns the DCS Object category name as defined within the DCS Object Descriptor.
- |
-
-
- | OBJECT:GetCoalition() |
-
- Returns coalition of the Object.
- |
-
-
- | OBJECT:GetCountry() |
-
- Returns country of the Object.
- |
-
-
- | OBJECT:GetDesc() |
-
- Returns Object descriptor.
- |
-
-
- | OBJECT:GetName() |
-
- Returns DCS Object object name.
- |
-
-
- | OBJECT:GetTypeName() |
-
- Returns the type name of the DCS Object.
- |
-
-
- | OBJECT:IsAlive() |
-
- Returns if the Object is alive.
+Returns the unit's unique identifier.
|
@@ -257,212 +216,20 @@
-
-
-OBJECT:GetCallSign()
+
+OBJECT:GetID()
-
-
Returns the Object's callsign - the localized string.
+Returns the unit's unique identifier.
Return values
-
-
#string:
-The Callsign of the Object.
-
-
- -
-
-
#nil:
-The DCS Object is not existing or alive.
-
-
-
-
-
-
--
-
-
-OBJECT:GetCategoryName()
-
-
--
-
-
Returns the DCS Object category name as defined within the DCS Object Descriptor.
-
- Return value
-
-#string:
-The DCS Object Category Name
-
-
-
-
--
-
-
-OBJECT:GetCoalition()
-
-
--
-
-
Returns coalition of the Object.
-
- Return values
-
- -
-
-
DCSCoalitionObject#coalition.side:
-The side of the coalition.
-
-
- -
-
-
#nil:
-The DCS Object is not existing or alive.
-
-
-
-
-
-
--
-
-
-OBJECT:GetCountry()
-
-
--
-
-
Returns country of the Object.
-
- Return values
-
- -
-
-
DCScountry#country.id:
-The country identifier.
-
-
- -
-
-
#nil:
-The DCS Object is not existing or alive.
-
-
-
-
-
-
--
-
-
-OBJECT:GetDesc()
-
-
--
-
-
Returns Object descriptor.
-
-
-Descriptor type depends on Object category.
-
- Return values
-
- -
-
-
DCSObject#Object.Desc:
-The Object descriptor.
-
-
- -
-
-
#nil:
-The DCS Object is not existing or alive.
-
-
-
-
-
-
--
-
-
-OBJECT:GetName()
-
-
--
-
-
Returns DCS Object object name.
-
-
-The function provides access to non-activated objects too.
-
- Return values
-
- -
-
-
#string:
-The name of the DCS Object.
-
-
- -
-
-
#nil:
-The DCS Object is not existing or alive.
-
-
-
-
-
-
--
-
-
-OBJECT:GetTypeName()
-
-
--
-
-
Returns the type name of the DCS Object.
-
- Return values
-
- -
-
-
#string:
-The type name of the DCS Object.
-
-
- -
-
-
#nil:
-The DCS Object is not existing or alive.
-
-
-
-
-
-
--
-
-
-OBJECT:IsAlive()
-
-
--
-
-
Returns if the Object is alive.
-
- Return values
-
- -
-
-
#boolean:
-true if Object is alive.
+DCSObject#Object.ID:
+ObjectID
-
diff --git a/Moose Training/Documentation/PICKUPTASK.html b/Moose Training/Documentation/PICKUPTASK.html
index b4d42b424..2c26a4668 100644
--- a/Moose Training/Documentation/PICKUPTASK.html
+++ b/Moose Training/Documentation/PICKUPTASK.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/PatrolZone.html b/Moose Training/Documentation/PatrolZone.html
index 57e301d3f..4b827c585 100644
--- a/Moose Training/Documentation/PatrolZone.html
+++ b/Moose Training/Documentation/PatrolZone.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Point.html b/Moose Training/Documentation/Point.html
index ad61c002b..3df9956bc 100644
--- a/Moose Training/Documentation/Point.html
+++ b/Moose Training/Documentation/Point.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Positionable.html b/Moose Training/Documentation/Positionable.html
index d6801e50e..eef6b1fcc 100644
--- a/Moose Training/Documentation/Positionable.html
+++ b/Moose Training/Documentation/Positionable.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/ROUTETASK.html b/Moose Training/Documentation/ROUTETASK.html
index b4b6af4de..540000e02 100644
--- a/Moose Training/Documentation/ROUTETASK.html
+++ b/Moose Training/Documentation/ROUTETASK.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/STAGE.html b/Moose Training/Documentation/STAGE.html
index bb3a81b5d..adacdaa27 100644
--- a/Moose Training/Documentation/STAGE.html
+++ b/Moose Training/Documentation/STAGE.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Scheduler.html b/Moose Training/Documentation/Scheduler.html
index 0e09087bb..3cdcbdb91 100644
--- a/Moose Training/Documentation/Scheduler.html
+++ b/Moose Training/Documentation/Scheduler.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Scoring.html b/Moose Training/Documentation/Scoring.html
index fd4e0d8a4..09f0747b0 100644
--- a/Moose Training/Documentation/Scoring.html
+++ b/Moose Training/Documentation/Scoring.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Sead.html b/Moose Training/Documentation/Sead.html
index d712387fc..e2a5ae18c 100644
--- a/Moose Training/Documentation/Sead.html
+++ b/Moose Training/Documentation/Sead.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Set.html b/Moose Training/Documentation/Set.html
index c618696b0..642df566e 100644
--- a/Moose Training/Documentation/Set.html
+++ b/Moose Training/Documentation/Set.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
@@ -1506,7 +1507,7 @@ The closest object.
Flushes the current SET_BASE contents in the log ...
-(for debug reasons).
+(for debugging reasons).
Return value
diff --git a/Moose Training/Documentation/Spawn.html b/Moose Training/Documentation/Spawn.html
index f50b51d79..bbb0a1012 100644
--- a/Moose Training/Documentation/Spawn.html
+++ b/Moose Training/Documentation/Spawn.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Static.html b/Moose Training/Documentation/Static.html
index 70c8ae9ed..9623e149e 100644
--- a/Moose Training/Documentation/Static.html
+++ b/Moose Training/Documentation/Static.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/StaticObject.html b/Moose Training/Documentation/StaticObject.html
index a7273b25a..da3a69a1d 100644
--- a/Moose Training/Documentation/StaticObject.html
+++ b/Moose Training/Documentation/StaticObject.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/TASK.html b/Moose Training/Documentation/TASK.html
index 8c57f3460..3a47c534b 100644
--- a/Moose Training/Documentation/TASK.html
+++ b/Moose Training/Documentation/TASK.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Unit.html b/Moose Training/Documentation/Unit.html
index 573d22500..1a3baca8f 100644
--- a/Moose Training/Documentation/Unit.html
+++ b/Moose Training/Documentation/Unit.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/Zone.html b/Moose Training/Documentation/Zone.html
index 9980a0bb2..9fbef93d4 100644
--- a/Moose Training/Documentation/Zone.html
+++ b/Moose Training/Documentation/Zone.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
@@ -107,8 +108,9 @@
- Zone#ZONE_BASE: The ZONE_BASE class defining the base for all other zone classes.
- Zone#ZONE_RADIUS: The ZONE_RADIUS class defined by a zone name, a location and a radius.
- Zone#ZONE: The ZONE class, defined by the zone name as defined within the Mission Editor.
- - Zone#ZONE_UNIT: The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.
- - Zone#ZONE_POLYGON: The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
+ - Zone#ZONE_UNIT: The ZONE_UNIT class defines by a zone around a Unit#UNIT with a radius.
+ - Zone#ZONE_GROUP: The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.
+ - Zone#ZONE_POLYGON: The ZONE_POLYGON class defines by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
Each zone implements two polymorphic functions defined in Zone#ZONE_BASE:
@@ -140,7 +142,12 @@
-
+
+The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius. The current leader of the group defines the center of the zone.
+
+
+
+
The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
@@ -158,6 +165,12 @@
ZONE_BASE |
+ |
+
+
+ | ZONE_GROUP |
+
+
|
@@ -277,6 +290,40 @@
| ZONE_BASE.BoundingSquare.y2 |
The higher y coordinate (right up)
+ |
+
+
+
+
+
@@ -449,6 +496,12 @@
ZONE_UNIT:GetPointVec2() |
Returns the current location of the Unit#UNIT.
+ |
+
+
+ | ZONE_UNIT:GetRandomVec2() |
+
+ Returns a random location within the zone.
|
@@ -492,6 +545,20 @@
+
+
+
+-
+
+ #ZONE_GROUP
+
+ZONE_GROUP
+
+
+-
+
+
+
@@ -838,6 +905,115 @@ The smoke color.
The higher y coordinate (right up)
+
+
+
+
+
+The ZONE_GROUP class defined by a zone around a Group, taking the average center point of all the units within the Group, with a radius.
+
+ Field(s)
+
+-
+
+ #string
+
+ZONE_GROUP.ClassName
+
+
+-
+
+
+
+
+
+
+-
+
+
+ZONE_GROUP:GetPointVec2()
+
+
+-
+
+
Returns the current location of the Group.
+
+ Return value
+
+DCSTypes#Vec2:
+The location of the zone based on the Group location.
+
+
+
+
+-
+
+
+ZONE_GROUP:GetRandomVec2()
+
+
+-
+
+
Returns a random location within the zone of the Group.
+
+ Return value
+
+DCSTypes#Vec2:
+The random location of the zone based on the Group location.
+
+
+
+
+-
+
+
+ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius)
+
+
+-
+
+
Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.
+
+ Parameters
+
+ -
+
+
#string ZoneName :
+Name of the zone.
+
+
+ -
+
+
Group#GROUP ZoneGROUP :
+The Group as the center of the zone.
+
+
+ -
+
+
DCSTypes#Distance Radius :
+The radius of the zone.
+
+
+
+ Return value
+
+#ZONE_GROUP:
+self
+
+
+
+
+-
+
+ Group#GROUP
+
+ZONE_GROUP.ZoneGROUP
+
+
+-
+
+
+
@@ -981,6 +1157,9 @@ The Vec2 coordinate.
Returns if a location is within the zone.
+
+Source learned and taken from: https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
+
Parameter
-
@@ -1470,6 +1649,24 @@ The location of the zone based on the Unit#UNITl
-
+
+ZONE_UNIT:GetRandomVec2()
+
+
+-
+
+
Returns a random location within the zone.
+
+ Return value
+
+DCSTypes#Vec2:
+The random location within the zone.
+
+
+
+
+-
+
ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius)
diff --git a/Moose Training/Documentation/env.html b/Moose Training/Documentation/env.html
index c5d08b3f2..f4f96a2cc 100644
--- a/Moose Training/Documentation/env.html
+++ b/Moose Training/Documentation/env.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
diff --git a/Moose Training/Documentation/index.html b/Moose Training/Documentation/index.html
index 97fda78a4..b883d3908 100644
--- a/Moose Training/Documentation/index.html
+++ b/Moose Training/Documentation/index.html
@@ -35,6 +35,7 @@
- DCSTypes
- DCSUnit
- DCSWorld
+ - DCScountry
- DCStimer
- DEPLOYTASK
- DESTROYBASETASK
@@ -186,6 +187,12 @@
DCSWorld |
+ |
+
+
+ | DCScountry |
+
+
|
diff --git a/Moose Training/Documentation/land.html b/Moose Training/Documentation/land.html
index a265c3357..d8d6da2c2 100644
--- a/Moose Training/Documentation/land.html
+++ b/Moose Training/Documentation/land.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK
diff --git a/Moose Training/Documentation/routines.html b/Moose Training/Documentation/routines.html
index 891393674..0c86aabda 100644
--- a/Moose Training/Documentation/routines.html
+++ b/Moose Training/Documentation/routines.html
@@ -35,6 +35,7 @@
DCSTypes
DCSUnit
DCSWorld
+ DCScountry
DCStimer
DEPLOYTASK
DESTROYBASETASK