From 743fa8ced1f3255b3a5148fc5baf724c22bcab5b Mon Sep 17 00:00:00 2001 From: FlightControl Date: Tue, 9 May 2017 10:40:05 +0200 Subject: [PATCH] new AI_BAI class --- .../Moose/AI/{AI_Bomb.lua => AI_BAI.lua} | 249 +-- .../Moose/Wrapper/Controllable.lua | 26 +- Moose Mission Setup/Moose.files | 1 + Moose Mission Setup/Moose.lua | 3 +- .../bin/TreeHierarchy.csv | 38 +- docs/Documentation/AI_BAI.html | 1875 +++++++++++++++++ docs/Documentation/AI_Balancer.html | 1 + docs/Documentation/AI_Cap.html | 1 + docs/Documentation/AI_Cas.html | 1 + docs/Documentation/AI_Patrol.html | 1 + docs/Documentation/Account.html | 1 + docs/Documentation/Airbase.html | 1 + docs/Documentation/AirbasePolice.html | 1 + docs/Documentation/Assign.html | 1 + docs/Documentation/Base.html | 1 + docs/Documentation/Cargo.html | 250 ++- docs/Documentation/CleanUp.html | 1 + docs/Documentation/Client.html | 1 + docs/Documentation/CommandCenter.html | 37 +- docs/Documentation/Controllable.html | 13 +- docs/Documentation/DCSAirbase.html | 1 + docs/Documentation/DCSCoalitionObject.html | 1 + docs/Documentation/DCSCommand.html | 1 + docs/Documentation/DCSController.html | 1 + docs/Documentation/DCSGroup.html | 1 + docs/Documentation/DCSObject.html | 1 + docs/Documentation/DCSTask.html | 1 + docs/Documentation/DCSTypes.html | 1 + docs/Documentation/DCSUnit.html | 1 + docs/Documentation/DCSVec3.html | 1 + docs/Documentation/DCSWorld.html | 1 + docs/Documentation/DCSZone.html | 1 + docs/Documentation/DCScountry.html | 1 + docs/Documentation/DCStimer.html | 1 + docs/Documentation/DCStrigger.html | 1 + docs/Documentation/Database.html | 40 + docs/Documentation/Designate.html | 2 +- docs/Documentation/Detection.html | 2 +- docs/Documentation/DetectionManager.html | 1 + docs/Documentation/Escort.html | 1 + docs/Documentation/Event.html | 28 + docs/Documentation/Fsm.html | 4 +- docs/Documentation/Group.html | 1 + docs/Documentation/Identifiable.html | 1 + docs/Documentation/Menu.html | 1 + docs/Documentation/Message.html | 1 + docs/Documentation/MissileTrainer.html | 1 + docs/Documentation/Mission.html | 222 +- docs/Documentation/Movement.html | 1 + docs/Documentation/Object.html | 1 + docs/Documentation/Point.html | 2 + docs/Documentation/Positionable.html | 11 +- docs/Documentation/Process_JTAC.html | 1 + docs/Documentation/Process_Pickup.html | 1 + docs/Documentation/Radio.html | 1 + docs/Documentation/Route.html | 1 + docs/Documentation/Scenery.html | 1 + docs/Documentation/ScheduleDispatcher.html | 1 + docs/Documentation/Scheduler.html | 1 + docs/Documentation/Scoring.html | 1 + docs/Documentation/Sead.html | 1 + docs/Documentation/Set.html | 25 + docs/Documentation/Smoke.html | 1 + docs/Documentation/Spawn.html | 11 +- docs/Documentation/SpawnStatic.html | 2 +- docs/Documentation/Spot.html | 5 + docs/Documentation/Static.html | 1 + docs/Documentation/StaticObject.html | 1 + docs/Documentation/Task.html | 286 ++- docs/Documentation/Task_A2G.html | 72 +- docs/Documentation/Task_A2G_Dispatcher.html | 1 + docs/Documentation/Task_Cargo.html | 411 +++- docs/Documentation/Task_PICKUP.html | 1 + docs/Documentation/Unit.html | 1 + docs/Documentation/Utils.html | 1 + docs/Documentation/Zone.html | 1 + docs/Documentation/env.html | 1 + docs/Documentation/index.html | 13 + docs/Documentation/land.html | 1 + docs/Documentation/routines.html | 1 + docs/Presentations/AI_BAI/Dia1.JPG | Bin 0 -> 198875 bytes docs/Presentations/AI_BAI/Dia10.JPG | Bin 0 -> 208373 bytes docs/Presentations/AI_BAI/Dia11.JPG | Bin 0 -> 189472 bytes docs/Presentations/AI_BAI/Dia12.JPG | Bin 0 -> 194526 bytes docs/Presentations/AI_BAI/Dia13.JPG | Bin 0 -> 194150 bytes docs/Presentations/AI_BAI/Dia2.JPG | Bin 0 -> 199665 bytes docs/Presentations/AI_BAI/Dia3.JPG | Bin 0 -> 212452 bytes docs/Presentations/AI_BAI/Dia4.JPG | Bin 0 -> 186635 bytes docs/Presentations/AI_BAI/Dia5.JPG | Bin 0 -> 197456 bytes docs/Presentations/AI_BAI/Dia6.JPG | Bin 0 -> 209058 bytes docs/Presentations/AI_BAI/Dia7.JPG | Bin 0 -> 199418 bytes docs/Presentations/AI_BAI/Dia8.JPG | Bin 0 -> 192914 bytes docs/Presentations/AI_BAI/Dia9.JPG | Bin 0 -> 197322 bytes 93 files changed, 3295 insertions(+), 388 deletions(-) rename Moose Development/Moose/AI/{AI_Bomb.lua => AI_BAI.lua} (74%) create mode 100644 docs/Documentation/AI_BAI.html create mode 100644 docs/Presentations/AI_BAI/Dia1.JPG create mode 100644 docs/Presentations/AI_BAI/Dia10.JPG create mode 100644 docs/Presentations/AI_BAI/Dia11.JPG create mode 100644 docs/Presentations/AI_BAI/Dia12.JPG create mode 100644 docs/Presentations/AI_BAI/Dia13.JPG create mode 100644 docs/Presentations/AI_BAI/Dia2.JPG create mode 100644 docs/Presentations/AI_BAI/Dia3.JPG create mode 100644 docs/Presentations/AI_BAI/Dia4.JPG create mode 100644 docs/Presentations/AI_BAI/Dia5.JPG create mode 100644 docs/Presentations/AI_BAI/Dia6.JPG create mode 100644 docs/Presentations/AI_BAI/Dia7.JPG create mode 100644 docs/Presentations/AI_BAI/Dia8.JPG create mode 100644 docs/Presentations/AI_BAI/Dia9.JPG diff --git a/Moose Development/Moose/AI/AI_Bomb.lua b/Moose Development/Moose/AI/AI_BAI.lua similarity index 74% rename from Moose Development/Moose/AI/AI_Bomb.lua rename to Moose Development/Moose/AI/AI_BAI.lua index 406874ed1..4a973eaca 100644 --- a/Moose Development/Moose/AI/AI_Bomb.lua +++ b/Moose Development/Moose/AI/AI_BAI.lua @@ -1,22 +1,22 @@ ---- **AI** -- **Provide Close Air Support to friendly ground troops.** +--- **AI** -- **Provide Battleground Air Interdiction (bombing).** -- --- ![Banner Image](..\Presentations\AI_BOMB\Dia1.JPG) +-- ![Banner Image](..\Presentations\AI_BAI\Dia1.JPG) -- -- === -- --- AI_BOMB classes makes AI Controllables execute bombing tasks. +-- AI_BAI classes makes AI Controllables execute bombing tasks. -- --- There are the following types of BOMB classes defined: +-- There are the following types of BAI classes defined: -- --- * @{#AI_BOMB_ZONE}: Perform a BOMB in a zone. +-- * @{#AI_BAI_ZONE}: Perform a BAI in a zone. -- -- ==== -- -- # Demo Missions -- --- ### [AI_BOMB Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/BOMB%20-%20Close%20Air%20Support) +-- ### [AI_BAI Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/BOMB%20-%20Close%20Air%20Support) -- --- ### [AI_BOMB Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/BOMB%20-%20Close%20Air%20Support) +-- ### [AI_BAI Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/BOMB%20-%20Close%20Air%20Support) -- -- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases) -- @@ -24,7 +24,7 @@ -- -- # YouTube Channel -- --- ### [AI_BOMB YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3JBO1WDqqpyYRRmIkR2ir2) +-- ### [AI_BAI YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3JBO1WDqqpyYRRmIkR2ir2) -- -- === -- @@ -51,51 +51,51 @@ -- -- * **FlightControl**: Concept, Design & Programming. -- --- @module AI_Cas +-- @module AI_BAI ---- AI_BOMB_ZONE class --- @type AI_BOMB_ZONE +--- AI_BAI_ZONE class +-- @type AI_BAI_ZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed. -- @extends AI.AI_Patrol#AI_PATROL_ZONE ---- # AI_BOMB_ZONE class, extends @{AI_Patrol#AI_PATROL_ZONE} +--- # AI_BAI_ZONE class, extends @{AI_Patrol#AI_PATROL_ZONE} -- --- AI_BOMB_ZONE derives from the @{AI_Patrol#AI_PATROL_ZONE}, inheriting its methods and behaviour. +-- AI_BAI_ZONE derives from the @{AI_Patrol#AI_PATROL_ZONE}, inheriting its methods and behaviour. -- --- The AI_BOMB_ZONE class implements the core functions to provide Close Air Support in an Engage @{Zone} by an AIR @{Controllable} or @{Group}. --- The AI_BOMB_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone. +-- The AI_BAI_ZONE class implements the core functions to provide BattleGround Air Interdiction in an Engage @{Zone} by an AIR @{Controllable} or @{Group}. +-- The AI_BAI_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone. -- --- ![HoldAndEngage](..\Presentations\AI_BOMB\Dia3.JPG) +-- ![HoldAndEngage](..\Presentations\AI_BAI\Dia3.JPG) -- --- The AI_BOMB_ZONE is assigned a @{Group} and this must be done before the AI_BOMB_ZONE process can be started through the **Start** event. +-- The AI_BAI_ZONE is assigned a @{Group} and this must be done before the AI_BAI_ZONE process can be started through the **Start** event. -- --- ![Start Event](..\Presentations\AI_BOMB\Dia4.JPG) +-- ![Start Event](..\Presentations\AI_BAI\Dia4.JPG) -- -- Upon started, The AI will **Route** itself towards the random 3D point within a patrol zone, -- using a random speed within the given altitude and speed limits. -- Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits. -- This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -- --- ![Route Event](..\Presentations\AI_BOMB\Dia5.JPG) +-- ![Route Event](..\Presentations\AI_BAI\Dia5.JPG) -- --- When the AI is commanded to provide Close Air Support (through the event **Engage**), the AI will fly towards the Engage Zone. +-- When the AI is commanded to provide BattleGround Air Interdiction (through the event **Engage**), the AI will fly towards the Engage Zone. -- Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI. -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia6.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia6.JPG) -- -- The AI will detect the targets and will only destroy the targets within the Engage Zone. -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia7.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia7.JPG) -- -- Every target that is destroyed, is reported< by the AI. -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia8.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia8.JPG) -- -- Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone. -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia9.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia9.JPG) -- -- Until it is notified through the event **Accomplish**, which is to be triggered by an observing party: -- @@ -105,58 +105,58 @@ -- * a condition -- * others ... -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia10.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia10.JPG) -- --- When the AI has accomplished the BOMB, it will fly back to the Patrol Zone. +-- When the AI has accomplished the Bombing, it will fly back to the Patrol Zone. -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia11.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia11.JPG) -- -- It will keep patrolling there, until it is notified to RTB or move to another BOMB Zone. -- It can be notified to go RTB through the **RTB** event. -- -- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land. -- --- ![Engage Event](..\Presentations\AI_BOMB\Dia12.JPG) +-- ![Engage Event](..\Presentations\AI_BAI\Dia12.JPG) -- --- # 1. AI_BOMB_ZONE constructor +-- # 1. AI_BAI_ZONE constructor -- --- * @{#AI_BOMB_ZONE.New}(): Creates a new AI_BOMB_ZONE object. +-- * @{#AI_BAI_ZONE.New}(): Creates a new AI_BAI_ZONE object. -- --- ## 2. AI_BOMB_ZONE is a FSM +-- ## 2. AI_BAI_ZONE is a FSM -- --- ![Process](..\Presentations\AI_BOMB\Dia2.JPG) +-- ![Process](..\Presentations\AI_BAI\Dia2.JPG) -- --- ### 2.1. AI_BOMB_ZONE States +-- ### 2.1. AI_BAI_ZONE States -- -- * **None** ( Group ): The process is not started yet. -- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone. -- * **Engaging** ( Group ): The AI is engaging the targets in the Engage Zone, executing BOMB. -- * **Returning** ( Group ): The AI is returning to Base.. -- --- ### 2.2. AI_BOMB_ZONE Events +-- ### 2.2. AI_BAI_ZONE Events -- -- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process. -- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone. --- * **@{#AI_BOMB_ZONE.Engage}**: Engage the AI to provide BOMB in the Engage Zone, destroying any target it finds. --- * **@{#AI_BOMB_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone. +-- * **@{#AI_BAI_ZONE.Engage}**: Engage the AI to provide BOMB in the Engage Zone, destroying any target it finds. +-- * **@{#AI_BAI_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone. -- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base. -- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets. -- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets. --- * **@{#AI_BOMB_ZONE.Destroy}**: The AI has destroyed a target @{Unit}. --- * **@{#AI_BOMB_ZONE.Destroyed}**: The AI has destroyed all target @{Unit}s assigned in the BOMB task. +-- * **@{#AI_BAI_ZONE.Destroy}**: The AI has destroyed a target @{Unit}. +-- * **@{#AI_BAI_ZONE.Destroyed}**: The AI has destroyed all target @{Unit}s assigned in the BOMB task. -- * **Status**: The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB. -- -- === -- --- @field #AI_BOMB_ZONE -AI_BOMB_ZONE = { - ClassName = "AI_BOMB_ZONE", +-- @field #AI_BAI_ZONE +AI_BAI_ZONE = { + ClassName = "AI_BAI_ZONE", } ---- Creates a new AI_BOMB_ZONE object --- @param #AI_BOMB_ZONE self +--- Creates a new AI_BAI_ZONE object +-- @param #AI_BAI_ZONE self -- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. @@ -164,22 +164,22 @@ AI_BOMB_ZONE = { -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. -- @param Core.Zone#ZONE_BASE EngageZone The zone where the engage will happen. -- @param Dcs.DCSTypes#AltitudeType PatrolAltType The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO --- @return #AI_BOMB_ZONE self -function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType ) +-- @return #AI_BAI_ZONE self +function AI_BAI_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType ) -- Inherits from BASE - local self = BASE:Inherit( self, AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) ) -- #AI_BOMB_ZONE + local self = BASE:Inherit( self, AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) ) -- #AI_BAI_ZONE self.EngageZone = EngageZone self.Accomplished = false self:SetDetectionZone( self.EngageZone ) - self:AddTransition( { "Patrolling", "Engaging" }, "Engage", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BOMB_ZONE. + self:AddTransition( { "Patrolling", "Engaging" }, "Engage", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE. --- OnBefore Transition Handler for Event Engage. - -- @function [parent=#AI_BOMB_ZONE] OnBeforeEngage - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnBeforeEngage + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -188,16 +188,16 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @return #boolean Return false to cancel Transition. --- OnAfter Transition Handler for Event Engage. - -- @function [parent=#AI_BOMB_ZONE] OnAfterEngage - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnAfterEngage + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. --- Synchronous Event Trigger for Event Engage. - -- @function [parent=#AI_BOMB_ZONE] Engage - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] Engage + -- @param #AI_BAI_ZONE self -- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone. -- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement. -- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (optional) Determines how much weapon will be released at each attack. @@ -207,8 +207,8 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @param Dcs.DCSTypes#Azimuth EngageDirection (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction. --- Asynchronous Event Trigger for Event Engage. - -- @function [parent=#AI_BOMB_ZONE] __Engage - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] __Engage + -- @param #AI_BAI_ZONE self -- @param #number Delay The delay in seconds. -- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone. -- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement. @@ -219,8 +219,8 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @param Dcs.DCSTypes#Azimuth EngageDirection (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction. --- OnLeave Transition Handler for State Engaging. --- @function [parent=#AI_BOMB_ZONE] OnLeaveEngaging --- @param #AI_BOMB_ZONE self +-- @function [parent=#AI_BAI_ZONE] OnLeaveEngaging +-- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -228,20 +228,20 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @return #boolean Return false to cancel Transition. --- OnEnter Transition Handler for State Engaging. --- @function [parent=#AI_BOMB_ZONE] OnEnterEngaging --- @param #AI_BOMB_ZONE self +-- @function [parent=#AI_BAI_ZONE] OnEnterEngaging +-- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. - self:AddTransition( "Engaging", "Target", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BOMB_ZONE. + self:AddTransition( "Engaging", "Target", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE. - self:AddTransition( "Engaging", "Fired", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BOMB_ZONE. + self:AddTransition( "Engaging", "Fired", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE. --- OnBefore Transition Handler for Event Fired. - -- @function [parent=#AI_BOMB_ZONE] OnBeforeFired - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnBeforeFired + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -249,27 +249,27 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @return #boolean Return false to cancel Transition. --- OnAfter Transition Handler for Event Fired. - -- @function [parent=#AI_BOMB_ZONE] OnAfterFired - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnAfterFired + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. --- Synchronous Event Trigger for Event Fired. - -- @function [parent=#AI_BOMB_ZONE] Fired - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] Fired + -- @param #AI_BAI_ZONE self --- Asynchronous Event Trigger for Event Fired. - -- @function [parent=#AI_BOMB_ZONE] __Fired - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] __Fired + -- @param #AI_BAI_ZONE self -- @param #number Delay The delay in seconds. - self:AddTransition( "*", "Destroy", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_BOMB_ZONE. + self:AddTransition( "*", "Destroy", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE. --- OnBefore Transition Handler for Event Destroy. - -- @function [parent=#AI_BOMB_ZONE] OnBeforeDestroy - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnBeforeDestroy + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -277,28 +277,28 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @return #boolean Return false to cancel Transition. --- OnAfter Transition Handler for Event Destroy. - -- @function [parent=#AI_BOMB_ZONE] OnAfterDestroy - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnAfterDestroy + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. --- Synchronous Event Trigger for Event Destroy. - -- @function [parent=#AI_BOMB_ZONE] Destroy - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] Destroy + -- @param #AI_BAI_ZONE self --- Asynchronous Event Trigger for Event Destroy. - -- @function [parent=#AI_BOMB_ZONE] __Destroy - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] __Destroy + -- @param #AI_BAI_ZONE self -- @param #number Delay The delay in seconds. - self:AddTransition( "Engaging", "Abort", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_BOMB_ZONE. + self:AddTransition( "Engaging", "Abort", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE. --- OnBefore Transition Handler for Event Abort. - -- @function [parent=#AI_BOMB_ZONE] OnBeforeAbort - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnBeforeAbort + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -306,27 +306,27 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @return #boolean Return false to cancel Transition. --- OnAfter Transition Handler for Event Abort. - -- @function [parent=#AI_BOMB_ZONE] OnAfterAbort - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnAfterAbort + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. --- Synchronous Event Trigger for Event Abort. - -- @function [parent=#AI_BOMB_ZONE] Abort - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] Abort + -- @param #AI_BAI_ZONE self --- Asynchronous Event Trigger for Event Abort. - -- @function [parent=#AI_BOMB_ZONE] __Abort - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] __Abort + -- @param #AI_BAI_ZONE self -- @param #number Delay The delay in seconds. - self:AddTransition( "Engaging", "Accomplish", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_BOMB_ZONE. + self:AddTransition( "Engaging", "Accomplish", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE. --- OnBefore Transition Handler for Event Accomplish. - -- @function [parent=#AI_BOMB_ZONE] OnBeforeAccomplish - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnBeforeAccomplish + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -334,20 +334,20 @@ function AI_BOMB_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitud -- @return #boolean Return false to cancel Transition. --- OnAfter Transition Handler for Event Accomplish. - -- @function [parent=#AI_BOMB_ZONE] OnAfterAccomplish - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] OnAfterAccomplish + -- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. --- Synchronous Event Trigger for Event Accomplish. - -- @function [parent=#AI_BOMB_ZONE] Accomplish - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] Accomplish + -- @param #AI_BAI_ZONE self --- Asynchronous Event Trigger for Event Accomplish. - -- @function [parent=#AI_BOMB_ZONE] __Accomplish - -- @param #AI_BOMB_ZONE self + -- @function [parent=#AI_BAI_ZONE] __Accomplish + -- @param #AI_BAI_ZONE self -- @param #number Delay The delay in seconds. return self @@ -355,10 +355,10 @@ end --- Set the Engage Zone where the AI is performing BOMB. Note that if the EngageZone is changed, the AI needs to re-detect targets. --- @param #AI_BOMB_ZONE self +-- @param #AI_BAI_ZONE self -- @param Core.Zone#ZONE EngageZone The zone where the AI is performing BOMB. --- @return #AI_BOMB_ZONE self -function AI_BOMB_ZONE:SetEngageZone( EngageZone ) +-- @return #AI_BAI_ZONE self +function AI_BAI_ZONE:SetEngageZone( EngageZone ) self:F2() if EngageZone then @@ -371,12 +371,12 @@ end --- onafter State Transition for Event Start. --- @param #AI_BOMB_ZONE self +-- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. -function AI_BOMB_ZONE:onafterStart( Controllable, From, Event, To ) +function AI_BAI_ZONE:onafterStart( Controllable, From, Event, To ) -- Call the parent Start event handler self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) @@ -389,29 +389,29 @@ end function _NewEngageRoute( AIControllable ) AIControllable:T( "NewEngageRoute" ) - local EngageZone = AIControllable:GetState( AIControllable, "EngageZone" ) -- AI.AI_Cas#AI_BOMB_ZONE + local EngageZone = AIControllable:GetState( AIControllable, "EngageZone" ) -- AI.AI_BAI#AI_BAI_ZONE EngageZone:__Engage( 1, EngageZone.EngageSpeed, EngageZone.EngageAltitude, EngageZone.EngageWeaponExpend, EngageZone.EngageAttackQty, EngageZone.EngageDirection ) end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. -function AI_BOMB_ZONE:onbeforeEngage( Controllable, From, Event, To ) +function AI_BAI_ZONE:onbeforeEngage( Controllable, From, Event, To ) if self.Accomplished == true then return false end end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. -function AI_BOMB_ZONE:onafterTarget( Controllable, From, Event, To ) +function AI_BAI_ZONE:onafterTarget( Controllable, From, Event, To ) self:E("onafterTarget") if Controllable:IsAlive() then @@ -440,17 +440,17 @@ function AI_BOMB_ZONE:onafterTarget( Controllable, From, Event, To ) end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. -function AI_BOMB_ZONE:onafterAbort( Controllable, From, Event, To ) +function AI_BAI_ZONE:onafterAbort( Controllable, From, Event, To ) Controllable:ClearTasks() self:__Route( 1 ) end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. @@ -460,7 +460,7 @@ end -- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion. -- @param #number EngageAttackQty (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo. -- @param Dcs.DCSTypes#Azimuth EngageDirection (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction. -function AI_BOMB_ZONE:onafterEngage( Controllable, From, Event, To, +function AI_BAI_ZONE:onafterEngage( Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, @@ -497,18 +497,19 @@ function AI_BOMB_ZONE:onafterEngage( Controllable, From, Event, To, local AttackTasks = {} - for DetectedUnitID, DetectedUnit in pairs( self.DetectedUnits ) do - local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT + for DetectedUnitID, DetectedUnitData in pairs( self.DetectedUnits ) do + local DetectedUnit = DetectedUnitData -- Wrapper.Unit#UNIT self:T( DetectedUnit ) if DetectedUnit:IsAlive() then if DetectedUnit:IsInZone( self.EngageZone ) then self:E( {"Engaging ", DetectedUnit } ) - AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit, - true, - EngageWeaponExpend, - EngageAttackQty, - EngageDirection - ) + AttackTasks[#AttackTasks+1] = Controllable:TaskBombing( + DetectedUnit:GetPointVec2():GetVec2(), + true, + EngageWeaponExpend, + EngageAttackQty, + EngageDirection + ) end else self.DetectedUnits[DetectedUnit] = nil @@ -558,24 +559,24 @@ function AI_BOMB_ZONE:onafterEngage( Controllable, From, Event, To, end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. -function AI_BOMB_ZONE:onafterAccomplish( Controllable, From, Event, To ) +function AI_BAI_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true self:SetDetectionDeactivated() end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. -- @param Core.Event#EVENTDATA EventData -function AI_BOMB_ZONE:onafterDestroy( Controllable, From, Event, To, EventData ) +function AI_BAI_ZONE:onafterDestroy( Controllable, From, Event, To, EventData ) if EventData.IniUnit then self.DetectedUnits[EventData.IniUnit] = nil @@ -583,9 +584,9 @@ function AI_BOMB_ZONE:onafterDestroy( Controllable, From, Event, To, EventData ) end ---- @param #AI_BOMB_ZONE self +--- @param #AI_BAI_ZONE self -- @param Core.Event#EVENTDATA EventData -function AI_BOMB_ZONE:OnEventDead( EventData ) +function AI_BAI_ZONE:OnEventDead( EventData ) self:F( { "EventDead", EventData } ) if EventData.IniDCSUnit then diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index ec62872f1..a1c038a40 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -585,14 +585,14 @@ end --- (AIR) Delivering weapon at the point on the ground. -- @param #CONTROLLABLE self -- @param Dcs.DCSTypes#Vec2 Vec2 2D-coordinates of the point to deliver weapon at. --- @param #number WeaponType (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage. +-- @param #boolean GroupAttack (optional) Flag indicates that the target must be engaged by all aircrafts of the group. Has effect only if the task is assigned to a group, not to a single aircraft. -- @param Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion. -- @param #number AttackQty (optional) Desired quantity of passes. The parameter is not the same in AttackGroup and AttackUnit tasks. -- @param Dcs.DCSTypes#Azimuth Direction (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction. --- @param #boolean ControllableAttack (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft. +-- @param #number WeaponType (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage. -- @return Dcs.DCSTasking.Task#Task The DCS task structure. -function CONTROLLABLE:TaskBombing( Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack ) - self:F2( { self.ControllableName, Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack } ) +function CONTROLLABLE:TaskBombing( Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, WeaponType ) + self:F2( { self.ControllableName, Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, WeaponType } ) -- Bombing = { -- id = 'Bombing', @@ -607,15 +607,17 @@ function CONTROLLABLE:TaskBombing( Vec2, WeaponType, WeaponExpend, AttackQty, Di -- } local DCSTask - DCSTask = { id = 'Bombing', + DCSTask = { + id = 'Bombing', params = { - point = Vec2, - weaponType = WeaponType, - expend = WeaponExpend, - attackQty = AttackQty, - direction = Direction, - controllableAttack = ControllableAttack, - }, + point = Vec2, + groupAttack = GroupAttack, + expend = WeaponExpend or "Auto", + attackQty = AttackQty, + directionEnabled = Direction and true or false, + direction = Direction, + weaponType = WeaponType, + }, }, self:T3( { DCSTask } ) diff --git a/Moose Mission Setup/Moose.files b/Moose Mission Setup/Moose.files index 2de1eb7b3..6cc1565c1 100644 --- a/Moose Mission Setup/Moose.files +++ b/Moose Mission Setup/Moose.files @@ -43,6 +43,7 @@ AI/AI_Balancer.lua AI/AI_Patrol.lua AI/AI_Cap.lua AI/AI_Cas.lua +AI/AI_Bai.lua Actions/Act_Assign.lua Actions/Act_Route.lua diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index c384faa86..0e752810b 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170426_1017' ) +env.info( 'Moose Generation Timestamp: 20170509_1016' ) local base = _G @@ -62,6 +62,7 @@ __Moose.Include( 'AI/AI_Balancer.lua' ) __Moose.Include( 'AI/AI_Patrol.lua' ) __Moose.Include( 'AI/AI_Cap.lua' ) __Moose.Include( 'AI/AI_Cas.lua' ) +__Moose.Include( 'AI/AI_Bai.lua' ) __Moose.Include( 'Actions/Act_Assign.lua' ) __Moose.Include( 'Actions/Act_Route.lua' ) __Moose.Include( 'Actions/Act_Account.lua' ) diff --git a/Utils/Slate Documentation Generator/bin/TreeHierarchy.csv b/Utils/Slate Documentation Generator/bin/TreeHierarchy.csv index 41eb85a6a..11299e7e5 100644 --- a/Utils/Slate Documentation Generator/bin/TreeHierarchy.csv +++ b/Utils/Slate Documentation Generator/bin/TreeHierarchy.csv @@ -1,22 +1,22 @@ -@K=function, @M=Task_A2G, @N=onafterRouteToRendezVous, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=5129, -@K=function, @M=Task_A2G, @N=OnAfterArriveAtRendezVous, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=5789, -@K=function, @M=Task_A2G, @N=onafterEngage, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=6186, -@K=function, @M=Task_A2G, @N=onafterRouteToTarget, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=6508, -@K=function, @M=Task_A2G, @N=onafterRouteToTargets, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=7380, -@K=function, @M=Task_Cargo, @N=onenterWaitingForCommand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=10431, -@K=function, @M=Task_Cargo, @N=OnLeaveWaitingForCommand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=12652, -@K=function, @M=Task_Cargo, @N=onafterRouteToPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=13428, -@K=function, @M=Task_Cargo, @N=onafterArriveAtPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=13882, -@K=function, @M=Task_Cargo, @N=onafterRouteToDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=14310, -@K=function, @M=Task_Cargo, @N=onafterArriveAtDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=14757, -@K=function, @M=Task_Cargo, @N=onafterLand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15187, -@K=function, @M=Task_Cargo, @N=onafterLanded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16069, -@K=function, @M=Task_Cargo, @N=onafterPrepareBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16762, -@K=function, @M=Task_Cargo, @N=onafterBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=17166, -@K=function, @M=Task_Cargo, @N=onafterBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=18074, -@K=function, @M=Task_Cargo, @N=onafterPrepareUnBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=18704, -@K=function, @M=Task_Cargo, @N=onafterUnBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19134, -@K=function, @M=Task_Cargo, @N=onafterUnBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19788, +@K=function, @M=Task_A2G, @N=onafterRouteToRendezVous, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=5157, +@K=function, @M=Task_A2G, @N=OnAfterArriveAtRendezVous, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=5817, +@K=function, @M=Task_A2G, @N=onafterEngage, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=6214, +@K=function, @M=Task_A2G, @N=onafterRouteToTarget, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=6536, +@K=function, @M=Task_A2G, @N=onafterRouteToTargets, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=7408, +@K=function, @M=Task_Cargo, @N=onafterSelectAction, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=10439, +@K=function, @M=Task_Cargo, @N=OnLeaveWaitingForCommand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=13082, +@K=function, @M=Task_Cargo, @N=onafterRouteToPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=13858, +@K=function, @M=Task_Cargo, @N=onafterArriveAtPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=14477, +@K=function, @M=Task_Cargo, @N=onafterRouteToDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15018, +@K=function, @M=Task_Cargo, @N=onafterArriveAtDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15465, +@K=function, @M=Task_Cargo, @N=onafterLand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15895, +@K=function, @M=Task_Cargo, @N=onafterLanded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16854, +@K=function, @M=Task_Cargo, @N=onafterPrepareBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=17620, +@K=function, @M=Task_Cargo, @N=onafterBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=18080, +@K=function, @M=Task_Cargo, @N=onafterBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19021, +@K=function, @M=Task_Cargo, @N=onafterPrepareUnBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19704, +@K=function, @M=Task_Cargo, @N=onafterUnBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=20664, +@K=function, @M=Task_Cargo, @N=onafterUnBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=21539, @K=function, @M=Designate, @N=OnBeforeLaseOn, @P=DESIGNATE , @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua, @C=12232, @K=function, @M=Designate, @N=OnAfterLaseOn, @P=DESIGNATE , @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua, @C=12480, @K=function, @M=Designate, @N=LaseOn, @P=DESIGNATE , @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua, @C=12701, diff --git a/docs/Documentation/AI_BAI.html b/docs/Documentation/AI_BAI.html new file mode 100644 index 000000000..2234f5318 --- /dev/null +++ b/docs/Documentation/AI_BAI.html @@ -0,0 +1,1875 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AI_BAI

+ +

AI -- Provide Battleground Air Interdiction (bombing).

+ +

Banner Image

+ +
+ +

AI_BAI classes makes AI Controllables execute bombing tasks.

+ + + +

There are the following types of BAI classes defined:

+ + + +
+ +

Demo Missions

+ +

AI_BAI Demo Missions source code

+ +

AI_BAI Demo Missions, only for beta testers

+ +

ALL Demo Missions pack of the last release

+ +
+ +

YouTube Channel

+ +

AI_BAI YouTube Channel

+ +
+ +

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-15: Initial class and API.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ + + +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming.
  • +
+ + +

Global(s)

+ + + + + + + + + +
AI_BAI_ZONE +

AIBAIZONE class, extends AIPatrol#AIPATROL_ZONE

+ +

AIBAIZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

+
_NewEngageRoute(AIControllable) + +
+

Type AI_BAI_ZONE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_BAI_ZONE.AIControllable +

The Controllable patrolling.

+
AI_BAI_ZONE:Abort() +

Synchronous Event Trigger for Event Abort.

+
AI_BAI_ZONE:Accomplish() +

Synchronous Event Trigger for Event Accomplish.

+
AI_BAI_ZONE.Accomplished + +
AI_BAI_ZONE:Destroy() +

Synchronous Event Trigger for Event Destroy.

+
AI_BAI_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) +

