mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #215 from FlightControl-Master/FlightControl
-- Added SPA-017 test mission -- Added SPAWN:InitAIOnOff() -- Added SPAWN:InitAIOn() -- Added SPAWN:InitAIOff() -- Added GROUP:SetAIOnOff( AIOnOff ) -- Added GROUP:SetAIOn() -- Added GROUP:SetAIOff() -- Documentation
This commit is contained in:
commit
fd1ed374cf
@ -47,6 +47,9 @@
|
||||
-- * @{#SPAWN.InitRepeat}(): Re-spawn groups when they land at the home base. Similar methods are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
|
||||
-- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius.
|
||||
-- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor.
|
||||
-- * @{#SPAWN.InitAIOn}(): Turns the AI On when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOff}(): Turns the AI Off when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOnOff}(): Turns the AI On or Off when spawning the new @{Group} object.
|
||||
--
|
||||
-- ## 1.3) SPAWN spawning methods
|
||||
--
|
||||
@ -109,71 +112,40 @@
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval )
|
||||
-- 2017-01-24: SPAWN:**InitAIOnOff( AIOnOff )** added.
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
-- 2017-01-24: SPAWN:**InitAIOn()** added.
|
||||
--
|
||||
-- 2017-01-24: SPAWN:**InitAIOff()** added.
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval ).
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones )** added.
|
||||
--
|
||||
-- * This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
|
||||
--
|
||||
-- 2016-08-14: SPAWN:**OnSpawnGroup**( SpawnCallBackFunction, ... ) replaces SPAWN:_SpawnFunction_( SpawnCallBackFunction, ... ).
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnInZone( Zone, __RandomizeGroup__, SpawnIndex ) replaces SpawnInZone( Zone, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )** added:
|
||||
--
|
||||
-- * This method enables the randomization of units at the first route point in a radius band at a spawn event.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN._Limit_( SpawnMaxUnitsAlive, SpawnMaxGroups ):
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN._Array_( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN._RandomizeRoute_( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN._RandomizeTemplate_( SpawnTemplatePrefixTable ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**UnControlled() replaces SPAWN._UnControlled_().
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
@ -181,6 +153,7 @@
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * **Aaron**: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.
|
||||
-- * [**Entropy**](https://forums.eagle.ru/member.php?u=111471), **Afinegan**: Came up with the requirement for AIOnOff().
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
@ -238,6 +211,7 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
self.SpawnRandomize = false -- Sets the randomization flag of new Spawned units to false.
|
||||
self.SpawnVisible = false -- Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -275,6 +249,7 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
self.SpawnRandomize = false -- Sets the randomization flag of new Spawned units to false.
|
||||
self.SpawnVisible = false -- Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -565,7 +540,34 @@ function SPAWN:InitArray( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY )
|
||||
return self
|
||||
end
|
||||
|
||||
do -- AI methods
|
||||
--- Turns the AI On or Off for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @param #boolean AIOnOff A value of true sets the AI On, a value of false sets the AI Off.
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOnOff( AIOnOff )
|
||||
|
||||
self.AIOnOff = AIOnOff
|
||||
return self
|
||||
end
|
||||
|
||||
--- Turns the AI On for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOn()
|
||||
|
||||
return self:InitAIOnOff( true )
|
||||
end
|
||||
|
||||
--- Turns the AI Off for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOff()
|
||||
|
||||
return self:InitAIOnOff( false )
|
||||
end
|
||||
|
||||
end -- AI methods
|
||||
|
||||
--- Will spawn a group based on the internal index.
|
||||
-- Note: Uses @{DATABASE} module defined in MOOSE.
|
||||
@ -661,6 +663,14 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _DATABASE:Spawn( SpawnTemplate )
|
||||
|
||||
local SpawnGroup = self.SpawnGroups[self.SpawnIndex].Group -- Wrapper.Group#GROUP
|
||||
|
||||
--TODO: Need to check if this function doesn't need to be scheduled, as the group may not be immediately there!
|
||||
if SpawnGroup then
|
||||
|
||||
SpawnGroup:SetAIOnOff( self.AIOnOff )
|
||||
end
|
||||
|
||||
-- If there is a SpawnFunction hook defined, call it.
|
||||
if self.SpawnFunctionHook then
|
||||
self.SpawnFunctionHook( self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) )
|
||||
|
||||
@ -28,114 +28,26 @@
|
||||
-- * @{#GROUP.Find}(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
|
||||
-- * @{#GROUP.FindByName}(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
|
||||
--
|
||||
-- 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
|
||||
-- @{Wrapper.Controllable#CONTROLLABLE.PushTask} or @{Wrapper.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.
|
||||
--
|
||||
-- ### 1.2.1) Assigned task methods
|
||||
--
|
||||
-- Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected.
|
||||
-- This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.
|
||||
--
|
||||
-- Find below a list of the **assigned task** methods:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackGroup}: (AIR) Attack a Group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackMapObject}: (AIR) Attacking the map object (building, structure, e.t.c).
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackUnit}: (AIR) Attack the Unit.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskBombing}: (Wrapper.Controllable#CONTROLLABLEDelivering weapon at the point on the ground.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskBombingRunway}: (AIR) Delivering weapon on the runway.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEmbarking}: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEscort}: (AIR) Escort another airborne group.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire at a VEC2 point until ammunition is finished.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskFollow}: (AIR) Following another airborne group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskHold}: (GROUND) Hold ground group from moving.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskHoldPosition}: (AIR) Hold position at the current position of the first unit of the group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskLand}: (AIR HELICOPTER) Landing at the ground. For helicopters only.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskLandAtZone}: (AIR) Land the group at a @{Core.Zone#ZONE_RADIUS).
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircle}: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircleAtVec2}: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRefueling}: (AIR) Refueling from the nearest tanker. No parameters.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRoute}: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec2}: (AIR + GROUND) Make the Group move to a given point.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec3}: (AIR + GROUND) Make the Group move to a given point.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToZone}: (AIR + GROUND) Route the group to a given zone.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskReturnToBase}: (AIR) Route the group to an airbase.
|
||||
-- ## 1.2) GROUP task methods
|
||||
--
|
||||
-- ### 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:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskAWACS}: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageTargets}: (AIR) Engaging targets of defined types.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEWR}: (AIR) Attack the Unit.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.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:
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} task methods section for a description of the task methods.
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskWrappedAction}: Return a WrappedAction Task taking a Command.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskCombo}: Return a Combo Task taking an array of Tasks.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskCondition}: Return a condition section for a controlled task.
|
||||
-- * @{Wrapper.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:
|
||||
--
|
||||
-- * @{Wrapper.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 @{Wrapper.Controllable#CONTROLLABLE.SetCommand} method:
|
||||
-- ## 1.3) GROUP Command methods
|
||||
--
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} command methods section for a description of the command methods.
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.CommandDoScript}: Do Script command.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.CommandSwitchWayPoint}: Perform a switch waypoint command.
|
||||
-- ## 1.4) GROUP option methods
|
||||
--
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} option methods section for a description of the option methods.
|
||||
--
|
||||
-- 1.4) GROUP Option methods
|
||||
-- -------------------------
|
||||
-- Group **Option methods** change the behaviour of the Group while being alive.
|
||||
-- ## 1.5) GROUP Zone validation methods
|
||||
--
|
||||
-- ### 1.4.1) Rule of Engagement:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFree}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFire}
|
||||
--
|
||||
-- To check whether an ROE option is valid for a specific group, use:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFreePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFirePossible}
|
||||
--
|
||||
-- ### 1.4.2) Rule on thread:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTNoReaction}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefense}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTVertical}
|
||||
--
|
||||
-- To test whether an ROT option is valid for a specific group, use:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTNoReactionPossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefensePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTVerticalPossible}
|
||||
--
|
||||
-- 1.5) GROUP Zone validation methods
|
||||
-- ----------------------------------
|
||||
-- The group can be validated whether it is completely, partly or not within a @{Zone}.
|
||||
-- Use the following Zone validation methods on the group:
|
||||
--
|
||||
@ -145,6 +57,43 @@
|
||||
--
|
||||
-- The zone can be of any @{Zone} class derived from @{Core.Zone#ZONE_BASE}. So, these methods are polymorphic to the zones tested on.
|
||||
--
|
||||
-- ## 1.6) GROUP AI methods
|
||||
--
|
||||
-- A GROUP has AI methods to control the AI activation.
|
||||
--
|
||||
-- * @{#GROUP.SetAIOnOff}(): Turns the GROUP AI On or Off.
|
||||
-- * @{#GROUP.SetAIOn}(): Turns the GROUP AI On.
|
||||
-- * @{#GROUP.SetAIOff}(): Turns the GROUP AI Off.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOnOff( AIOnOff )** added.
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOn()** added.
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOff()** added.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Entropy**](https://forums.eagle.ru/member.php?u=111471), **Afinegan**: Came up with the requirement for AIOnOff().
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module Group
|
||||
-- @author FlightControl
|
||||
|
||||
@ -494,7 +443,7 @@ end
|
||||
|
||||
|
||||
|
||||
-- Is Zone Functions
|
||||
do -- Is Zone methods
|
||||
|
||||
--- Returns true if all units of the group are within a @{Zone}.
|
||||
-- @param #GROUP self
|
||||
@ -660,6 +609,49 @@ function GROUP:AllOnGround()
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- AI methods
|
||||
|
||||
--- Turns the AI On or Off for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @param #boolean AIOnOff The value true turns the AI On, the value false turns the AI Off.
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOnOff( AIOnOff )
|
||||
|
||||
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||
|
||||
if DCSGroup then
|
||||
local DCSController = DCSGroup:getController() -- Dcs.DCSController#Controller
|
||||
if DCSController then
|
||||
DCSController:setOnOff( AIOnOff )
|
||||
return self
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Turns the AI On for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOn()
|
||||
|
||||
return self:SetAIOnOff( true )
|
||||
end
|
||||
|
||||
--- Turns the AI Off for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOff()
|
||||
|
||||
return self:SetAIOnOff( false )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the current maximum velocity of the group.
|
||||
-- Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.
|
||||
-- @param #GROUP self
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170123_1503' )
|
||||
env.info( 'Moose Generation Timestamp: 20170124_1109' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@ -14852,114 +14852,26 @@ end
|
||||
-- * @{#GROUP.Find}(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
|
||||
-- * @{#GROUP.FindByName}(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
|
||||
--
|
||||
-- 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
|
||||
-- @{Wrapper.Controllable#CONTROLLABLE.PushTask} or @{Wrapper.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.
|
||||
--
|
||||
-- ### 1.2.1) Assigned task methods
|
||||
--
|
||||
-- Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected.
|
||||
-- This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.
|
||||
--
|
||||
-- Find below a list of the **assigned task** methods:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackGroup}: (AIR) Attack a Group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackMapObject}: (AIR) Attacking the map object (building, structure, e.t.c).
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackUnit}: (AIR) Attack the Unit.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskBombing}: (Wrapper.Controllable#CONTROLLABLEDelivering weapon at the point on the ground.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskBombingRunway}: (AIR) Delivering weapon on the runway.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEmbarking}: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEscort}: (AIR) Escort another airborne group.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire at a VEC2 point until ammunition is finished.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskFollow}: (AIR) Following another airborne group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskHold}: (GROUND) Hold ground group from moving.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskHoldPosition}: (AIR) Hold position at the current position of the first unit of the group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskLand}: (AIR HELICOPTER) Landing at the ground. For helicopters only.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskLandAtZone}: (AIR) Land the group at a @{Core.Zone#ZONE_RADIUS).
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircle}: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircleAtVec2}: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRefueling}: (AIR) Refueling from the nearest tanker. No parameters.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRoute}: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec2}: (AIR + GROUND) Make the Group move to a given point.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec3}: (AIR + GROUND) Make the Group move to a given point.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToZone}: (AIR + GROUND) Route the group to a given zone.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskReturnToBase}: (AIR) Route the group to an airbase.
|
||||
-- ## 1.2) GROUP task methods
|
||||
--
|
||||
-- ### 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:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskAWACS}: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageTargets}: (AIR) Engaging targets of defined types.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEWR}: (AIR) Attack the Unit.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.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:
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} task methods section for a description of the task methods.
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskWrappedAction}: Return a WrappedAction Task taking a Command.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskCombo}: Return a Combo Task taking an array of Tasks.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskCondition}: Return a condition section for a controlled task.
|
||||
-- * @{Wrapper.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:
|
||||
--
|
||||
-- * @{Wrapper.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 @{Wrapper.Controllable#CONTROLLABLE.SetCommand} method:
|
||||
-- ## 1.3) GROUP Command methods
|
||||
--
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} command methods section for a description of the command methods.
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.CommandDoScript}: Do Script command.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.CommandSwitchWayPoint}: Perform a switch waypoint command.
|
||||
-- ## 1.4) GROUP option methods
|
||||
--
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} option methods section for a description of the option methods.
|
||||
--
|
||||
-- 1.4) GROUP Option methods
|
||||
-- -------------------------
|
||||
-- Group **Option methods** change the behaviour of the Group while being alive.
|
||||
-- ## 1.5) GROUP Zone validation methods
|
||||
--
|
||||
-- ### 1.4.1) Rule of Engagement:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFree}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFire}
|
||||
--
|
||||
-- To check whether an ROE option is valid for a specific group, use:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFreePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFirePossible}
|
||||
--
|
||||
-- ### 1.4.2) Rule on thread:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTNoReaction}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefense}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTVertical}
|
||||
--
|
||||
-- To test whether an ROT option is valid for a specific group, use:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTNoReactionPossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefensePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTVerticalPossible}
|
||||
--
|
||||
-- 1.5) GROUP Zone validation methods
|
||||
-- ----------------------------------
|
||||
-- The group can be validated whether it is completely, partly or not within a @{Zone}.
|
||||
-- Use the following Zone validation methods on the group:
|
||||
--
|
||||
@ -14969,6 +14881,43 @@ end
|
||||
--
|
||||
-- The zone can be of any @{Zone} class derived from @{Core.Zone#ZONE_BASE}. So, these methods are polymorphic to the zones tested on.
|
||||
--
|
||||
-- ## 1.6) GROUP AI methods
|
||||
--
|
||||
-- A GROUP has AI methods to control the AI activation.
|
||||
--
|
||||
-- * @{#GROUP.SetAIOnOff}(): Turns the GROUP AI On or Off.
|
||||
-- * @{#GROUP.SetAIOn}(): Turns the GROUP AI On.
|
||||
-- * @{#GROUP.SetAIOff}(): Turns the GROUP AI Off.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOnOff( AIOnOff )** added.
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOn()** added.
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOff()** added.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Entropy**](https://forums.eagle.ru/member.php?u=111471), **Afinegan**: Came up with the requirement for AIOnOff().
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module Group
|
||||
-- @author FlightControl
|
||||
|
||||
@ -15318,7 +15267,7 @@ end
|
||||
|
||||
|
||||
|
||||
-- Is Zone Functions
|
||||
do -- Is Zone methods
|
||||
|
||||
--- Returns true if all units of the group are within a @{Zone}.
|
||||
-- @param #GROUP self
|
||||
@ -15484,6 +15433,49 @@ function GROUP:AllOnGround()
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- AI methods
|
||||
|
||||
--- Turns the AI On or Off for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @param #boolean AIOnOff The value true turns the AI On, the value false turns the AI Off.
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOnOff( AIOnOff )
|
||||
|
||||
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||
|
||||
if DCSGroup then
|
||||
local DCSController = DCSGroup:getController() -- Dcs.DCSController#Controller
|
||||
if DCSController then
|
||||
DCSController:setOnOff( AIOnOff )
|
||||
return self
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Turns the AI On for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOn()
|
||||
|
||||
return self:SetAIOnOff( true )
|
||||
end
|
||||
|
||||
--- Turns the AI Off for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOff()
|
||||
|
||||
return self:SetAIOnOff( false )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the current maximum velocity of the group.
|
||||
-- Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.
|
||||
-- @param #GROUP self
|
||||
@ -18429,6 +18421,9 @@ end
|
||||
-- * @{#SPAWN.InitRepeat}(): Re-spawn groups when they land at the home base. Similar methods are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
|
||||
-- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius.
|
||||
-- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor.
|
||||
-- * @{#SPAWN.InitAIOn}(): Turns the AI On when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOff}(): Turns the AI Off when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOnOff}(): Turns the AI On or Off when spawning the new @{Group} object.
|
||||
--
|
||||
-- ## 1.3) SPAWN spawning methods
|
||||
--
|
||||
@ -18491,71 +18486,40 @@ end
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval )
|
||||
-- 2017-01-24: SPAWN:**InitAIOnOff( AIOnOff )** added.
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
-- 2017-01-24: SPAWN:**InitAIOn()** added.
|
||||
--
|
||||
-- 2017-01-24: SPAWN:**InitAIOff()** added.
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval ).
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones )** added.
|
||||
--
|
||||
-- * This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
|
||||
--
|
||||
-- 2016-08-14: SPAWN:**OnSpawnGroup**( SpawnCallBackFunction, ... ) replaces SPAWN:_SpawnFunction_( SpawnCallBackFunction, ... ).
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnInZone( Zone, __RandomizeGroup__, SpawnIndex ) replaces SpawnInZone( Zone, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )** added:
|
||||
--
|
||||
-- * This method enables the randomization of units at the first route point in a radius band at a spawn event.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN._Limit_( SpawnMaxUnitsAlive, SpawnMaxGroups ):
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN._Array_( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN._RandomizeRoute_( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN._RandomizeTemplate_( SpawnTemplatePrefixTable ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**UnControlled() replaces SPAWN._UnControlled_().
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
@ -18563,6 +18527,7 @@ end
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * **Aaron**: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.
|
||||
-- * [**Entropy**](https://forums.eagle.ru/member.php?u=111471), **Afinegan**: Came up with the requirement for AIOnOff().
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
@ -18620,6 +18585,7 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
self.SpawnRandomize = false -- Sets the randomization flag of new Spawned units to false.
|
||||
self.SpawnVisible = false -- Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -18657,6 +18623,7 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
self.SpawnRandomize = false -- Sets the randomization flag of new Spawned units to false.
|
||||
self.SpawnVisible = false -- Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -18947,7 +18914,34 @@ function SPAWN:InitArray( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY )
|
||||
return self
|
||||
end
|
||||
|
||||
do -- AI methods
|
||||
--- Turns the AI On or Off for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @param #boolean AIOnOff A value of true sets the AI On, a value of false sets the AI Off.
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOnOff( AIOnOff )
|
||||
|
||||
self.AIOnOff = AIOnOff
|
||||
return self
|
||||
end
|
||||
|
||||
--- Turns the AI On for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOn()
|
||||
|
||||
return self:InitAIOnOff( true )
|
||||
end
|
||||
|
||||
--- Turns the AI Off for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOff()
|
||||
|
||||
return self:InitAIOnOff( false )
|
||||
end
|
||||
|
||||
end -- AI methods
|
||||
|
||||
--- Will spawn a group based on the internal index.
|
||||
-- Note: Uses @{DATABASE} module defined in MOOSE.
|
||||
@ -19043,6 +19037,14 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _DATABASE:Spawn( SpawnTemplate )
|
||||
|
||||
local SpawnGroup = self.SpawnGroups[self.SpawnIndex].Group -- Wrapper.Group#GROUP
|
||||
|
||||
--TODO: Need to check if this function doesn't need to be scheduled, as the group may not be immediately there!
|
||||
if SpawnGroup then
|
||||
|
||||
SpawnGroup:SetAIOnOff( self.AIOnOff )
|
||||
end
|
||||
|
||||
-- If there is a SpawnFunction hook defined, call it.
|
||||
if self.SpawnFunctionHook then
|
||||
self.SpawnFunctionHook( self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) )
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170123_1503' )
|
||||
env.info( 'Moose Generation Timestamp: 20170124_1109' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@ -14852,114 +14852,26 @@ end
|
||||
-- * @{#GROUP.Find}(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
|
||||
-- * @{#GROUP.FindByName}(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
|
||||
--
|
||||
-- 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
|
||||
-- @{Wrapper.Controllable#CONTROLLABLE.PushTask} or @{Wrapper.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.
|
||||
--
|
||||
-- ### 1.2.1) Assigned task methods
|
||||
--
|
||||
-- Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected.
|
||||
-- This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.
|
||||
--
|
||||
-- Find below a list of the **assigned task** methods:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackGroup}: (AIR) Attack a Group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackMapObject}: (AIR) Attacking the map object (building, structure, e.t.c).
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskAttackUnit}: (AIR) Attack the Unit.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskBombing}: (Wrapper.Controllable#CONTROLLABLEDelivering weapon at the point on the ground.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskBombingRunway}: (AIR) Delivering weapon on the runway.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEmbarking}: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskEscort}: (AIR) Escort another airborne group.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire at a VEC2 point until ammunition is finished.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskFollow}: (AIR) Following another airborne group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskHold}: (GROUND) Hold ground group from moving.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskHoldPosition}: (AIR) Hold position at the current position of the first unit of the group.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskLand}: (AIR HELICOPTER) Landing at the ground. For helicopters only.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskLandAtZone}: (AIR) Land the group at a @{Core.Zone#ZONE_RADIUS).
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircle}: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircleAtVec2}: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRefueling}: (AIR) Refueling from the nearest tanker. No parameters.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRoute}: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec2}: (AIR + GROUND) Make the Group move to a given point.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec3}: (AIR + GROUND) Make the Group move to a given point.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskRouteToZone}: (AIR + GROUND) Route the group to a given zone.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskReturnToBase}: (AIR) Route the group to an airbase.
|
||||
-- ## 1.2) GROUP task methods
|
||||
--
|
||||
-- ### 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:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskAWACS}: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageTargets}: (AIR) Engaging targets of defined types.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEWR}: (AIR) Attack the Unit.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.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.
|
||||
-- * @{Wrapper.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:
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} task methods section for a description of the task methods.
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskWrappedAction}: Return a WrappedAction Task taking a Command.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskCombo}: Return a Combo Task taking an array of Tasks.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.TaskCondition}: Return a condition section for a controlled task.
|
||||
-- * @{Wrapper.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:
|
||||
--
|
||||
-- * @{Wrapper.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 @{Wrapper.Controllable#CONTROLLABLE.SetCommand} method:
|
||||
-- ## 1.3) GROUP Command methods
|
||||
--
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} command methods section for a description of the command methods.
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.CommandDoScript}: Do Script command.
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.CommandSwitchWayPoint}: Perform a switch waypoint command.
|
||||
-- ## 1.4) GROUP option methods
|
||||
--
|
||||
-- A GROUP is a @{Controllable}. See the @{Controllable} option methods section for a description of the option methods.
|
||||
--
|
||||
-- 1.4) GROUP Option methods
|
||||
-- -------------------------
|
||||
-- Group **Option methods** change the behaviour of the Group while being alive.
|
||||
-- ## 1.5) GROUP Zone validation methods
|
||||
--
|
||||
-- ### 1.4.1) Rule of Engagement:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFree}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFire}
|
||||
--
|
||||
-- To check whether an ROE option is valid for a specific group, use:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFreePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFirePossible}
|
||||
--
|
||||
-- ### 1.4.2) Rule on thread:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTNoReaction}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefense}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFire}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTVertical}
|
||||
--
|
||||
-- To test whether an ROT option is valid for a specific group, use:
|
||||
--
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTNoReactionPossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefensePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFirePossible}
|
||||
-- * @{Wrapper.Controllable#CONTROLLABLE.OptionROTVerticalPossible}
|
||||
--
|
||||
-- 1.5) GROUP Zone validation methods
|
||||
-- ----------------------------------
|
||||
-- The group can be validated whether it is completely, partly or not within a @{Zone}.
|
||||
-- Use the following Zone validation methods on the group:
|
||||
--
|
||||
@ -14969,6 +14881,43 @@ end
|
||||
--
|
||||
-- The zone can be of any @{Zone} class derived from @{Core.Zone#ZONE_BASE}. So, these methods are polymorphic to the zones tested on.
|
||||
--
|
||||
-- ## 1.6) GROUP AI methods
|
||||
--
|
||||
-- A GROUP has AI methods to control the AI activation.
|
||||
--
|
||||
-- * @{#GROUP.SetAIOnOff}(): Turns the GROUP AI On or Off.
|
||||
-- * @{#GROUP.SetAIOn}(): Turns the GROUP AI On.
|
||||
-- * @{#GROUP.SetAIOff}(): Turns the GROUP AI Off.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOnOff( AIOnOff )** added.
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOn()** added.
|
||||
--
|
||||
-- 2017-01-24: GROUP:**SetAIOff()** added.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Entropy**](https://forums.eagle.ru/member.php?u=111471), **Afinegan**: Came up with the requirement for AIOnOff().
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module Group
|
||||
-- @author FlightControl
|
||||
|
||||
@ -15318,7 +15267,7 @@ end
|
||||
|
||||
|
||||
|
||||
-- Is Zone Functions
|
||||
do -- Is Zone methods
|
||||
|
||||
--- Returns true if all units of the group are within a @{Zone}.
|
||||
-- @param #GROUP self
|
||||
@ -15484,6 +15433,49 @@ function GROUP:AllOnGround()
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- AI methods
|
||||
|
||||
--- Turns the AI On or Off for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @param #boolean AIOnOff The value true turns the AI On, the value false turns the AI Off.
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOnOff( AIOnOff )
|
||||
|
||||
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||
|
||||
if DCSGroup then
|
||||
local DCSController = DCSGroup:getController() -- Dcs.DCSController#Controller
|
||||
if DCSController then
|
||||
DCSController:setOnOff( AIOnOff )
|
||||
return self
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Turns the AI On for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOn()
|
||||
|
||||
return self:SetAIOnOff( true )
|
||||
end
|
||||
|
||||
--- Turns the AI Off for the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOff()
|
||||
|
||||
return self:SetAIOnOff( false )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the current maximum velocity of the group.
|
||||
-- Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.
|
||||
-- @param #GROUP self
|
||||
@ -18429,6 +18421,9 @@ end
|
||||
-- * @{#SPAWN.InitRepeat}(): Re-spawn groups when they land at the home base. Similar methods are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
|
||||
-- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius.
|
||||
-- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor.
|
||||
-- * @{#SPAWN.InitAIOn}(): Turns the AI On when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOff}(): Turns the AI Off when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOnOff}(): Turns the AI On or Off when spawning the new @{Group} object.
|
||||
--
|
||||
-- ## 1.3) SPAWN spawning methods
|
||||
--
|
||||
@ -18491,71 +18486,40 @@ end
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval )
|
||||
-- 2017-01-24: SPAWN:**InitAIOnOff( AIOnOff )** added.
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
-- 2017-01-24: SPAWN:**InitAIOn()** added.
|
||||
--
|
||||
-- 2017-01-24: SPAWN:**InitAIOff()** added.
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval ).
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones )** added.
|
||||
--
|
||||
-- * This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
|
||||
--
|
||||
-- 2016-08-14: SPAWN:**OnSpawnGroup**( SpawnCallBackFunction, ... ) replaces SPAWN:_SpawnFunction_( SpawnCallBackFunction, ... ).
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnInZone( Zone, __RandomizeGroup__, SpawnIndex ) replaces SpawnInZone( Zone, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ):
|
||||
--
|
||||
-- * The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method @{#SPAWN.InitRandomizeUnits}( RandomizeUnits, OuterRadius, InnerRadius ).
|
||||
-- * A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned @{Group}.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )** added:
|
||||
--
|
||||
-- * This method enables the randomization of units at the first route point in a radius band at a spawn event.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN._Limit_( SpawnMaxUnitsAlive, SpawnMaxGroups ):
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN._Array_( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN._RandomizeRoute_( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN._RandomizeTemplate_( SpawnTemplatePrefixTable ).
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- 2016-08-14: SPAWN.**Init**UnControlled() replaces SPAWN._UnControlled_().
|
||||
--
|
||||
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
|
||||
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
@ -18563,6 +18527,7 @@ end
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * **Aaron**: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.
|
||||
-- * [**Entropy**](https://forums.eagle.ru/member.php?u=111471), **Afinegan**: Came up with the requirement for AIOnOff().
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
@ -18620,6 +18585,7 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
self.SpawnRandomize = false -- Sets the randomization flag of new Spawned units to false.
|
||||
self.SpawnVisible = false -- Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -18657,6 +18623,7 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
self.SpawnRandomize = false -- Sets the randomization flag of new Spawned units to false.
|
||||
self.SpawnVisible = false -- Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -18947,7 +18914,34 @@ function SPAWN:InitArray( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY )
|
||||
return self
|
||||
end
|
||||
|
||||
do -- AI methods
|
||||
--- Turns the AI On or Off for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @param #boolean AIOnOff A value of true sets the AI On, a value of false sets the AI Off.
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOnOff( AIOnOff )
|
||||
|
||||
self.AIOnOff = AIOnOff
|
||||
return self
|
||||
end
|
||||
|
||||
--- Turns the AI On for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOn()
|
||||
|
||||
return self:InitAIOnOff( true )
|
||||
end
|
||||
|
||||
--- Turns the AI Off for the @{Group} when spawning.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN The SPAWN object
|
||||
function SPAWN:InitAIOff()
|
||||
|
||||
return self:InitAIOnOff( false )
|
||||
end
|
||||
|
||||
end -- AI methods
|
||||
|
||||
--- Will spawn a group based on the internal index.
|
||||
-- Note: Uses @{DATABASE} module defined in MOOSE.
|
||||
@ -19043,6 +19037,14 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _DATABASE:Spawn( SpawnTemplate )
|
||||
|
||||
local SpawnGroup = self.SpawnGroups[self.SpawnIndex].Group -- Wrapper.Group#GROUP
|
||||
|
||||
--TODO: Need to check if this function doesn't need to be scheduled, as the group may not be immediately there!
|
||||
if SpawnGroup then
|
||||
|
||||
SpawnGroup:SetAIOnOff( self.AIOnOff )
|
||||
end
|
||||
|
||||
-- If there is a SpawnFunction hook defined, call it.
|
||||
if self.SpawnFunctionHook then
|
||||
self.SpawnFunctionHook( self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) )
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
-- Name: SPA-017 - Ground Ops - Set AI inactive while spawning
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
-- But set the AI inactive when spawning.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving.
|
||||
-- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeZones( ZoneTable )
|
||||
:InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn().
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
Binary file not shown.
@ -2413,6 +2413,7 @@ The UNIT carrying the package.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_CARGO_UNIT).CargoCarrier" >
|
||||
<strong>AI_CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
|
||||
@ -735,12 +735,6 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<h2><a id="#(FSM_PROCESS)">Type <code>FSM_PROCESS</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(FSM_PROCESS).AddScore">FSM_PROCESS:AddScore(State, ScoreText, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a score for the FSM_PROCESS to be achieved.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(FSM_PROCESS).Assign">FSM_PROCESS:Assign(Task, ProcessUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Assign the process to a <a href="Unit.html">Unit</a> and activate the process.</p>
|
||||
@ -2000,45 +1994,6 @@ Finite State Machine Table</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(FSM_PROCESS).AddScore" >
|
||||
<strong>FSM_PROCESS:AddScore(State, ScoreText, Score)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a score for the FSM_PROCESS to be achieved.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string State </em></code>:
|
||||
is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreText </em></code>:
|
||||
is a text describing the score that is given according the status.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Score </em></code>:
|
||||
is a number providing the score of the status.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(FSM_PROCESS)">#FSM_PROCESS</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(FSM_PROCESS).Assign" >
|
||||
<strong>FSM_PROCESS:Assign(Task, ProcessUnit)</strong>
|
||||
</a>
|
||||
|
||||
@ -105,69 +105,8 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
|
||||
</ul>
|
||||
|
||||
<h2>1.2) GROUP task methods</h2>
|
||||
<p>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 <br/>
|
||||
<a href="Wrapper.Controllable.html##(CONTROLLABLE).PushTask">Wrapper.Controllable#CONTROLLABLE.PushTask</a> or <a href="Wrapper.Controllable.html##(CONTROLLABLE).SetTask">Wrapper.Controllable#CONTROLLABLE.SetTask</a> 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.</p>
|
||||
|
||||
<h3>1.2.1) Assigned task methods</h3>
|
||||
|
||||
<p>Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected.
|
||||
This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.</p>
|
||||
|
||||
<p>Find below a list of the <strong>assigned task</strong> methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskAttackGroup">Wrapper.Controllable#CONTROLLABLE.TaskAttackGroup</a>: (AIR) Attack a Group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskAttackMapObject">Wrapper.Controllable#CONTROLLABLE.TaskAttackMapObject</a>: (AIR) Attacking the map object (building, structure, e.t.c).</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskAttackUnit">Wrapper.Controllable#CONTROLLABLE.TaskAttackUnit</a>: (AIR) Attack the Unit.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskBombing">Wrapper.Controllable#CONTROLLABLE.TaskBombing</a>: (Wrapper.Controllable#CONTROLLABLEDelivering weapon at the point on the ground.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskBombingRunway">Wrapper.Controllable#CONTROLLABLE.TaskBombingRunway</a>: (AIR) Delivering weapon on the runway.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskEmbarking">Wrapper.Controllable#CONTROLLABLE.TaskEmbarking</a>: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskEmbarkToTransport">Wrapper.Controllable#CONTROLLABLE.TaskEmbarkToTransport</a>: (GROUND) Embark to a Transport landed at a location.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskEscort">Wrapper.Controllable#CONTROLLABLE.TaskEscort</a>: (AIR) Escort another airborne group. </li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskFAC_AttackGroup">Wrapper.Controllable#CONTROLLABLE.TaskFAC_AttackGroup</a>: (AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskFireAtPoint">Wrapper.Controllable#CONTROLLABLE.TaskFireAtPoint</a>: (GROUND) Fire at a VEC2 point until ammunition is finished.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskFollow">Wrapper.Controllable#CONTROLLABLE.TaskFollow</a>: (AIR) Following another airborne group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskHold">Wrapper.Controllable#CONTROLLABLE.TaskHold</a>: (GROUND) Hold ground group from moving.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskHoldPosition">Wrapper.Controllable#CONTROLLABLE.TaskHoldPosition</a>: (AIR) Hold position at the current position of the first unit of the group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskLand">Wrapper.Controllable#CONTROLLABLE.TaskLand</a>: (AIR HELICOPTER) Landing at the ground. For helicopters only.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskLandAtZone">Wrapper.Controllable#CONTROLLABLE.TaskLandAtZone</a>: (AIR) Land the group at a <a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskOrbitCircle">Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircle</a>: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskOrbitCircleAtVec2">Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircleAtVec2</a>: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRefueling">Wrapper.Controllable#CONTROLLABLE.TaskRefueling</a>: (AIR) Refueling from the nearest tanker. No parameters.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRoute">Wrapper.Controllable#CONTROLLABLE.TaskRoute</a>: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRouteToVec2">Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec2</a>: (AIR + GROUND) Make the Group move to a given point.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRouteToVec3">Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec3</a>: (AIR + GROUND) Make the Group move to a given point.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRouteToZone">Wrapper.Controllable#CONTROLLABLE.TaskRouteToZone</a>: (AIR + GROUND) Route the group to a given zone.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskReturnToBase">Wrapper.Controllable#CONTROLLABLE.TaskReturnToBase</a>: (AIR) Route the group to an airbase.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) EnRoute task methods</h3>
|
||||
|
||||
<p>EnRoute tasks require the targets of the task need to be detected by the group (using its sensors) before the task can be executed:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskAWACS">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskAWACS</a>: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskEngageGroup">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageGroup</a>: (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.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskEngageTargets">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageTargets</a>: (AIR) Engaging targets of defined types.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskEWR">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEWR</a>: (AIR) Attack the Unit.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskFAC">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskFAC</a>: (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.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskFAC_EngageGroup">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskFAC_EngageGroup</a>: (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.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskTanker">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskTanker</a>: (AIR) Aircraft will act as a tanker for friendly units. No parameters.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.3) Preparation task methods</h3>
|
||||
|
||||
<p>There are certain task methods that allow to tailor the task behaviour:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskWrappedAction">Wrapper.Controllable#CONTROLLABLE.TaskWrappedAction</a>: Return a WrappedAction Task taking a Command.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskCombo">Wrapper.Controllable#CONTROLLABLE.TaskCombo</a>: Return a Combo Task taking an array of Tasks.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskCondition">Wrapper.Controllable#CONTROLLABLE.TaskCondition</a>: Return a condition section for a controlled task.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskControlled">Wrapper.Controllable#CONTROLLABLE.TaskControlled</a>: Return a Controlled Task taking a Task and a TaskCondition.</li>
|
||||
</ul>
|
||||
<p>A GROUP is a <a href="Controllable.html">Controllable</a>. See the <a href="Controllable.html">Controllable</a> task methods section for a description of the task methods.</p>
|
||||
|
||||
<h3>1.2.4) Obtain the mission from group templates</h3>
|
||||
|
||||
@ -178,53 +117,15 @@ This is different from the EnRoute tasks, where the targets of the task need to
|
||||
</ul>
|
||||
|
||||
<h2>1.3) GROUP Command methods</h2>
|
||||
<p>Group <strong>command methods</strong> prepare the execution of commands using the <a href="Wrapper.Controllable.html##(CONTROLLABLE).SetCommand">Wrapper.Controllable#CONTROLLABLE.SetCommand</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).CommandDoScript">Wrapper.Controllable#CONTROLLABLE.CommandDoScript</a>: Do Script command.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).CommandSwitchWayPoint">Wrapper.Controllable#CONTROLLABLE.CommandSwitchWayPoint</a>: Perform a switch waypoint command.</li>
|
||||
</ul>
|
||||
<p>A GROUP is a <a href="Controllable.html">Controllable</a>. See the <a href="Controllable.html">Controllable</a> command methods section for a description of the command methods.</p>
|
||||
|
||||
<h2>1.4) GROUP Option methods</h2>
|
||||
<p>Group <strong>Option methods</strong> change the behaviour of the Group while being alive.</p>
|
||||
<h2>1.4) GROUP option methods</h2>
|
||||
|
||||
<h3>1.4.1) Rule of Engagement:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEWeaponFree">Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFree</a> </li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEOpenFire">Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFire</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEReturnFire">Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFire</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEEvadeFire">Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFire</a></li>
|
||||
</ul>
|
||||
|
||||
<p>To check whether an ROE option is valid for a specific group, use:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEWeaponFreePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFreePossible</a> </li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEOpenFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFirePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEReturnFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFirePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEEvadeFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFirePossible</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>1.4.2) Rule on thread:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTNoReaction">Wrapper.Controllable#CONTROLLABLE.OptionROTNoReaction</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTPassiveDefense">Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefense</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTEvadeFire">Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFire</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTVertical">Wrapper.Controllable#CONTROLLABLE.OptionROTVertical</a></li>
|
||||
</ul>
|
||||
|
||||
<p>To test whether an ROT option is valid for a specific group, use:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTNoReactionPossible">Wrapper.Controllable#CONTROLLABLE.OptionROTNoReactionPossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTPassiveDefensePossible">Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefensePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTEvadeFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFirePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTVerticalPossible">Wrapper.Controllable#CONTROLLABLE.OptionROTVerticalPossible</a></li>
|
||||
</ul>
|
||||
<p>A GROUP is a <a href="Controllable.html">Controllable</a>. See the <a href="Controllable.html">Controllable</a> option methods section for a description of the option methods.</p>
|
||||
|
||||
<h2>1.5) GROUP Zone validation methods</h2>
|
||||
|
||||
<p>The group can be validated whether it is completely, partly or not within a <a href="Zone.html">Zone</a>.
|
||||
Use the following Zone validation methods on the group:</p>
|
||||
|
||||
@ -236,6 +137,51 @@ Use the following Zone validation methods on the group:</p>
|
||||
|
||||
<p>The zone can be of any <a href="Zone.html">Zone</a> class derived from <a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a>. So, these methods are polymorphic to the zones tested on.</p>
|
||||
|
||||
<h2>1.6) GROUP AI methods</h2>
|
||||
|
||||
<p>A GROUP has AI methods to control the AI activation.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(GROUP).SetAIOnOff">GROUP.SetAIOnOff</a>(): Turns the GROUP AI On or Off.</li>
|
||||
<li><a href="##(GROUP).SetAIOn">GROUP.SetAIOn</a>(): Turns the GROUP AI On.</li>
|
||||
<li><a href="##(GROUP).SetAIOff">GROUP.SetAIOff</a>(): Turns the GROUP AI Off.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Added</strong> parts are expressed in bold type face.</li>
|
||||
<li><em>Removed</em> parts are expressed in italic type face.</li>
|
||||
</ul>
|
||||
|
||||
<p>Hereby the change log:</p>
|
||||
|
||||
<p>2017-01-24: GROUP:<strong>SetAIOnOff( AIOnOff )</strong> added. </p>
|
||||
|
||||
<p>2017-01-24: GROUP:<strong>SetAIOn()</strong> added. </p>
|
||||
|
||||
<p>2017-01-24: GROUP:<strong>SetAIOff()</strong> added. </p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=111471"><strong>Entropy</strong></a>, <strong>Afinegan</strong>: Came up with the requirement for AIOnOff().</li>
|
||||
</ul>
|
||||
|
||||
<h3>Authors:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>FlightControl</strong>: Design & Programming</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@ -506,6 +452,24 @@ Use the following Zone validation methods on the group:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).Respawn">GROUP:Respawn(Template)</a></td>
|
||||
<td class="summary">
|
||||
<p>Respawn the <a href="GROUP.html">GROUP</a> using a (tweaked) template of the Group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetAIOff">GROUP:SetAIOff()</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI Off for the GROUP.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetAIOn">GROUP:SetAIOn()</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI On for the GROUP.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetAIOnOff">GROUP:SetAIOnOff(AIOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI On or Off for the GROUP.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1493,6 +1457,69 @@ The template of the Group retrieved with GROUP:GetTemplate()</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetAIOff" >
|
||||
<strong>GROUP:SetAIOff()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI Off for the GROUP.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
The GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetAIOn" >
|
||||
<strong>GROUP:SetAIOn()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI On for the GROUP.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
The GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetAIOnOff" >
|
||||
<strong>GROUP:SetAIOnOff(AIOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI On or Off for the GROUP.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean AIOnOff </em></code>:
|
||||
The value true turns the AI On, the value false turns the AI Off.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
The GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetTemplateCoalition" >
|
||||
<strong>GROUP:SetTemplateCoalition(CoalitionID, Template)</strong>
|
||||
</a>
|
||||
|
||||
@ -128,6 +128,9 @@ So in principle, the group list will contain all parameters and configurations a
|
||||
<li><a href="##(SPAWN).InitRepeat">SPAWN.InitRepeat</a>(): Re-spawn groups when they land at the home base. Similar methods are <a href="##(SPAWN).InitRepeatOnLanding">SPAWN.InitRepeatOnLanding</a> and <a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN.InitRepeatOnEngineShutDown</a>.</li>
|
||||
<li><a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>(): Randomizes the <a href="Unit.html">Unit</a>s in the <a href="Group.html">Group</a> that is spawned within a <strong>radius band</strong>, given an Outer and Inner radius.</li>
|
||||
<li><a href="##(SPAWN).InitRandomizeZones">SPAWN.InitRandomizeZones</a>(): Randomizes the spawning between a predefined list of <a href="Zone.html">Zone</a>s that are declared using this function. Each zone can be given a probability factor.</li>
|
||||
<li><a href="##(SPAWN).InitAIOn">SPAWN.InitAIOn</a>(): Turns the AI On when spawning the new <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitAIOff">SPAWN.InitAIOff</a>(): Turns the AI Off when spawning the new <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitAIOnOff">SPAWN.InitAIOnOff</a>(): Turns the AI On or Off when spawning the new <a href="Group.html">Group</a> object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) SPAWN spawning methods</h2>
|
||||
@ -197,97 +200,40 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
|
||||
|
||||
<p>Hereby the change log:</p>
|
||||
|
||||
<p>2016-08-15: SPAWN:<strong>InitCleanUp</strong>( SpawnCleanUpInterval ) replaces SPAWN:<em>CleanUp</em>( SpawnCleanUpInterval )</p>
|
||||
<p>2017-01-24: SPAWN:<strong>InitAIOnOff( AIOnOff )</strong> added.</p>
|
||||
|
||||
<ul>
|
||||
<li>Want to ensure that the methods starting with <strong>Init</strong> are the first called methods before any <em>Spawn</em> method is called!</li>
|
||||
<li>This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.</li>
|
||||
</ul>
|
||||
<p>2017-01-24: SPAWN:<strong>InitAIOn()</strong> added.</p>
|
||||
|
||||
<p>2017-01-24: SPAWN:<strong>InitAIOff()</strong> added.</p>
|
||||
|
||||
<p>2016-08-15: SPAWN:<strong>InitCleanUp</strong>( SpawnCleanUpInterval ) replaces SPAWN:<em>CleanUp</em>( SpawnCleanUpInterval ).</p>
|
||||
|
||||
<p>2016-08-15: SPAWN:<strong>InitRandomizeZones( SpawnZones )</strong> added.</p>
|
||||
|
||||
<ul>
|
||||
<li>This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types. </li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN:<strong>OnSpawnGroup</strong>( SpawnCallBackFunction, ... ) replaces SPAWN:<em>SpawnFunction</em>( SpawnCallBackFunction, ... ).</p>
|
||||
|
||||
<p>2016-08-14: SPAWN.SpawnInZone( Zone, <strong>RandomizeGroup</strong>, SpawnIndex ) replaces SpawnInZone( Zone, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ).</p>
|
||||
|
||||
<ul>
|
||||
<li>The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method <a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>( RandomizeUnits, OuterRadius, InnerRadius ).</li>
|
||||
<li>A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned <a href="Group.html">Group</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ):</p>
|
||||
|
||||
<ul>
|
||||
<li>The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method <a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>( RandomizeUnits, OuterRadius, InnerRadius ).</li>
|
||||
<li>A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned <a href="Group.html">Group</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ):</p>
|
||||
|
||||
<ul>
|
||||
<li>The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method <a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>( RandomizeUnits, OuterRadius, InnerRadius ).</li>
|
||||
<li>A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned <a href="Group.html">Group</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ):</p>
|
||||
|
||||
<ul>
|
||||
<li>The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method <a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>( RandomizeUnits, OuterRadius, InnerRadius ).</li>
|
||||
<li>A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned <a href="Group.html">Group</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ): </p>
|
||||
|
||||
<ul>
|
||||
<li>The RandomizeUnits, OuterRadius and InnerRadius have been replaced with a new method <a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>( RandomizeUnits, OuterRadius, InnerRadius ).</li>
|
||||
<li>A new parameter RandomizeGroup to reflect the randomization of the starting position of the Spawned <a href="Group.html">Group</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.<strong>InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )</strong> added:</p>
|
||||
|
||||
<ul>
|
||||
<li>This method enables the randomization of units at the first route point in a radius band at a spawn event.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.<strong>Init</strong>Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN.<em>Limit</em>( SpawnMaxUnitsAlive, SpawnMaxGroups ):</p>
|
||||
|
||||
<ul>
|
||||
<li>Want to ensure that the methods starting with <strong>Init</strong> are the first called methods before any <em>Spawn</em> method is called!</li>
|
||||
<li>This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.<strong>Init</strong>Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN.<em>Array</em>( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).</p>
|
||||
|
||||
<ul>
|
||||
<li>Want to ensure that the methods starting with <strong>Init</strong> are the first called methods before any <em>Spawn</em> method is called!</li>
|
||||
<li>This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.<strong>Init</strong>RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN.<em>RandomizeRoute</em>( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).</p>
|
||||
|
||||
<ul>
|
||||
<li>Want to ensure that the methods starting with <strong>Init</strong> are the first called methods before any <em>Spawn</em> method is called!</li>
|
||||
<li>This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.<strong>Init</strong>RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN.<em>RandomizeTemplate</em>( SpawnTemplatePrefixTable ).</p>
|
||||
|
||||
<ul>
|
||||
<li>Want to ensure that the methods starting with <strong>Init</strong> are the first called methods before any <em>Spawn</em> method is called!</li>
|
||||
<li>This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.</li>
|
||||
</ul>
|
||||
|
||||
<p>2016-08-14: SPAWN.<strong>Init</strong>UnControlled() replaces SPAWN.<em>UnControlled</em>().</p>
|
||||
|
||||
<ul>
|
||||
<li>Want to ensure that the methods starting with <strong>Init</strong> are the first called methods before any <em>Spawn</em> method is called!</li>
|
||||
<li>This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
@ -296,6 +242,7 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
|
||||
|
||||
<ul>
|
||||
<li><strong>Aaron</strong>: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.</li>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=111471"><strong>Entropy</strong></a>, <strong>Afinegan</strong>: Came up with the requirement for AIOnOff().</li>
|
||||
</ul>
|
||||
|
||||
<h3>Authors:</h3>
|
||||
@ -317,6 +264,12 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
|
||||
<h2><a id="#(SPAWN)">Type <code>SPAWN</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AIOnOff">SPAWN.AIOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AliveUnits">SPAWN.AliveUnits</a></td>
|
||||
<td class="summary">
|
||||
|
||||
@ -362,6 +315,24 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetSpawnIndexFromGroup">SPAWN:GetSpawnIndexFromGroup(SpawnGroup)</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the index from a given group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOff">SPAWN:InitAIOff()</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI Off for the <a href="Group.html">Group</a> when spawning.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOn">SPAWN:InitAIOn()</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI On for the <a href="Group.html">Group</a> when spawning.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOnOff">SPAWN:InitAIOnOff(AIOnOff)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -883,6 +854,23 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).AIOnOff" >
|
||||
<strong>SPAWN.AIOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> The AI is on by default when spawning a group.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).AliveUnits" >
|
||||
<strong>SPAWN.AliveUnits</strong>
|
||||
@ -1098,6 +1086,63 @@ end</code></pre>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitAIOff" >
|
||||
<strong>SPAWN:InitAIOff()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI Off for the <a href="Group.html">Group</a> when spawning.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
The SPAWN object</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitAIOn" >
|
||||
<strong>SPAWN:InitAIOn()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI On for the <a href="Group.html">Group</a> when spawning.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
The SPAWN object</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitAIOnOff" >
|
||||
<strong>SPAWN:InitAIOnOff(AIOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AIOnOff </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitArray" >
|
||||
<strong>SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)</strong>
|
||||
</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user