Synchronous Event Trigger for Event Engage.

+
AI_BAI_ZONE.EngageAltitude + +
AI_BAI_ZONE.EngageAttackQty + +
AI_BAI_ZONE.EngageDirection + +
AI_BAI_ZONE.EngageSpeed + +
AI_BAI_ZONE.EngageWeaponExpend + +
AI_BAI_ZONE.EngageZone + +
AI_BAI_ZONE:Fired() +

Synchronous Event Trigger for Event Fired.

+
AI_BAI_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) +

Creates a new AIBAIZONE object

+
AI_BAI_ZONE:OnAfterAbort(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Abort.

+
AI_BAI_ZONE:OnAfterAccomplish(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Accomplish.

+
AI_BAI_ZONE:OnAfterDestroy(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Destroy.

+
AI_BAI_ZONE:OnAfterEngage(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Engage.

+
AI_BAI_ZONE:OnAfterFired(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Fired.

+
AI_BAI_ZONE:OnBeforeAbort(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Abort.

+
AI_BAI_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Accomplish.

+
AI_BAI_ZONE:OnBeforeDestroy(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Destroy.

+
AI_BAI_ZONE:OnBeforeEngage(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Engage.

+
AI_BAI_ZONE:OnBeforeFired(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Fired.

+
AI_BAI_ZONE:OnEnterEngaging(Controllable, From, Event, To) +

OnEnter Transition Handler for State Engaging.

+
AI_BAI_ZONE:OnEventDead(EventData) + +
AI_BAI_ZONE:OnLeaveEngaging(Controllable, From, Event, To) +

OnLeave Transition Handler for State Engaging.

+
AI_BAI_ZONE:SetEngageZone(EngageZone) +

Set the Engage Zone where the AI is performing BOMB.

+
AI_BAI_ZONE.TargetZone +

The Zone where the patrol needs to be executed.

+
AI_BAI_ZONE:__Abort(Delay) +

Asynchronous Event Trigger for Event Abort.

+
AI_BAI_ZONE:__Accomplish(Delay) +

Asynchronous Event Trigger for Event Accomplish.

+
AI_BAI_ZONE:__Destroy(Delay) +

Asynchronous Event Trigger for Event Destroy.

+
AI_BAI_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) +

Asynchronous Event Trigger for Event Engage.

+
AI_BAI_ZONE:__Fired(Delay) +

Asynchronous Event Trigger for Event Fired.

+
AI_BAI_ZONE:onafterAbort(Controllable, From, Event, To) + +
AI_BAI_ZONE:onafterAccomplish(Controllable, From, Event, To) + +
AI_BAI_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) + +
AI_BAI_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
AI_BAI_ZONE:onafterStart(Controllable, From, Event, To) +

onafter State Transition for Event Start.

+
AI_BAI_ZONE:onafterTarget(Controllable, From, Event, To) + +
AI_BAI_ZONE:onbeforeEngage(Controllable, From, Event, To) + +
+ +

Global(s)

+
+
+ + #AI_BAI_ZONE + +AI_BAI_ZONE + +
+
+ +

AIBAIZONE class, extends AIPatrol#AIPATROL_ZONE

+ +

AIBAIZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

+ + +

+The AIBAIZONE class implements the core functions to provide BattleGround Air Interdiction in an Engage Zone by an AIR Controllable or Group. +The AIBAIZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.

+ +

HoldAndEngage

+ +

The AIBAIZONE is assigned a Group and this must be done before the AIBAIZONE process can be started through the Start event.

+ +

Start Event

+ +

Upon started, The AI will Route itself towards the random 3D point within a patrol zone, +using a random speed within the given altitude and speed limits. +Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits. +This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.

+ +

Route Event

+ +

When the AI is commanded to provide BattleGround Air Interdiction (through the event Engage), the AI will fly towards the Engage Zone. +Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.

+ +

Engage Event

+ +

The AI will detect the targets and will only destroy the targets within the Engage Zone.

+ +

Engage Event

+ +

Every target that is destroyed, is reported< by the AI.

+ +

Engage Event

+ +

Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.

+ +

Engage Event

+ +

Until it is notified through the event Accomplish, which is to be triggered by an observing party:

+ +
    +
  • a FAC
  • +
  • a timed event
  • +
  • a menu option selected by a human
  • +
  • a condition
  • +
  • others ...
  • +
+ +

Engage Event

+ +

When the AI has accomplished the BOMB, it will fly back to the Patrol Zone.

+ +

Engage Event

+ +

It will keep patrolling there, until it is notified to RTB or move to another BOMB Zone. +It can be notified to go RTB through the RTB event.

+ +

When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

+ +

Engage Event

+ +

1. AIBAIZONE constructor

+ + + +

2. AIBAIZONE is a FSM

+ +

Process

+ +

2.1. AIBAIZONE States

+ +
    +
  • None ( Group ): The process is not started yet.
  • +
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • +
  • Engaging ( Group ): The AI is engaging the targets in the Engage Zone, executing BOMB.
  • +
  • Returning ( Group ): The AI is returning to Base..
  • +
+ +

2.2. AIBAIZONE Events

+ + + +
+ + +
+
+
+
+ + +_NewEngageRoute(AIControllable) + +
+
+ + + +

Parameter

+ +
+
+

Type AI_BAI

+ +

Type AI_BAI_ZONE

+ +

AIBAIZONE class

+ +

Field(s)

+
+
+ + Wrapper.Controllable#CONTROLLABLE + +AI_BAI_ZONE.AIControllable + +
+
+ +

The Controllable patrolling.

+ +
+
+
+
+ + +AI_BAI_ZONE:Abort() + +
+
+ +

Synchronous Event Trigger for Event Abort.

+ +
+
+
+
+ + +AI_BAI_ZONE:Accomplish() + +
+
+ +

Synchronous Event Trigger for Event Accomplish.

+ +
+
+
+
+ + #boolean + +AI_BAI_ZONE.Accomplished + +
+
+ + + +
+
+
+
+ + +AI_BAI_ZONE:Destroy() + +
+
+ +

Synchronous Event Trigger for Event Destroy.

+ +
+
+
+
+ + +AI_BAI_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
+
+ +

Synchronous Event Trigger for Event Engage.

+ +

Parameters

+
    +
  • + +

    #number EngageSpeed : +(optional) The speed the Group will hold when engaging to the target zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance EngageAltitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : +(optional) Determines how much weapon will be released at each attack. +If parameter is not defined the unit / controllable will choose expend on its own discretion. +Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

    + +
  • +
  • + +

    #number EngageAttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth EngageDirection : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE.EngageAltitude + +
+
+ + + +
+
+
+
+ + + +AI_BAI_ZONE.EngageAttackQty + +
+
+ + + +
+
+
+
+ + + +AI_BAI_ZONE.EngageDirection + +
+
+ + + +
+
+
+
+ + +AI_BAI_ZONE.EngageSpeed + +
+
+ + + +
+
+
+
+ + + +AI_BAI_ZONE.EngageWeaponExpend + +
+
+ + + +
+
+
+
+ + + +AI_BAI_ZONE.EngageZone + +
+
+ + + +
+
+
+
+ + +AI_BAI_ZONE:Fired() + +
+
+ +

Synchronous Event Trigger for Event Fired.

+ +
+
+
+
+ + +AI_BAI_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) + +
+
+ +

Creates a new AIBAIZONE object

+ +

Parameters

+ +

Return value

+ +

#AIBAIZONE: +self

+ +
+
+
+
+ + +AI_BAI_ZONE:OnAfterAbort(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Abort.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnAfterAccomplish(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Accomplish.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnAfterDestroy(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Destroy.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnAfterEngage(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Engage.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnAfterFired(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Fired.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnBeforeAbort(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Abort.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_BAI_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Accomplish.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_BAI_ZONE:OnBeforeDestroy(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Destroy.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_BAI_ZONE:OnBeforeEngage(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Engage.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnBeforeFired(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Fired.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_BAI_ZONE:OnEnterEngaging(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Engaging.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:OnEventDead(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +AI_BAI_ZONE:OnLeaveEngaging(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Engaging.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_BAI_ZONE:SetEngageZone(EngageZone) + +
+
+ +

Set the Engage Zone where the AI is performing BOMB.

+ + +

Note that if the EngageZone is changed, the AI needs to re-detect targets.

+ +

Parameter

+
    +
  • + +

    Core.Zone#ZONE EngageZone : +The zone where the AI is performing BOMB.

    + +
  • +
+

Return value

+ +

#AIBAIZONE: +self

+ +
+
+
+
+ + Core.Zone#ZONE_BASE + +AI_BAI_ZONE.TargetZone + +
+
+ +

The Zone where the patrol needs to be executed.

+ +
+
+
+
+ + +AI_BAI_ZONE:__Abort(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Abort.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:__Accomplish(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Accomplish.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:__Destroy(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Destroy.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
+
+ +

Asynchronous Event Trigger for Event Engage.

+ +

Parameters

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
  • + +

    #number EngageSpeed : +(optional) The speed the Group will hold when engaging to the target zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance EngageAltitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : +(optional) Determines how much weapon will be released at each attack. +If parameter is not defined the unit / controllable will choose expend on its own discretion. +Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

    + +
  • +
  • + +

    #number EngageAttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth EngageDirection : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:__Fired(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Fired.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onafterAbort(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onafterAccomplish(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    Core.Event#EVENTDATA EventData :

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    #number EngageSpeed : +(optional) The speed the Group will hold when engaging to the target zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance EngageAltitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number EngageAttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth EngageDirection : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onafterStart(Controllable, From, Event, To) + +
+
+ +

onafter State Transition for Event Start.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onafterTarget(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_BAI_ZONE:onbeforeEngage(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html index 230ca6776..8230fd694 100644 --- a/docs/Documentation/AI_Balancer.html +++ b/docs/Documentation/AI_Balancer.html @@ -17,6 +17,7 @@ index diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html index 01bc9464a..f9b40732f 100644 --- a/docs/Documentation/DCSAirbase.html +++ b/docs/Documentation/DCSAirbase.html @@ -17,6 +17,7 @@ index + +
+
+ + +EVENT:CreateEventPlayerEnterUnit(PlayerUnit) + +
+
+ +

Creation of a SEVENTPLAYERENTERUNIT Event.

+ +

Parameter

+ +
diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index 425da196e..b832094de 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • @@ -1622,7 +1623,7 @@ A string defining the start state.

    - #string + FSM._StartState @@ -1921,6 +1922,7 @@ A string defining the start state.

    + FSM.current diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html index 9f0a9032c..d970725e0 100644 --- a/docs/Documentation/Group.html +++ b/docs/Documentation/Group.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html index 09726bbec..c049a8f65 100644 --- a/docs/Documentation/Identifiable.html +++ b/docs/Documentation/Identifiable.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html index a108b8568..f294044d9 100644 --- a/docs/Documentation/Menu.html +++ b/docs/Documentation/Menu.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html index 0b06cafbb..3d8c4d78f 100644 --- a/docs/Documentation/Message.html +++ b/docs/Documentation/Message.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html index 163c4d7fb..88159742b 100644 --- a/docs/Documentation/MissileTrainer.html +++ b/docs/Documentation/MissileTrainer.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html index 96f09fc56..fa18d7ec0 100644 --- a/docs/Documentation/Mission.html +++ b/docs/Documentation/Mission.html @@ -17,6 +17,7 @@ index

Return value

-

#boolean: -true if Unit is part of a Task in the Mission.

+

#MISSION:

+
@@ -601,6 +644,20 @@ is the Task object.

Tasking.Task#TASK: The task added.

+ + +
+
+ + + +MISSION.AssignedGroups + +
+
+ + +
@@ -615,6 +672,32 @@ The task added.

+ +
+
+
+ + +MISSION:ClearGroupAssignment(MissionGroup) + +
+
+ +

Clear the Group assignment from the Mission.

+ +

Parameter

+ +

Return value

+ +

#MISSION:

+ +
@@ -657,8 +740,8 @@ The CLIENT or UNIT of the Player crashing.

Return value

-

#boolean: -true if Unit is part of a Task in the Mission.

+

#MISSION:

+
@@ -840,6 +923,24 @@ Returns nil if no task was found.

+ +MISSION:GetTaskTypes() + +
+
+ + + +

Return value

+ +

#number:

+ + +
+
+
+
+ MISSION:GetTasks() @@ -970,6 +1071,32 @@ true if the Mission has a Group.

#boolean:

+ +
+
+
+ + +MISSION:IsGroupAssigned(MissionGroup) + +
+
+ +

Returns if the Mission is assigned to the Group.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ +
@@ -1907,6 +2034,67 @@ self

#string:

+ +
+
+
+ + +MISSION:ReportPlayers() + +
+
+ +

Create a player report of the Mission.

+ + +

This reports provides a one liner of the mission status. It indicates how many players and how many Tasks.

+ +
Mission "<MissionName>" - Status "<MissionStatus>"
+ - Player "<PlayerName>: Task <TaskName> <TaskStatus>, Task <TaskName> <TaskStatus>
+ - Player <PlayerName>: Task <TaskName> <TaskStatus>, Task <TaskName> <TaskStatus>
+ - ..
+
+ + +

Return value

+ +

#string:

+ + +
+
+
+
+ + +MISSION:ReportStatus() + +
+
+ +

Create a status report of the Mission.

+ + +

This reports provides a one liner of the mission status. It indicates how many players and how many Tasks.

+ +
Mission "<MissionName>" - Status "<MissionStatus>"
+ - Task Types: <TaskType>, <TaskType>
+ - <xx> Planned Tasks (xp)
+ - <xx> Assigned Tasks(xp)
+ - <xx> Success Tasks (xp)
+ - <xx> Hold Tasks (xp)
+ - <xx> Cancelled Tasks (xp)
+ - <xx> Aborted Tasks (xp)
+ - <xx> Failed Tasks (xp)
+
+ + +

Return value

+ +

#string:

+ +
@@ -1939,6 +2127,32 @@ self

+ +
+
+
+ + +MISSION:SetGroupAssigned(MissionGroup) + +
+
+ +

Set Group assigned to the Mission.

+ +

Parameter

+ +

Return value

+ +

#MISSION:

+ +
diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html index a7de96e12..3adb3bd89 100644 --- a/docs/Documentation/Movement.html +++ b/docs/Documentation/Movement.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html index eb4b6b090..63145ee4b 100644 --- a/docs/Documentation/Object.html +++ b/docs/Documentation/Object.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index c2551b2fa..d487eeafe 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • @@ -1971,6 +1972,7 @@ The new calculated POINT_VEC2.

    + POINT_VEC2.z diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html index 750f76f48..d9dea20e8 100644 --- a/docs/Documentation/Positionable.html +++ b/docs/Documentation/Positionable.html @@ -17,6 +17,7 @@ index
diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html index 2f5617745..9e073a5a6 100644 --- a/docs/Documentation/Process_JTAC.html +++ b/docs/Documentation/Process_JTAC.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html index f3c04bde3..20b6065b6 100644 --- a/docs/Documentation/Process_Pickup.html +++ b/docs/Documentation/Process_Pickup.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html index 49e33bb80..74bfa4e8c 100644 --- a/docs/Documentation/Radio.html +++ b/docs/Documentation/Radio.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html index 4baad755b..4b4f79333 100644 --- a/docs/Documentation/Route.html +++ b/docs/Documentation/Route.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html index e67b955d0..114319f43 100644 --- a/docs/Documentation/Scenery.html +++ b/docs/Documentation/Scenery.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html index e64ef01f1..c5292e224 100644 --- a/docs/Documentation/ScheduleDispatcher.html +++ b/docs/Documentation/ScheduleDispatcher.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html index e995868a6..7981b1438 100644 --- a/docs/Documentation/Scheduler.html +++ b/docs/Documentation/Scheduler.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html index 9df3c05db..322b24998 100644 --- a/docs/Documentation/Scoring.html +++ b/docs/Documentation/Scoring.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html index 9dcd22068..dbf3167ec 100644 --- a/docs/Documentation/Sead.html +++ b/docs/Documentation/Sead.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html index fee8d1931..56e79058a 100644 --- a/docs/Documentation/Set.html +++ b/docs/Documentation/Set.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • @@ -976,6 +977,12 @@ mission designer to add a dedicated method

    Iterate the SET_UNIT sorted *per Threat Level and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

    + + + + SET_UNIT:GetFirst() + +

    Get the first unit from the set.

    @@ -4817,6 +4824,24 @@ self

    + +SET_UNIT:GetFirst() + +
    +
    + +

    Get the first unit from the set.

    + +

    Return value

    + +

    Wrapper.Unit#UNIT: +The UNIT object.

    + +
    +
    +
    +
    + SET_UNIT:GetTypeNames(Delimiter) diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html index c59546f49..136d8ac61 100644 --- a/docs/Documentation/Smoke.html +++ b/docs/Documentation/Smoke.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 05374facf..6bbc5b660 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -17,6 +17,7 @@ index
@@ -2541,6 +2545,9 @@ when nothing was spawned.

+ +

By default, no InitLimit

+
@@ -2576,7 +2583,7 @@ when nothing was spawned.

- + #number SPAWN.SpawnMaxGroups @@ -2593,7 +2600,7 @@ when nothing was spawned.

- + #number SPAWN.SpawnMaxUnitsAlive diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index aac7b1703..d1a622752 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • @@ -444,7 +445,6 @@ ptional) The name of the new static.

    - #number SPAWNSTATIC.SpawnIndex diff --git a/docs/Documentation/Spot.html b/docs/Documentation/Spot.html index 8e9ea64bc..acc195246 100644 --- a/docs/Documentation/Spot.html +++ b/docs/Documentation/Spot.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • @@ -761,6 +762,7 @@ true if it is lasing

    + SPOT.ScheduleID @@ -774,6 +776,7 @@ true if it is lasing

    + SPOT.SpotIR @@ -787,6 +790,7 @@ true if it is lasing

    + SPOT.SpotLaser @@ -800,6 +804,7 @@ true if it is lasing

    + SPOT.Target diff --git a/docs/Documentation/Static.html b/docs/Documentation/Static.html index 48567e339..ffa9fdb0e 100644 --- a/docs/Documentation/Static.html +++ b/docs/Documentation/Static.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html index 40915b9d3..b8eff3eed 100644 --- a/docs/Documentation/StaticObject.html +++ b/docs/Documentation/StaticObject.html @@ -17,6 +17,7 @@ index
    +
  • AI_BAI
  • AI_Balancer
  • AI_Cap
  • AI_Cas
  • diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html index 87c1f6f63..32e192c3f 100644 --- a/docs/Documentation/Task.html +++ b/docs/Documentation/Task.html @@ -17,6 +17,7 @@ index
+
+
+ + +TASK:ClearGroupAssignment(TaskGroup) + +
+
+ +

Clear the Group assignment from the Task.

+ +

Parameter

+ +

Return value

+ +

#TASK:

+ +
@@ -918,8 +986,8 @@ self

- -TASK:CrashUnit(PlayerUnit) + +TASK:CrashGroup(PlayerUnit, PlayerGroup)
@@ -931,19 +999,24 @@ self

If the Unit was not part of the Task, false is returned. If the Unit is part of the Task, true is returned.

-

Parameter

+

Parameters

  • Wrapper.Unit#UNIT PlayerUnit : The CLIENT or UNIT of the Player aborting the Task.

    +
  • +
  • + +

    PlayerGroup :

    +

Return value

-

#boolean: -true if Unit is part of the Task.

+

#TASK:

+
@@ -1017,6 +1090,24 @@ true if Unit is part of the Task.

+ +
+
+
+ + +TASK:GetBriefing() + +
+
+ +

Gets the Task briefing.

+ +

Return value

+ +

#string: +The briefing text.

+
@@ -1094,6 +1185,42 @@ The Task Name

+ +TASK:GetPlayerCount() + +
+
+ +

Create a count of the players in the Task.

+ +

Return value

+ +

#number: +The total number of players in the task.

+ +
+
+
+
+ + +TASK:GetPlayerNames() + +
+
+ +

Create a list of the players in the Task.

+ +

Return value

+ +

#map:

+

string,Wrapper.Group#GROUP> A map of the players

+ +
+
+
+
+ TASK:GetProcessTemplate(ProcessName) @@ -1177,6 +1304,24 @@ Scoring

+ +TASK:GetTaskBriefing() + +
+
+ +

Returns the Task briefing.

+ +

Return value

+ +

#string: +Task briefing.

+ +
+
+
+
+ TASK:GetTaskIndex() @@ -1327,8 +1472,8 @@ self

- -TASK:IsAssignedToGroup(TaskGroup) + +TASK:IsGroupAssigned(TaskGroup)
@@ -1594,7 +1739,7 @@ true if Unit is part of the Task.

-TASK:New(Mission, SetGroupAssign, TaskName, TaskType) +TASK:New(Mission, SetGroupAssign, TaskName, TaskType, TaskBriefing)
@@ -1629,6 +1774,11 @@ The name of the Task

#string TaskType : The type of the Task

+ +
  • + +

    TaskBriefing :

    +
  • Return value

    @@ -1725,6 +1875,37 @@ The name of the Player.

    + +TASK:RefreshMenus(TaskGroup, MenuTime) + +
    +
    + +

    Remove the menu option of the Task for a Group.

    + +

    Parameters

    + +

    Return value

    + +

    #TASK: +self

    + +
    +
    +
    +
    + TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) @@ -1777,37 +1958,6 @@ self

    #TASK:

    -
    -
    -
    -
    - - -TASK:RemovePlannedMenuForGroup(TaskGroup, MenuTime) - -
    -
    - -

    Remove the menu option of the Task for a Group.

    - -

    Parameters

    - -

    Return value

    - -

    #TASK: -self

    -
    @@ -2023,6 +2173,32 @@ self

    The Set of Groups assigned to the Task

    + +
    +
    +
    + + +TASK:SetGroupAssigned(TaskGroup) + +
    +
    + +

    Set Group assigned to the Task.

    + +

    Parameter

    + +

    Return value

    + +

    #TASK:

    + +
    @@ -2901,6 +3077,8 @@ self

    Type integer

    +

    Type map

    +
    diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html index 48a7ba5f0..fd355500d 100644 --- a/docs/Documentation/Task_A2G.html +++ b/docs/Documentation/Task_A2G.html @@ -17,6 +17,7 @@ index

    Return value

    @@ -900,7 +906,7 @@ The Zone object where the Target is located on the map.

    -TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) +TASK_BAI:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing)
    @@ -916,7 +922,7 @@ The Zone object where the Target is located on the map.

  • -

    Set#SET_GROUP SetGroup : +

    Core.Set#SET_GROUP SetGroup : The set of groups for which the Task can be assigned.

  • @@ -928,25 +934,13 @@ The name of the Task.

  • -

    Set#SET_UNIT UnitSetTargets :

    +

    Core.Set#SET_UNIT TargetSetUnit :

  • -

    #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

    - -
  • -
  • - -

    Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    - -
  • -
  • - -

    TargetSetUnit :

    +

    #string TaskBriefing : +The briefing of the task.

  • @@ -995,7 +989,7 @@ self

    -TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) +TASK_CAS:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing)
    @@ -1011,7 +1005,7 @@ self

  • -

    Set#SET_GROUP SetGroup : +

    Core.Set#SET_GROUP SetGroup : The set of groups for which the Task can be assigned.

  • @@ -1023,25 +1017,13 @@ The name of the Task.

  • -

    Set#SET_UNIT UnitSetTargets :

    +

    Core.Set#SET_UNIT TargetSetUnit :

  • -

    #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

    - -
  • -
  • - -

    Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    - -
  • -
  • - -

    TargetSetUnit :

    +

    #string TaskBriefing : +The briefing of the task.

  • @@ -1090,7 +1072,7 @@ self

    -TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit) +TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing)
    @@ -1106,7 +1088,7 @@ self

  • -

    Set#SET_GROUP SetGroup : +

    Core.Set#SET_GROUP SetGroup : The set of groups for which the Task can be assigned.

  • @@ -1118,7 +1100,13 @@ The name of the Task.

  • -

    Set#SET_UNIT TargetSetUnit :

    +

    Core.Set#SET_UNIT TargetSetUnit :

    + +
  • +
  • + +

    #string TaskBriefing : +The briefing of the task.

  • diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html index 197ead2ef..54ba3cfa4 100644 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ b/docs/Documentation/Task_A2G_Dispatcher.html @@ -17,6 +17,7 @@ index

    Return value

    @@ -936,6 +991,68 @@ The score in points.

    + +TASK_CARGO_TRANSPORT:CargoDeployed(TaskUnit, Cargo, DeployZone) + +
    +
    + +

    Synchronous Event Trigger for Event CargoDeployed.

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    • + +

      Core.Zone#ZONE DeployZone : +The zone where the Cargo got Deployed or UnBoarded.

      + +
    • +
    +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:CargoPickedUp(TaskUnit, Cargo) + +
    +
    + +

    Synchronous Event Trigger for Event CargoPickedUp.

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    +
    +
    +
    +
    + #string TASK_CARGO_TRANSPORT.ClassName @@ -969,7 +1086,7 @@ The score in points.

    -TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) +TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo, TaskBriefing)
    @@ -1000,6 +1117,12 @@ The name of the Task.

    Core.Set#SET_CARGO SetCargo : The scope of the cargo to be transported.

    + +
  • + +

    #string TaskBriefing : +The Cargo Task briefing.

    +
  • Return value

    @@ -1007,6 +1130,286 @@ The scope of the cargo to be transported.

    #TASKCARGOTRANSPORT: self

    +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:OnAfterCargoDeployed(From, Event, To, TaskUnit, Cargo, DeployZone) + +
    +
    + +

    OnAfter Transition Handler for Event CargoDeployed.

    + +

    Parameters

    +
      +
    • + +

      #string From : +The From State string.

      + +
    • +
    • + +

      #string Event : +The Event string.

      + +
    • +
    • + +

      #string To : +The To State string.

      + +
    • +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    • + +

      Core.Zone#ZONE DeployZone : +The zone where the Cargo got Deployed or UnBoarded.

      + +
    • +
    +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:OnAfterCargoPickedUp(From, Event, To, TaskUnit, Cargo) + +
    +
    + +

    OnAfter Transition Handler for Event CargoPickedUp.

    + +

    Parameters

    +
      +
    • + +

      #string From : +The From State string.

      + +
    • +
    • + +

      #string Event : +The Event string.

      + +
    • +
    • + +

      #string To : +The To State string.

      + +
    • +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:OnBeforeCargoDeployed(From, Event, To, TaskUnit, Cargo, DeployZone) + +
    +
    + +

    OnBefore Transition Handler for Event CargoDeployed.

    + +

    Parameters

    +
      +
    • + +

      #string From : +The From State string.

      + +
    • +
    • + +

      #string Event : +The Event string.

      + +
    • +
    • + +

      #string To : +The To State string.

      + +
    • +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    • + +

      Core.Zone#ZONE DeployZone : +The zone where the Cargo got Deployed or UnBoarded.

      + +
    • +
    +

    Return value

    + +

    #boolean: +Return false to cancel Transition.

    + +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:OnBeforeCargoPickedUp(From, Event, To, TaskUnit, Cargo) + +
    +
    + +

    OnBefore Transition Handler for Event CargoPickedUp.

    + +

    Parameters

    +
      +
    • + +

      #string From : +The From State string.

      + +
    • +
    • + +

      #string Event : +The Event string.

      + +
    • +
    • + +

      #string To : +The To State string.

      + +
    • +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    +

    Return value

    + +

    #boolean: +Return false to cancel Transition.

    + +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:__CargoDeployed(Delay, TaskUnit, Cargo, DeployZone) + +
    +
    + +

    Asynchronous Event Trigger for Event CargoDeployed.

    + +

    Parameters

    +
      +
    • + +

      #number Delay : +The delay in seconds.

      + +
    • +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    • + +

      Core.Zone#ZONE DeployZone : +The zone where the Cargo got Deployed or UnBoarded.

      + +
    • +
    +
    +
    +
    +
    + + +TASK_CARGO_TRANSPORT:__CargoPickedUp(Delay, TaskUnit, Cargo) + +
    +
    + +

    Asynchronous Event Trigger for Event CargoPickedUp.

    + +

    Parameters

    +
      +
    • + +

      #number Delay : +The delay in seconds.

      + +
    • +
    • + +

      Wrapper.Unit#UNIT TaskUnit : +The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      + +
    • +
    • + +

      Core.Cargo#CARGO Cargo : +The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      + +
    • +
    diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html index 3a8412d01..62f018d83 100644 --- a/docs/Documentation/Task_PICKUP.html +++ b/docs/Documentation/Task_PICKUP.html @@ -17,6 +17,7 @@ index