mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into ForEachStatic
This commit is contained in:
commit
431f810d21
1
MOOSE
1
MOOSE
@ -1 +0,0 @@
|
||||
Subproject commit 841e611e3c685eb6b223370b42042726546e806e
|
||||
@ -1,9 +1,35 @@
|
||||
--- **AI (Release 2.1)** -- Management of target designation.
|
||||
--- **AI R2.1** -- Management of target **Designation**.
|
||||
--
|
||||
-- --
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
||||
-- and communicates these to a dedicated attacking group of players,
|
||||
-- so that following a dynamically generated menu system,
|
||||
-- each detected set of potential targets can be lased or smoked...
|
||||
--
|
||||
-- Targets can be:
|
||||
--
|
||||
-- * **Lased** for a period of time.
|
||||
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
|
||||
-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
|
||||
-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing
|
||||
-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing
|
||||
--
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module AI_Designate
|
||||
|
||||
|
||||
@ -19,20 +45,57 @@ do -- AI_DESIGNATE
|
||||
-- so that following a dynamically generated menu system,
|
||||
-- each detected set of potential targets can be lased or smoked...
|
||||
--
|
||||
-- The Recce group is detecting as part of the DETECTION_ class continuously targets.
|
||||
-- Once targets have been detected, they will be reported. The AI_DESIGNATE object will fire the **Detect** event in this case!
|
||||
-- As part of the reporting, the following happens:
|
||||
-- Targets can be:
|
||||
--
|
||||
-- * A message is sent to each GROUP of the Attack SET_GROUP, containing the threat level and the target composition.
|
||||
-- * A menu is created and updated for each GROUP of the Attack SET_GROUP, containing the the treat level and the target composition.
|
||||
-- * **Lased** for a period of time.
|
||||
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
|
||||
-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
|
||||
--
|
||||
-- One of the players in one of the Attack GROUPs, can then select a Target Set by selecting one of the menu options.
|
||||
-- Each menu option has two modes:
|
||||
-- The following terminology is being used throughout this document:
|
||||
--
|
||||
-- * If the Target Set is not being designated, then the Designate menu for the target Set will provide options to Lase or Smoke the targets.
|
||||
-- * If the Target Set is being designated, then the Designate menu will provide an option to cancel the designation.
|
||||
-- * The **DesignateObject** is the object of the AI_DESIGNATE class, which is this class explained in the document.
|
||||
-- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_.
|
||||
-- * **DetectionItems** is the list of detected target groupings by the _DetectionObject_. Each _DetectionItem_ contains a _TargetSet_.
|
||||
-- * **DetectionItem** is one element of the _DetectionItems_ list, and contains a _TargetSet_.
|
||||
-- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_.
|
||||
-- * A **Target** is a detected UNIT object by the _DetectionObject_.
|
||||
-- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
|
||||
-- * The **RecceSet** is a SET_GROUP collection that contains the **RecceGroups**.
|
||||
-- * A **RecceGroup** is a GROUP object containing the **Recces**.
|
||||
-- * A **Recce** is a UNIT object executing the reconnaissance as part the _DetectionObject_. A Recce can be of any UNIT type.
|
||||
-- * An **AttackGroup** is a GROUP object that contain _Players_.
|
||||
-- * A **Player** is an active CLIENT object containing a human player.
|
||||
-- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_.
|
||||
--
|
||||
-- In this way, the AI can assist players to designate ground targets for a coordinated attack!
|
||||
-- The _RecceSet_ is continuously detecting for potential _Targets_, executing its task as part of the _DetectionObject_.
|
||||
-- Once _Targets_ have been detected, the _DesignateObject_ will trigger the **Detect Event**.
|
||||
--
|
||||
-- As part of the Detect Event, the _DetectionItems_ list is used by the _DesignateObject_ to provide the _Players_ with:
|
||||
--
|
||||
-- * The _RecceGroups_ are reporting to each _AttackGroup_, sending **Messages** containing the _Threat Level_ and the _TargetSet_ composition.
|
||||
-- * **Menu options** are created and updated for each _AttackGroup_, containing the _Threat Level_ and the _TargetSet_ composition.
|
||||
--
|
||||
-- A _Player_ can then select an action from the _Designate Menu_.
|
||||
--
|
||||
-- **Note that each selected action will be executed for a _TargetSet_, thus the _Target_ grouping done by the _DetectionObject_.**
|
||||
--
|
||||
-- Each **Menu Option** in the _Designate Menu_ has two modes:
|
||||
--
|
||||
-- 1. If the _TargetSet_ **is not being designated**, then the **Designate Menu** option for the target Set will provide options to **Lase** or **Smoke** the targets.
|
||||
-- 2. If the Target Set **is being designated**, then the **Designate Menu** option will provide an option to stop or cancel the designation.
|
||||
--
|
||||
-- While designating, the _RecceGroups_ will report any change in _TargetSet_ composition or _Target_ presence.
|
||||
--
|
||||
-- The following logic is executed when a _TargetSet_ is selected to be *lased* from the _Designation Menu_:
|
||||
--
|
||||
-- * The _RecceSet_ is searched for any _Recce_ that is within *designation distance* from a _Target_ in the _TargetSet_ that is currently not being designated.
|
||||
-- * If there is a _Recce_ found that is currently no designating a target, and is within designation distance from the _Target_, then that _Target_ will be designated.
|
||||
-- * During designation, any _Recce_ that does not have Line of Sight (LOS) and is not within disignation distance from the _Target_, will stop designating the _Target_, and a report is given.
|
||||
-- * When a _Recce_ is designating a _Target_, and that _Target_ is destroyed, then the _Recce_ will stop designating the _Target_, and will report the event.
|
||||
-- * When a _Recce_ is designating a _Target_, and that _Recce_ is destroyed, then the _Recce_ will be removed from the _RecceSet_ and designation will stop without reporting.
|
||||
-- * When all _RecceGroups_ are destroyed from the _RecceSet_, then the DesignationObject will stop functioning, and nothing will be reported.
|
||||
--
|
||||
-- In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!
|
||||
--
|
||||
-- Have FUN!
|
||||
--
|
||||
@ -42,7 +105,7 @@ do -- AI_DESIGNATE
|
||||
--
|
||||
-- ## 2. AI_DESIGNATE is a FSM
|
||||
--
|
||||
-- 
|
||||
-- ![Process]()
|
||||
--
|
||||
-- ### 2.1 AI_DESIGNATE States
|
||||
--
|
||||
@ -74,7 +137,16 @@ do -- AI_DESIGNATE
|
||||
--
|
||||
-- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!**
|
||||
--
|
||||
-- ## 4. Autolase to automatically lase detected targets.
|
||||
--
|
||||
-- _DetectionItems_ can be auto lased once detected by _Recces_. As such, there is almost no action required from the _Players_ using the _Designate Menu_.
|
||||
-- The **auto lase** function can be activated through the Designation Menu.
|
||||
-- Use the method @{#AI_DESIGNATE.SetAutoLase}() to activate or deactivate the auto lase function programmatically.
|
||||
-- Note that autolase will automatically activate lasing for ALL _DetectedItems_. Individual items can be switched-off if required using the _Designation Menu_.
|
||||
--
|
||||
-- AIDesignate:SetAutoLase( true )
|
||||
--
|
||||
-- Activate the auto lasing.
|
||||
--
|
||||
-- @field #AI_DESIGNATE
|
||||
--
|
||||
@ -85,9 +157,9 @@ do -- AI_DESIGNATE
|
||||
--- AI_DESIGNATE Constructor. This class is an abstract class and should not be instantiated.
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param Functional.Detection#DETECTION_BASE Detection
|
||||
-- @param Core.Set#SET_GROUP GroupSet The set of groups to designate for.
|
||||
-- @param Core.Set#SET_GROUP AttackSet The Attack collection of GROUP objects to designate and report for.
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:New( Detection, GroupSet )
|
||||
function AI_DESIGNATE:New( Detection, AttackSet )
|
||||
|
||||
local self = BASE:Inherit( self, FSM:New() ) -- #AI_DESIGNATE
|
||||
self:F( { Detection } )
|
||||
@ -118,6 +190,8 @@ do -- AI_DESIGNATE
|
||||
-- @function [parent=#AI_DESIGNATE] __Detect
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
|
||||
self:AddTransition( "*", "LaseOn", "Lasing" )
|
||||
|
||||
@ -147,7 +221,6 @@ do -- AI_DESIGNATE
|
||||
|
||||
self:AddTransition( "Lasing", "Lasing", "Lasing" )
|
||||
|
||||
|
||||
self:AddTransition( "*", "LaseOff", "Designate" )
|
||||
|
||||
--- LaseOff Handler OnBefore for AI_DESIGNATE
|
||||
@ -202,7 +275,33 @@ do -- AI_DESIGNATE
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( "*", "Illuminate", "*" )
|
||||
|
||||
--- Illuminate Handler OnBefore for AI_DESIGNATE
|
||||
-- @function [parent=#AI_DESIGNATE] OnBeforeIlluminate
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Illuminate Handler OnAfter for AI_DESIGNATE
|
||||
-- @function [parent=#AI_DESIGNATE] OnAfterIlluminate
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Illuminate Trigger for AI_DESIGNATE
|
||||
-- @function [parent=#AI_DESIGNATE] Illuminate
|
||||
-- @param #AI_DESIGNATE self
|
||||
|
||||
--- Illuminate Asynchronous Trigger for AI_DESIGNATE
|
||||
-- @function [parent=#AI_DESIGNATE] __Illuminate
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( "*", "Done", "*" )
|
||||
|
||||
self:AddTransition( "*", "Status", "*" )
|
||||
|
||||
@ -231,14 +330,22 @@ do -- AI_DESIGNATE
|
||||
-- @param #number Delay
|
||||
|
||||
self.Detection = Detection
|
||||
self.GroupSet = GroupSet
|
||||
self.AttackSet = AttackSet
|
||||
self.RecceSet = Detection:GetDetectionSetGroup()
|
||||
self.Spots = {}
|
||||
self.Recces = {}
|
||||
self.Designating = {}
|
||||
|
||||
self.LaseDuration = 60
|
||||
|
||||
self:SetLaserCodes( 1688 ) -- set self.LaserCodes
|
||||
self:SetAutoLase( false ) -- set self.Autolase
|
||||
|
||||
self.LaserCodesUsed = {}
|
||||
|
||||
self:SetLaserCodes( 1688 )
|
||||
|
||||
self.Detection:__Start( 2 )
|
||||
|
||||
|
||||
self:SetDesignateMenu()
|
||||
|
||||
return self
|
||||
end
|
||||
@ -249,10 +356,35 @@ do -- AI_DESIGNATE
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #list<#number> LaserCodes
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:SetLaserCodes( LaserCodes )
|
||||
function AI_DESIGNATE:SetLaserCodes( LaserCodes ) --R2.1
|
||||
|
||||
self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes }
|
||||
self:E(self.LaserCodes)
|
||||
|
||||
self.LaserCodesUsed = {}
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set auto lase.
|
||||
-- Auto lase will start lasing targets immediately when these are in range.
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #boolean AutoLase
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:SetAutoLase( AutoLase ) --R2.1
|
||||
|
||||
self.AutoLase = AutoLase
|
||||
|
||||
local AutoLaseOnOff = ( AutoLase == true ) and "On" or "Off"
|
||||
|
||||
local Recce = self.RecceSet:GetFirst()
|
||||
|
||||
if Recce then
|
||||
Recce:MessageToSetGroup( "Auto Lase " .. AutoLaseOnOff .. ".", 15, self.AttackSet )
|
||||
end
|
||||
|
||||
self:ActivateAutoLase()
|
||||
self:SetDesignateMenu()
|
||||
|
||||
return self
|
||||
end
|
||||
@ -265,7 +397,11 @@ do -- AI_DESIGNATE
|
||||
|
||||
self:__Detect( -60 )
|
||||
|
||||
self:ActivateAutoLase()
|
||||
|
||||
self:SendStatus()
|
||||
|
||||
|
||||
self:SetDesignateMenu()
|
||||
|
||||
return self
|
||||
@ -287,11 +423,32 @@ do -- AI_DESIGNATE
|
||||
|
||||
local RecceLeader = self.RecceSet:GetFirst() -- Wrapper.Group#GROUP
|
||||
|
||||
self.GroupSet:ForEachGroup(
|
||||
RecceLeader:MessageToSetGroup( DetectedReport:Text( "\n" ), 15, self.AttackSet )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Coordinates the Auto Lase.
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:ActivateAutoLase()
|
||||
|
||||
self.AttackSet:Flush()
|
||||
|
||||
self.AttackSet:ForEachGroup(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
RecceLeader:MessageToGroup( DetectedReport:Text( "\n" ), 15, AttackGroup )
|
||||
|
||||
local DetectedItems = self.Detection:GetDetectedItems()
|
||||
|
||||
for Index, DetectedItemData in pairs( DetectedItems ) do
|
||||
if self.AutoLase then
|
||||
if not self.Designating[Index] then
|
||||
self:LaseOn( Index, self.LaseDuration )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
@ -303,7 +460,9 @@ do -- AI_DESIGNATE
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:SetDesignateMenu()
|
||||
|
||||
self.GroupSet:ForEachGroup(
|
||||
self.AttackSet:Flush()
|
||||
|
||||
self.AttackSet:ForEachGroup(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
@ -313,10 +472,19 @@ do -- AI_DESIGNATE
|
||||
DesignateMenu = nil
|
||||
self:E("Remove Menu")
|
||||
end
|
||||
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate Targets" )
|
||||
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate" )
|
||||
self:E(DesignateMenu)
|
||||
AttackGroup:SetState( AttackGroup, "DesignateMenu", DesignateMenu )
|
||||
|
||||
-- Set Menu option for auto lase
|
||||
|
||||
if self.AutoLase then
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Auto Lase Off", DesignateMenu, self.MenuAutoLase, self, false )
|
||||
else
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Auto Lase On", DesignateMenu, self.MenuAutoLase, self, true )
|
||||
end
|
||||
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Report Designation Status", DesignateMenu, self.MenuStatus, self, AttackGroup )
|
||||
|
||||
local DetectedItems = self.Detection:GetDetectedItems()
|
||||
|
||||
@ -324,144 +492,184 @@ do -- AI_DESIGNATE
|
||||
|
||||
local Report = self.Detection:DetectedItemReportSummary( Index )
|
||||
|
||||
local DetectedMenu = MENU_GROUP:New(
|
||||
AttackGroup,
|
||||
Report,
|
||||
DesignateMenu
|
||||
)
|
||||
|
||||
if self.Spots[Index] then
|
||||
|
||||
MENU_GROUP_COMMAND:New(
|
||||
AttackGroup,
|
||||
"Switch laser Off",
|
||||
DetectedMenu,
|
||||
self.MenuLaseOff,
|
||||
self,
|
||||
AttackGroup,
|
||||
Index
|
||||
)
|
||||
if not self.Designating[Index] then
|
||||
local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, DesignateMenu )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 60 secs", DetectedMenu, self.MenuLaseOn, self, Index, 60 )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 120 secs", DetectedMenu, self.MenuLaseOn, self, Index, 120 )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke red", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Red )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke blue", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Blue )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke green", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Green )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke white", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.White )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke orange", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Orange )
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, Index )
|
||||
else
|
||||
MENU_GROUP_COMMAND:New(
|
||||
AttackGroup,
|
||||
"Lase target 60 secs",
|
||||
DetectedMenu,
|
||||
self.MenuLaseOn,
|
||||
self,
|
||||
AttackGroup,
|
||||
Index,
|
||||
60
|
||||
)
|
||||
MENU_GROUP_COMMAND:New(
|
||||
AttackGroup,
|
||||
"Lase target 120 secs",
|
||||
DetectedMenu,
|
||||
self.MenuLaseOn,
|
||||
self,
|
||||
AttackGroup,
|
||||
Index,
|
||||
120
|
||||
)
|
||||
if self.Designating[Index] == "Laser" then
|
||||
Report = "Lasing " .. Report
|
||||
elseif self.Designating[Index] == "Smoke" then
|
||||
Report = "Smoking " .. Report
|
||||
elseif self.Designating[Index] == "Illuminate" then
|
||||
Report = "Illuminating " .. Report
|
||||
end
|
||||
local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, DesignateMenu )
|
||||
if self.Designating[Index] == "Laser" then
|
||||
MENU_GROUP_COMMAND:New( AttackGroup, "Stop lasing", DetectedMenu, self.MenuLaseOff, self, Index )
|
||||
else
|
||||
end
|
||||
end
|
||||
|
||||
MENU_GROUP_COMMAND:New(
|
||||
AttackGroup,
|
||||
"Smoke",
|
||||
DetectedMenu,
|
||||
self.MenuSmoke,
|
||||
self,
|
||||
AttackGroup,
|
||||
Index
|
||||
)
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
function AI_DESIGNATE:MenuStatus( AttackGroup )
|
||||
|
||||
self:E("Status")
|
||||
|
||||
self.RecceSet:ForEachGroup(
|
||||
function( RecceGroup )
|
||||
local RecceUnits = RecceGroup:GetUnits()
|
||||
for UnitID, RecceData in pairs( RecceUnits ) do
|
||||
local Recce = RecceData -- Wrapper.Unit#UNIT
|
||||
if Recce:IsLasing() then
|
||||
Recce:MessageToGroup( "Marking " .. Recce:GetSpot().Target:GetTypeName() .. " with laser " .. Recce:GetSpot().LaserCode .. ".", 5, AttackGroup )
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
function AI_DESIGNATE:MenuSmoke( AttackGroup, Index )
|
||||
function AI_DESIGNATE:MenuAutoLase( AutoLase )
|
||||
|
||||
self:E("AutoLase")
|
||||
|
||||
self:SetAutoLase( AutoLase )
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
function AI_DESIGNATE:MenuSmoke( Index, Color )
|
||||
|
||||
self:E("Designate through Smoke")
|
||||
|
||||
self:__Smoke( 1, AttackGroup, Index )
|
||||
self.Designating[Index] = "Smoke"
|
||||
self:__Smoke( 1, Index, Color )
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
function AI_DESIGNATE:MenuLaseOn( AttackGroup, Index, Duration )
|
||||
function AI_DESIGNATE:MenuIlluminate( Index )
|
||||
|
||||
self:E("Designate through Illumination")
|
||||
|
||||
self.Designating[Index] = "Illuminate"
|
||||
|
||||
self:__Illuminate( 1, Index )
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
function AI_DESIGNATE:MenuLaseOn( Index, Duration )
|
||||
|
||||
self:E("Designate through Lase")
|
||||
|
||||
self:__LaseOn( 1, AttackGroup, Index, Duration )
|
||||
|
||||
self:__LaseOn( 1, Index, Duration )
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
function AI_DESIGNATE:MenuLaseOff( AttackGroup, Index, Duration )
|
||||
function AI_DESIGNATE:MenuLaseOff( Index, Duration )
|
||||
|
||||
self:E("Lasing off")
|
||||
|
||||
self:__LaseOff( 1, AttackGroup, Index )
|
||||
self.Designating[Index] = nil
|
||||
self:__LaseOff( 1, Index )
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:onafterLaseOn( From, Event, To, AttackGroup, Index, Duration )
|
||||
|
||||
self:__Lasing( -5, AttackGroup, Index, Duration )
|
||||
function AI_DESIGNATE:onafterLaseOn( From, Event, To, Index, Duration )
|
||||
|
||||
self.Designating[Index] = "Laser"
|
||||
self:Lasing( Index, Duration )
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:onafterLasing( From, Event, To, AttackGroup, Index, Duration )
|
||||
function AI_DESIGNATE:onafterLasing( From, Event, To, Index, Duration )
|
||||
|
||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||
|
||||
local Targets = false
|
||||
|
||||
TargetSetUnit:Flush()
|
||||
|
||||
for TargetUnit, RecceData in pairs( self.Recces ) do
|
||||
local Recce = RecceData -- Wrapper.Unit#UNIT
|
||||
if not Recce:IsLasing() then
|
||||
local LaserCode = Recce:GetLaserCode() --(Not deleted when stopping with lasing).
|
||||
self.LaserCodesUsed[LaserCode] = nil
|
||||
self.Recces[TargetUnit] = nil
|
||||
end
|
||||
end
|
||||
|
||||
TargetSetUnit:ForEachUnit(
|
||||
--- @param Wrapper.Unit#UNIT SmokeUnit
|
||||
function( SmokeUnit )
|
||||
function( TargetUnit )
|
||||
self:E("In procedure")
|
||||
--if math.random( 1, ( 100 * TargetSetUnit:Count() ) / 100 ) <= 100 then
|
||||
if SmokeUnit:IsAlive() then
|
||||
local NearestRecceGroup = self.RecceSet:FindNearestGroupFromPointVec2( SmokeUnit:GetPointVec2() )
|
||||
if NearestRecceGroup then
|
||||
for UnitID, UnitData in pairs( NearestRecceGroup:GetUnits() or {} ) do
|
||||
local RecceUnit = UnitData -- Wrapper.Unit#UNIT
|
||||
Targets = true
|
||||
if RecceUnit:IsLasing() == false then
|
||||
self.Spots[Index] = self.Spots[Index] or {}
|
||||
local Spots = self.Spots[Index]
|
||||
local LaserCode = self.LaserCodes[math.random(1, #self.LaserCodes)]
|
||||
local Spot = RecceUnit:LaseUnit( SmokeUnit, LaserCode, Duration )
|
||||
Spots[RecceUnit] = Spot
|
||||
RecceUnit:MessageToGroup( "Lasing " .. SmokeUnit:GetTypeName() .. " for " .. Duration .. " seconds. Laser Code: " .. Spot.LaserCode, 15, AttackGroup )
|
||||
break
|
||||
else
|
||||
if TargetUnit:IsAlive() then
|
||||
local Recce = self.Recces[TargetUnit]
|
||||
if not Recce then
|
||||
for RecceGroupID, RecceGroup in pairs( self.RecceSet:GetSet() ) do
|
||||
for UnitID, UnitData in pairs( RecceGroup:GetUnits() or {} ) do
|
||||
local RecceUnit = UnitData -- Wrapper.Unit#UNIT
|
||||
if RecceUnit:IsLasing() == false then
|
||||
if RecceUnit:IsDetected( TargetUnit ) and RecceUnit:IsLOS( TargetUnit ) then
|
||||
local LaserCodeIndex = math.random( 1, #self.LaserCodes )
|
||||
local LaserCode = self.LaserCodes[LaserCodeIndex]
|
||||
if not self.LaserCodesUsed[LaserCode] then
|
||||
self.LaserCodesUsed[LaserCode] = LaserCodeIndex
|
||||
local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration )
|
||||
local AttackSet = self.AttackSet
|
||||
function Spot:OnAfterDestroyed( From, Event, To )
|
||||
self:E( "Destroyed Message" )
|
||||
self.Recce:MessageToSetGroup( "Target " .. TargetUnit:GetTypeName() .. " destroyed." .. TargetSetUnit:Count() .. " targets left.", 15, AttackSet )
|
||||
end
|
||||
self.Recces[TargetUnit] = RecceUnit
|
||||
RecceUnit:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. RecceUnit:GetSpot().LaserCode .. " for " .. Duration .. "s.", 5, self.AttackSet )
|
||||
break
|
||||
end
|
||||
else
|
||||
RecceUnit:MessageToSetGroup( "Can't lase " .. TargetUnit:GetTypeName(), 5, self.AttackSet )
|
||||
end
|
||||
else
|
||||
-- The Recce is lasing, but the Target is not detected or within LOS. So stop lasing and send a report.
|
||||
if not RecceUnit:IsDetected( TargetUnit ) or not RecceUnit:IsLOS( TargetUnit ) then
|
||||
local Recce = self.Recces[TargetUnit] -- Wrapper.Unit#UNIT
|
||||
if Recce then
|
||||
Recce:LaseOff()
|
||||
Recce:MessageToGroup( "Target " .. TargetUnit:GetTypeName() "out of LOS. Cancelling lase!", 5, self.AttackSet )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
Recce:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. Recce.LaserCode .. ".", 5, self.AttackSet )
|
||||
end
|
||||
end
|
||||
--end
|
||||
end
|
||||
)
|
||||
|
||||
if Targets == true then
|
||||
self:__Lasing( -30, AttackGroup, Index, Duration )
|
||||
else
|
||||
self:__LaseOff( -0.2, AttackGroup, Index )
|
||||
end
|
||||
|
||||
self:__Lasing( 15, Index, Duration )
|
||||
|
||||
self:SetDesignateMenu()
|
||||
|
||||
end
|
||||
@ -469,20 +677,27 @@ do -- AI_DESIGNATE
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:onafterLaseOff( From, Event, To, AttackGroup, Index )
|
||||
function AI_DESIGNATE:onafterLaseOff( From, Event, To, Index )
|
||||
|
||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||
local Recce = self.RecceSet:GetFirst()
|
||||
|
||||
local Spots = self.Spots[Index]
|
||||
|
||||
for SpotID, SpotData in pairs( Spots ) do
|
||||
local Spot = SpotData -- Core.Spot#SPOT
|
||||
Spot.Recce:MessageToGroup( "Stopped lasing " .. Spot.Target:GetTypeName() .. ".", 15, AttackGroup )
|
||||
Spot:LaseOff()
|
||||
if Recce then
|
||||
Recce:MessageToSetGroup( "Stopped lasing.", 15, self.AttackSet )
|
||||
end
|
||||
|
||||
Spots = nil
|
||||
self.Spots[Index] = nil
|
||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||
|
||||
local Recces = self.Recces
|
||||
|
||||
for TargetID, RecceData in pairs( Recces ) do
|
||||
local Recce = RecceData -- Wrapper.Unit#UNIT
|
||||
Recce:MessageToSetGroup( "Stopped lasing " .. Recce:GetSpot().Target:GetTypeName() .. ".", 15, self.AttackSet )
|
||||
Recce:LaseOff()
|
||||
end
|
||||
|
||||
Recces = nil
|
||||
self.Recces = {}
|
||||
self.LaserCodesUsed = {}
|
||||
|
||||
self:SetDesignateMenu()
|
||||
end
|
||||
@ -491,30 +706,72 @@ do -- AI_DESIGNATE
|
||||
---
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:onafterSmoke( From, Event, To, AttackGroup, Index )
|
||||
function AI_DESIGNATE:onafterSmoke( From, Event, To, Index, Color )
|
||||
|
||||
|
||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||
local TargetSetUnitCount = TargetSetUnit:Count()
|
||||
|
||||
TargetSetUnit:ForEachUnit(
|
||||
--- @param Wrapper.Unit#UNIT SmokeUnit
|
||||
function( SmokeUnit )
|
||||
self:E("In procedure")
|
||||
--if math.random( 1, ( 100 * TargetSetUnit:Count() ) / 100 ) <= 100 then
|
||||
SCHEDULER:New( self,
|
||||
function()
|
||||
if SmokeUnit:IsAlive() then
|
||||
SmokeUnit:Smoke( SMOKECOLOR.Red, 150 )
|
||||
end
|
||||
end, {}, math.random( 10, 60 )
|
||||
)
|
||||
--end
|
||||
if math.random( 1, TargetSetUnitCount ) == math.random( 1, TargetSetUnitCount ) then
|
||||
local RecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(SmokeUnit:GetPointVec2())
|
||||
local RecceUnit = RecceGroup:GetUnit( 1 )
|
||||
if RecceUnit then
|
||||
RecceUnit:MessageToSetGroup( "Smoking " .. SmokeUnit:GetTypeName() .. ".", 5, self.AttackSet )
|
||||
SCHEDULER:New( self,
|
||||
function()
|
||||
if SmokeUnit:IsAlive() then
|
||||
SmokeUnit:Smoke( Color, 150 )
|
||||
end
|
||||
self:Done( Index )
|
||||
end, {}, math.random( 5, 20 )
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
end
|
||||
|
||||
--- Illuminating
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:onafterIlluminate( From, Event, To, Index )
|
||||
|
||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||
|
||||
local TargetUnit = TargetSetUnit:GetFirst()
|
||||
|
||||
if TargetUnit then
|
||||
local RecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(TargetUnit:GetPointVec2())
|
||||
local RecceUnit = RecceGroup:GetUnit( 1 )
|
||||
if RecceUnit then
|
||||
RecceUnit:MessageToGroup( "Illuminating " .. TargetUnit:GetTypeName() .. ".", 5, self.AttackSet )
|
||||
SCHEDULER:New( self,
|
||||
function()
|
||||
if TargetUnit:IsAlive() then
|
||||
TargetUnit:GetPointVec3():AddY(300):IlluminationBomb()
|
||||
end
|
||||
self:Done( Index )
|
||||
end, {}, math.random( 5, 20 )
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Done
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:onafterDone( From, Event, To, Index )
|
||||
|
||||
self.Designating[Index] = nil
|
||||
self:SetDesignateMenu()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -454,6 +454,12 @@ do -- Event Handling
|
||||
-- @param #BASE self
|
||||
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||
|
||||
--- Occurs when an object is dead.
|
||||
-- initiator : The unit that is dead.
|
||||
-- @function [parent=#BASE] OnEventDead
|
||||
-- @param #BASE self
|
||||
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||
|
||||
--- Occurs when an object is completely destroyed.
|
||||
-- initiator : The unit that is was destroyed.
|
||||
-- @function [parent=#BASE] OnEvent
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Core** -- Management of CARGO logistics, that can be transported from and to transportation carriers.
|
||||
--- **(R2.1) Core** -- Management of CARGO logistics, that can be transported from and to transportation carriers.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -165,7 +165,7 @@ do -- CARGO
|
||||
-- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit.
|
||||
-- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit.
|
||||
|
||||
--- # CARGO class, extends @{Fsm#FSM_PROCESS}
|
||||
--- # (R2.1) CARGO class, extends @{Fsm#FSM_PROCESS}
|
||||
--
|
||||
-- The CARGO class defines the core functions that defines a cargo object within MOOSE.
|
||||
-- A cargo is a logical object defined that is available for transport, and has a life status within a simulation.
|
||||
@ -231,7 +231,7 @@ do -- CARGO
|
||||
-- @param #number Weight
|
||||
-- @param #number NearRadius (optional)
|
||||
-- @return #CARGO
|
||||
function CARGO:New( Type, Name, Weight )
|
||||
function CARGO:New( Type, Name, Weight ) --R2.1
|
||||
|
||||
local self = BASE:Inherit( self, FSM:New() ) -- #CARGO
|
||||
self:F( { Type, Name, Weight } )
|
||||
@ -269,7 +269,7 @@ end
|
||||
--- Get the name of the Cargo.
|
||||
-- @param #CARGO self
|
||||
-- @return #string The name of the Cargo.
|
||||
function CARGO:GetName()
|
||||
function CARGO:GetName() --R2.1
|
||||
return self.Name
|
||||
end
|
||||
|
||||
|
||||
@ -789,6 +789,25 @@ function POINT_VEC3:FlareRed( Azimuth )
|
||||
self:Flare( FLARECOLOR.Red, Azimuth )
|
||||
end
|
||||
|
||||
--- Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.
|
||||
-- @param #POINT_VEC3 self
|
||||
-- @param #POINT_VEC3 ToPointVec3
|
||||
-- @return #boolean true If the ToPointVec3 has LOS with the PointVec3, otherwise false.
|
||||
function POINT_VEC3:IsLOS( ToPointVec3 ) --R2.1
|
||||
|
||||
-- Measurement of visibility should not be from the ground, so Adding a hypotethical 2 meters to each PointVec3.
|
||||
local FromVec3 = self:GetVec3()
|
||||
FromVec3.y = FromVec3.y + 2
|
||||
|
||||
local ToVec3 = ToPointVec3:GetVec3()
|
||||
ToVec3.y = ToVec3.y + 2
|
||||
|
||||
local IsLOS = land.isVisible( FromVec3, ToVec3 )
|
||||
|
||||
return IsLOS
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
do -- POINT_VEC2
|
||||
|
||||
@ -342,6 +342,26 @@ function SET_BASE:_FilterStart()
|
||||
return self
|
||||
end
|
||||
|
||||
--- Starts the filtering of the Dead events for the collection.
|
||||
-- @param #SET_BASE self
|
||||
-- @return #SET_BASE self
|
||||
function SET_BASE:FilterDeads()
|
||||
|
||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Starts the filtering of the Crash events for the collection.
|
||||
-- @param #SET_BASE self
|
||||
-- @return #SET_BASE self
|
||||
function SET_BASE:FilterCrashes()
|
||||
|
||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Stops the filtering for the defined collection.
|
||||
-- @param #SET_BASE self
|
||||
-- @return #SET_BASE self
|
||||
@ -430,7 +450,7 @@ function SET_BASE:_EventOnDeadOrCrash( Event )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
local ObjectName, Object = self:FindInDatabase( Event )
|
||||
if ObjectName and Object ~= nil then
|
||||
if ObjectName then
|
||||
self:Remove( ObjectName )
|
||||
end
|
||||
end
|
||||
@ -961,6 +981,185 @@ function SET_GROUP:ForEachGroupNotInZone( ZoneObject, IteratorFunction, ... )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and return true if all the @{Wrapper.Group#GROUP} are completely in the @{Core.Zone#ZONE}
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #boolean true if all the @{Wrapper.Group#GROUP} are completly in the @{Core.Zone#ZONE}, false otherwise
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- if MySetGroup:AllCompletelyInZone(MyZone) then
|
||||
-- MESSAGE:New("All the SET's GROUP are in zone !", 10):ToAll()
|
||||
-- else
|
||||
-- MESSAGE:New("Some or all SET's GROUP are outside zone !", 10):ToAll()
|
||||
-- end
|
||||
function SET_GROUP:AllCompletelyInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if not GroupData:IsCompletelyInZone(Zone) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and return true if at least one of the @{Wrapper.Group#GROUP} is completely inside the @{Core.Zone#ZONE}
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is completly inside the @{Core.Zone#ZONE}, false otherwise.
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- if MySetGroup:AnyCompletelyInZone(MyZone) then
|
||||
-- MESSAGE:New("At least one GROUP is completely in zone !", 10):ToAll()
|
||||
-- else
|
||||
-- MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
|
||||
-- end
|
||||
function SET_GROUP:AnyCompletelyInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if GroupData:IsCompletelyInZone(Zone) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and return true if at least one @{#UNIT} of one @{GROUP} of the @{SET_GROUP} is in @{ZONE}
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is partly or completly inside the @{Core.Zone#ZONE}, false otherwise.
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- if MySetGroup:AnyPartlyInZone(MyZone) then
|
||||
-- MESSAGE:New("At least one GROUP has at least one UNIT in zone !", 10):ToAll()
|
||||
-- else
|
||||
-- MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
|
||||
-- end
|
||||
function SET_GROUP:AnyInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if GroupData:IsPartlyInZone(Zone) or GroupData:IsCompletelyInZone(Zone) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and return true if at least one @{GROUP} of the @{SET_GROUP} is partly in @{ZONE}.
|
||||
-- Will return false if a @{GROUP} is fully in the @{ZONE}
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is partly or completly inside the @{Core.Zone#ZONE}, false otherwise.
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- if MySetGroup:AnyPartlyInZone(MyZone) then
|
||||
-- MESSAGE:New("At least one GROUP is partially in the zone, but none are fully in it !", 10):ToAll()
|
||||
-- else
|
||||
-- MESSAGE:New("No GROUP are in zone, or one (or more) GROUP is completely in it !", 10):ToAll()
|
||||
-- end
|
||||
function SET_GROUP:AnyPartlyInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local IsPartlyInZone = false
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if GroupData:IsCompletelyInZone(Zone) then
|
||||
return false
|
||||
elseif GroupData:IsPartlyInZone(Zone) then
|
||||
IsPartlyInZone = true -- at least one GROUP is partly in zone
|
||||
end
|
||||
end
|
||||
|
||||
if IsPartlyInZone then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and return true if no @{GROUP} of the @{SET_GROUP} is in @{ZONE}
|
||||
-- This could also be achieved with `not SET_GROUP:AnyPartlyInZone(Zone)`, but it's easier for the
|
||||
-- mission designer to add a dedicated method
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #boolean true if no @{Wrapper.Group#GROUP} is inside the @{Core.Zone#ZONE} in any way, false otherwise.
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- if MySetGroup:NoneInZone(MyZone) then
|
||||
-- MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
|
||||
-- else
|
||||
-- MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
|
||||
-- end
|
||||
function SET_GROUP:NoneInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if not GroupData:IsNotInZone(Zone) then -- If the GROUP is in Zone in any way
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and count how many GROUPs are completely in the Zone
|
||||
-- That could easily be done with SET_GROUP:ForEachGroupCompletelyInZone(), but this function
|
||||
-- provides an easy to use shortcut...
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #number the number of GROUPs completely in the Zone
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- MESSAGE:New("There are " .. MySetGroup:CountInZone(MyZone) .. " GROUPs in the Zone !", 10):ToAll()
|
||||
function SET_GROUP:CountInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local Count = 0
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if GroupData:IsCompletelyInZone(Zone) then
|
||||
Count = Count + 1
|
||||
end
|
||||
end
|
||||
return Count
|
||||
end
|
||||
|
||||
--- Iterate the SET_GROUP and count how many UNITs are completely in the Zone
|
||||
-- @param #SET_GROUP self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @return #number the number of GROUPs completely in the Zone
|
||||
-- @usage
|
||||
-- local MyZone = ZONE:New("Zone1")
|
||||
-- local MySetGroup = SET_GROUP:New()
|
||||
-- MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
--
|
||||
-- MESSAGE:New("There are " .. MySetGroup:CountUnitInZone(MyZone) .. " UNITs in the Zone !", 10):ToAll()
|
||||
function SET_GROUP:CountUnitInZone(Zone)
|
||||
self:F2(Zone)
|
||||
local Count = 0
|
||||
local Set = self:GetSet()
|
||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
Count = Count + GroupData:CountInZone(Zone)
|
||||
end
|
||||
return Count
|
||||
end
|
||||
|
||||
----- Iterate the SET_GROUP and call an interator function for each **alive** player, providing the Group of the player and optional parameters.
|
||||
---- @param #SET_GROUP self
|
||||
@ -2420,7 +2619,7 @@ end
|
||||
--- @type SET_CARGO
|
||||
-- @extends Core.Set#SET_BASE
|
||||
|
||||
--- # SET_CARGO class, extends @{Set#SET_BASE}
|
||||
--- # (R2.1) SET_CARGO class, extends @{Set#SET_BASE}
|
||||
--
|
||||
-- Mission designers can use the @{Set#SET_CARGO} class to build sets of cargos optionally belonging to certain:
|
||||
--
|
||||
@ -2482,7 +2681,7 @@ SET_CARGO = {
|
||||
}
|
||||
|
||||
|
||||
--- Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.
|
||||
--- (R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.
|
||||
-- @param #SET_CARGO self
|
||||
-- @return #SET_CARGO self
|
||||
-- @usage
|
||||
@ -2495,7 +2694,7 @@ function SET_CARGO:New()
|
||||
return self
|
||||
end
|
||||
|
||||
--- Add CARGOs to SET_CARGO.
|
||||
--- (R2.1) Add CARGOs to SET_CARGO.
|
||||
-- @param Core.Set#SET_CARGO self
|
||||
-- @param #string AddCargoNames A single name or an array of CARGO names.
|
||||
-- @return self
|
||||
@ -2510,7 +2709,7 @@ function SET_CARGO:AddCargosByName( AddCargoNames )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Remove CARGOs from SET_CARGO.
|
||||
--- (R2.1) Remove CARGOs from SET_CARGO.
|
||||
-- @param Core.Set#SET_CARGO self
|
||||
-- @param Wrapper.Cargo#CARGO RemoveCargoNames A single name or an array of CARGO names.
|
||||
-- @return self
|
||||
@ -2526,7 +2725,7 @@ function SET_CARGO:RemoveCargosByName( RemoveCargoNames )
|
||||
end
|
||||
|
||||
|
||||
--- Finds a Cargo based on the Cargo Name.
|
||||
--- (R2.1) Finds a Cargo based on the Cargo Name.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string CargoName
|
||||
-- @return Wrapper.Cargo#CARGO The found Cargo.
|
||||
@ -2538,7 +2737,7 @@ end
|
||||
|
||||
|
||||
|
||||
--- Builds a set of cargos of coalitions.
|
||||
--- (R2.1) Builds a set of cargos of coalitions.
|
||||
-- Possible current coalitions are red, blue and neutral.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Coalitions Can take the following values: "red", "blue", "neutral".
|
||||
@ -2556,7 +2755,7 @@ function SET_CARGO:FilterCoalitions( Coalitions )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of cargos of defined cargo types.
|
||||
--- (R2.1) Builds a set of cargos of defined cargo types.
|
||||
-- Possible current types are those types known within DCS world.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Types Can take those type strings known within DCS world.
|
||||
@ -2575,7 +2774,7 @@ function SET_CARGO:FilterTypes( Types )
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of cargos of defined countries.
|
||||
--- (R2.1) Builds a set of cargos of defined countries.
|
||||
-- Possible current countries are those known within DCS world.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Countries Can take those country strings known within DCS world.
|
||||
@ -2594,7 +2793,7 @@ function SET_CARGO:FilterCountries( Countries )
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of cargos of defined cargo prefixes.
|
||||
--- (R2.1) Builds a set of cargos of defined cargo prefixes.
|
||||
-- All the cargos starting with the given prefixes will be included within the set.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Prefixes The prefix of which the cargo name starts with.
|
||||
@ -2614,7 +2813,7 @@ end
|
||||
|
||||
|
||||
|
||||
--- Starts the filtering.
|
||||
--- (R2.1) Starts the filtering.
|
||||
-- @param #SET_CARGO self
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:FilterStart()
|
||||
@ -2630,7 +2829,7 @@ function SET_CARGO:FilterStart()
|
||||
end
|
||||
|
||||
|
||||
--- Handles the Database to check on an event (birth) that the Object was added in the Database.
|
||||
--- (R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.
|
||||
-- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event!
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
@ -2642,7 +2841,7 @@ function SET_CARGO:AddInDatabase( Event )
|
||||
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
|
||||
end
|
||||
|
||||
--- Handles the Database to check on any event that Object exists in the Database.
|
||||
--- (R2.1) Handles the Database to check on any event that Object exists in the Database.
|
||||
-- This is required, because sometimes the _DATABASE event gets called later than the SET_BASE event or vise versa!
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
@ -2654,7 +2853,7 @@ function SET_CARGO:FindInDatabase( Event )
|
||||
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
|
||||
end
|
||||
|
||||
--- Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.
|
||||
--- (R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.
|
||||
-- @return #SET_CARGO self
|
||||
@ -2666,7 +2865,7 @@ function SET_CARGO:ForEachCargo( IteratorFunction, ... )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the SET_CARGO while identifying the nearest @{Cargo#CARGO} from a @{Point#POINT_VEC2}.
|
||||
--- (R2.1) Iterate the SET_CARGO while identifying the nearest @{Cargo#CARGO} from a @{Point#POINT_VEC2}.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Point#POINT_VEC2 PointVec2 A @{Point#POINT_VEC2} object from where to evaluate the closest @{Cargo#CARGO}.
|
||||
-- @return Wrapper.Cargo#CARGO The closest @{Cargo#CARGO}.
|
||||
@ -2679,7 +2878,7 @@ end
|
||||
|
||||
|
||||
|
||||
---
|
||||
--- (R2.1)
|
||||
-- @param #SET_CARGO self
|
||||
-- @param AI.AI_Cargo#AI_CARGO MCargo
|
||||
-- @return #SET_CARGO self
|
||||
@ -2733,7 +2932,7 @@ function SET_CARGO:IsIncludeObject( MCargo )
|
||||
return MCargoInclude
|
||||
end
|
||||
|
||||
--- Handles the OnEventNewCargo event for the Set.
|
||||
--- (R2.1) Handles the OnEventNewCargo event for the Set.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function SET_CARGO:OnEventNewCargo( EventData )
|
||||
@ -2745,7 +2944,7 @@ function SET_CARGO:OnEventNewCargo( EventData )
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnDead or OnCrash event for alive units set.
|
||||
--- (R2.1) Handles the OnDead or OnCrash event for alive units set.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function SET_CARGO:OnEventDeleteCargo( EventData )
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Core** -- Spawn dynamically new STATICs in your missions.
|
||||
--- (R2.1) **Core** -- Spawn dynamically new STATICs in your missions.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -95,7 +95,7 @@ SPAWNSTATIC = {
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #string SpawnTemplatePrefix is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID )
|
||||
function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID ) --R2.1
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
|
||||
self:F( { SpawnTemplatePrefix } )
|
||||
|
||||
@ -117,7 +117,7 @@ end
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #string SpawnTypeName is the name of the type.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID )
|
||||
function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID ) --R2.1
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
|
||||
self:F( { SpawnTypeName } )
|
||||
|
||||
@ -137,7 +137,7 @@ end
|
||||
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
|
||||
-- @param #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName )
|
||||
function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) --R2.1
|
||||
self:F( { PointVec2, Heading, NewName } )
|
||||
|
||||
local CountryName = _DATABASE.COUNTRY_NAME[self.CountryID]
|
||||
@ -167,7 +167,7 @@ end
|
||||
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
|
||||
-- @param #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName )
|
||||
function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName ) --R2.1
|
||||
self:F( { Zone, Heading, NewName } )
|
||||
|
||||
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
|
||||
|
||||
@ -1,10 +1,15 @@
|
||||
--- **Core (Release 2.1)** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
|
||||
--- **Core 2.1** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Spot lases points endlessly or for a duration.
|
||||
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
|
||||
--
|
||||
-- * Spot for a defined duration.
|
||||
-- * wiggle the spot at the target.
|
||||
-- * Provide a @{Unit} as a target, instead of a point.
|
||||
-- * Implement a status machine, LaseOn, LaseOff.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
@ -22,9 +27,20 @@
|
||||
--
|
||||
-- ### [SPOT YouTube Channel]()
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- This module is still under construction, but is described above works already, and will keep working ...
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
|
||||
-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing
|
||||
-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing
|
||||
--
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module Spot
|
||||
|
||||
@ -32,7 +48,44 @@
|
||||
do
|
||||
|
||||
--- @type SPOT
|
||||
-- @extends BASE
|
||||
-- @extends Core.Fsm#FSM
|
||||
|
||||
|
||||
--- # SPOT class, extends @{Fsm#FSM}
|
||||
--
|
||||
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
|
||||
--
|
||||
-- * Spot for a defined duration.
|
||||
-- * wiggle the spot at the target.
|
||||
-- * Provide a @{Unit} as a target, instead of a point.
|
||||
-- * Implement a status machine, LaseOn, LaseOff.
|
||||
--
|
||||
-- ## 1. SPOT constructor
|
||||
--
|
||||
-- * @{#SPOT.New}(): Creates a new SPOT object.
|
||||
--
|
||||
-- ## 2. SPOT is a FSM
|
||||
--
|
||||
-- ![Process]()
|
||||
--
|
||||
-- ### 2.1 SPOT States
|
||||
--
|
||||
-- * **Off**: Lasing is switched off.
|
||||
-- * **On**: Lasing is switched on.
|
||||
-- * **Destroyed**: Target is destroyed.
|
||||
--
|
||||
-- ### 2.2 SPOT Events
|
||||
--
|
||||
-- * **@{#SPOT.LaseOn}(Target, LaserCode, Duration)**: Lase to a target.
|
||||
-- * **@{#SPOT.LaseOff}()**: Stop lasing the target.
|
||||
-- * **@{#SPOT.Lasing}()**: Target is being lased.
|
||||
-- * **@{#SPOT.Destroyed}()**: Triggered when target is destroyed.
|
||||
--
|
||||
-- ## 3. Check if a Target is being lased
|
||||
--
|
||||
-- The method @{#SPOT.IsLasing}() indicates whether lasing is on or off.
|
||||
--
|
||||
-- @field #SPOT
|
||||
SPOT = {
|
||||
ClassName = "SPOT",
|
||||
}
|
||||
@ -46,18 +99,99 @@ do
|
||||
function SPOT:New( Recce )
|
||||
|
||||
local self = BASE:Inherit( self, FSM:New() ) -- #SPOT
|
||||
self:F( { Type, Name, Weight } )
|
||||
self:F( {} )
|
||||
|
||||
self:SetStartState( "Off" )
|
||||
self:AddTransition( "Off", "LaseOn", "On" )
|
||||
|
||||
--- LaseOn Handler OnBefore for SPOT
|
||||
-- @function [parent=#SPOT] OnBeforeLaseOn
|
||||
-- @param #SPOT self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- LaseOn Handler OnAfter for SPOT
|
||||
-- @function [parent=#SPOT] OnAfterLaseOn
|
||||
-- @param #SPOT self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- LaseOn Trigger for SPOT
|
||||
-- @function [parent=#SPOT] LaseOn
|
||||
-- @param #SPOT self
|
||||
|
||||
--- LaseOn Asynchronous Trigger for SPOT
|
||||
-- @function [parent=#SPOT] __LaseOn
|
||||
-- @param #SPOT self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
|
||||
self:AddTransition( "On", "Lasing", "On" )
|
||||
self:AddTransition( "On" , "LaseOff", "Off" )
|
||||
self:AddTransition( { "On", "Destroyed" } , "LaseOff", "Off" )
|
||||
|
||||
--- LaseOff Handler OnBefore for SPOT
|
||||
-- @function [parent=#SPOT] OnBeforeLaseOff
|
||||
-- @param #SPOT self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- LaseOff Handler OnAfter for SPOT
|
||||
-- @function [parent=#SPOT] OnAfterLaseOff
|
||||
-- @param #SPOT self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- LaseOff Trigger for SPOT
|
||||
-- @function [parent=#SPOT] LaseOff
|
||||
-- @param #SPOT self
|
||||
|
||||
--- LaseOff Asynchronous Trigger for SPOT
|
||||
-- @function [parent=#SPOT] __LaseOff
|
||||
-- @param #SPOT self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( "*" , "Destroyed", "Destroyed" )
|
||||
|
||||
--- Destroyed Handler OnBefore for SPOT
|
||||
-- @function [parent=#SPOT] OnBeforeDestroyed
|
||||
-- @param #SPOT self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Destroyed Handler OnAfter for SPOT
|
||||
-- @function [parent=#SPOT] OnAfterDestroyed
|
||||
-- @param #SPOT self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Destroyed Trigger for SPOT
|
||||
-- @function [parent=#SPOT] Destroyed
|
||||
-- @param #SPOT self
|
||||
|
||||
--- Destroyed Asynchronous Trigger for SPOT
|
||||
-- @function [parent=#SPOT] __Destroyed
|
||||
-- @param #SPOT self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
|
||||
self.Recce = Recce
|
||||
|
||||
self.LaseScheduler = SCHEDULER:New( self )
|
||||
|
||||
self:SetEventPriority( 5 )
|
||||
|
||||
self.Lasing = false
|
||||
|
||||
return self
|
||||
end
|
||||
@ -70,6 +204,7 @@ do
|
||||
-- @param #number LaserCode
|
||||
-- @param #number Duration
|
||||
function SPOT:onafterLaseOn( From, Event, To, Target, LaserCode, Duration )
|
||||
self:E( { "LaseOn", Target, LaserCode, Duration } )
|
||||
|
||||
local function StopLase( self )
|
||||
self:LaseOff()
|
||||
@ -78,17 +213,34 @@ do
|
||||
self.Target = Target
|
||||
self.LaserCode = LaserCode
|
||||
|
||||
self.Lasing = true
|
||||
|
||||
local RecceDcsUnit = self.Recce:GetDCSObject()
|
||||
|
||||
self.Spot = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3() )
|
||||
self.Spot = Spot.createLaser( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3(), LaserCode )
|
||||
self.SpotIR = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3() )
|
||||
self.SpotLaser = Spot.createLaser( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3(), LaserCode )
|
||||
|
||||
if Duration then
|
||||
self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration )
|
||||
end
|
||||
|
||||
self:HandleEvent( EVENTS.Dead )
|
||||
|
||||
self:__Lasing( -0.2 )
|
||||
end
|
||||
|
||||
--- @param #SPOT self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function SPOT:OnEventDead(EventData)
|
||||
self:E( { Dead = EventData.IniDCSUnitName, Target = self.Target } )
|
||||
if self.Target then
|
||||
if EventData.IniDCSUnitName == self.Target:GetName() then
|
||||
self:E( {"Target dead ", self.Target:GetName() } )
|
||||
self:Destroyed()
|
||||
self:LaseOff()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- @param #SPOT self
|
||||
-- @param From
|
||||
@ -97,10 +249,11 @@ do
|
||||
function SPOT:onafterLasing( From, Event, To )
|
||||
|
||||
if self.Target:IsAlive() then
|
||||
self.Spot:setPoint( self.Target:GetPointVec3():AddY(1):GetVec3() )
|
||||
self.SpotIR:setPoint( self.Target:GetPointVec3():AddY(1):AddY(math.random(-100,100)/100):AddX(math.random(-100,100)/100):GetVec3() )
|
||||
self.SpotLaser:setPoint( self.Target:GetPointVec3():AddY(1):GetVec3() )
|
||||
self:__Lasing( -0.2 )
|
||||
else
|
||||
self:__LaseOff( 0.2 )
|
||||
self:E( { "Target is not alive", self.Target:IsAlive() } )
|
||||
end
|
||||
|
||||
end
|
||||
@ -112,15 +265,22 @@ do
|
||||
-- @return #SPOT
|
||||
function SPOT:onafterLaseOff( From, Event, To )
|
||||
|
||||
self.Spot:destroy()
|
||||
self.Spot = nil
|
||||
self:E( {"Stopped lasing for ", self.Target:GetName() , SpotIR = self.SportIR, SpotLaser = self.SpotLaser } )
|
||||
|
||||
self.Lasing = false
|
||||
|
||||
self.SpotIR:destroy()
|
||||
self.SpotLaser:destroy()
|
||||
|
||||
self.SpotIR = nil
|
||||
self.SpotLaser = nil
|
||||
|
||||
if self.ScheduleID then
|
||||
self.LaseScheduler:Stop(self.ScheduleID)
|
||||
end
|
||||
self.ScheduleID = nil
|
||||
|
||||
self.Target = nil
|
||||
self.LaserCode = nil
|
||||
|
||||
return self
|
||||
end
|
||||
@ -129,15 +289,7 @@ do
|
||||
-- @param #SPOT self
|
||||
-- @return #boolean true if it is lasing
|
||||
function SPOT:IsLasing()
|
||||
self:F2()
|
||||
|
||||
local Lasing = false
|
||||
|
||||
if self.Spot then
|
||||
Lasing = true
|
||||
end
|
||||
|
||||
return Lasing
|
||||
return self.Lasing
|
||||
end
|
||||
|
||||
end
|
||||
@ -506,8 +506,6 @@ do -- DETECTION_BASE
|
||||
self.DetectionRun = 0
|
||||
self:UnIdentifyAllDetectedObjects() -- Resets the DetectedObjectsIdentified table
|
||||
|
||||
self.DetectionSetGroup:Flush()
|
||||
|
||||
for DetectionGroupID, DetectionGroupData in pairs( self.DetectionSetGroup:GetSet() ) do
|
||||
self:E( {DetectionGroupData})
|
||||
self:__DetectionGroup( DetectDelay, DetectionGroupData ) -- Process each detection asynchronously.
|
||||
@ -1132,7 +1130,7 @@ do -- DETECTION_BASE
|
||||
self.DetectedItems[self.DetectedItemCount] = DetectedItem
|
||||
end
|
||||
|
||||
DetectedItem.Set = Set or SET_UNIT:New()
|
||||
DetectedItem.Set = Set or SET_UNIT:New():FilterDeads():FilterCrashes()
|
||||
DetectedItem.ItemID = self.DetectedItemMax
|
||||
DetectedItem.Removed = false
|
||||
|
||||
|
||||
@ -22,46 +22,6 @@
|
||||
--
|
||||
-- ### [SPAWN YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **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-04-08: SPAWN:**InitDelayOnOff( DelayOnOff )** added.
|
||||
-- 2017-04-08: SPAWN:**InitDelayOn()** added.
|
||||
-- 2017-04-08: SPAWN:**InitDelayOff()** added.
|
||||
--
|
||||
-- 2017-03-14: SPAWN:**InitKeepUnitNames()** added.
|
||||
-- 2017-03-14: SPAWN:**InitRandomizePosition( RandomizePosition, OuterRadious, InnerRadius )** added.
|
||||
--
|
||||
-- 2017-02-04: SPAWN:InitUnControlled( **UnControlled** ) replaces SPAWN:InitUnControlled().
|
||||
--
|
||||
-- 2017-01-24: SPAWN:**InitAIOnOff( AIOnOff )** added.
|
||||
-- 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.
|
||||
--
|
||||
-- 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 ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.**InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )** added.
|
||||
-- 2016-08-14: SPAWN.**Init**Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN._Limit_( SpawnMaxUnitsAlive, SpawnMaxGroups ).
|
||||
-- 2016-08-14: SPAWN.**Init**Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN._Array_( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN._RandomizeRoute_( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN._RandomizeTemplate_( SpawnTemplatePrefixTable ).
|
||||
-- 2016-08-14: SPAWN.**Init**UnControlled() replaces SPAWN._UnControlled_().
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
|
||||
@ -1786,17 +1786,21 @@ function CONTROLLABLE:IsTargetDetected( DCSObject )
|
||||
self:F2( self.ControllableName )
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
|
||||
if DCSControllable then
|
||||
|
||||
local DetectionVisual = ( DetectVisual and DetectVisual == true ) and Controller.Detection.VISUAL or nil
|
||||
local DetectionOptical = ( DetectOptical and DetectOptical == true ) and Controller.Detection.OPTICAL or nil
|
||||
local DetectionRadar = ( DetectRadar and DetectRadar == true ) and Controller.Detection.RADAR or nil
|
||||
local DetectionIRST = ( DetectIRST and DetectIRST == true ) and Controller.Detection.IRST or nil
|
||||
local DetectionRWR = ( DetectRWR and DetectRWR == true ) and Controller.Detection.RWR or nil
|
||||
local DetectionDLINK = ( DetectDLINK and DetectDLINK == true ) and Controller.Detection.DLINK or nil
|
||||
|
||||
local Controller = self:_GetController()
|
||||
|
||||
local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity
|
||||
= self:_GetController().isTargetDetected( self:_GetController(), DCSObject,
|
||||
Controller.Detection.VISUAL,
|
||||
Controller.Detection.OPTIC,
|
||||
Controller.Detection.RADAR,
|
||||
Controller.Detection.IRST,
|
||||
Controller.Detection.RWR,
|
||||
Controller.Detection.DLINK
|
||||
)
|
||||
= Controller:isTargetDetected( DCSObject, DetectionVisual, DetectionOptical, DetectionRadar, DetectionIRST, DetectionRWR, DetectionDLINK )
|
||||
|
||||
return TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity
|
||||
end
|
||||
|
||||
|
||||
@ -555,22 +555,23 @@ end
|
||||
function GROUP:IsPartlyInZone( Zone )
|
||||
self:F2( { self.GroupName, Zone } )
|
||||
|
||||
local PartlyInZone = false
|
||||
local IsOneUnitInZone = false
|
||||
local IsOneUnitOutsideZone = false
|
||||
|
||||
for UnitID, UnitData in pairs( self:GetUnits() ) do
|
||||
local Unit = UnitData -- Wrapper.Unit#UNIT
|
||||
if Zone:IsVec3InZone( Unit:GetVec3() ) then
|
||||
PartlyInZone = true
|
||||
IsOneUnitInZone = true
|
||||
else
|
||||
-- So, if there were groups in the zone found, and suddenly one NOT in the zone,
|
||||
-- then the group is partialy in the zone :-)
|
||||
if PartlyInZone == true then
|
||||
return true
|
||||
end
|
||||
IsOneUnitOutsideZone = true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
if IsOneUnitInZone and IsOneUnitOutsideZone then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns true if none of the group units of the group are within a @{Zone}.
|
||||
@ -590,6 +591,24 @@ function GROUP:IsNotInZone( Zone )
|
||||
return true
|
||||
end
|
||||
|
||||
--- Returns the number of UNITs that are in the @{Zone}
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #number The number of UNITs that are in the @{Zone}
|
||||
function GROUP:CountInZone( Zone )
|
||||
self:F2( {self.GroupName, Zone} )
|
||||
local Count = 0
|
||||
|
||||
for UnitID, UnitData in pairs( self:GetUnits() ) do
|
||||
local Unit = UnitData -- Wrapper.Unit#UNIT
|
||||
if Zone:IsVec3InZone( Unit:GetVec3() ) then
|
||||
Count = Count + 1
|
||||
end
|
||||
end
|
||||
|
||||
return Count
|
||||
end
|
||||
|
||||
--- Returns if the group is of an air category.
|
||||
-- If the group is a helicopter or a plane, then this method will return true, otherwise false.
|
||||
-- @param #GROUP self
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
-- @type POSITIONABLE
|
||||
-- @extends Wrapper.Identifiable#IDENTIFIABLE
|
||||
-- @field #string PositionableName The name of the measurable.
|
||||
-- @field Core.Spot#SPOT Spot The laser Spot.
|
||||
-- @field #number LaserCode The last assigned laser code.
|
||||
POSITIONABLE = {
|
||||
ClassName = "POSITIONABLE",
|
||||
PositionableName = "",
|
||||
@ -426,6 +428,30 @@ function POSITIONABLE:MessageToGroup( Message, Duration, MessageGroup, Name )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Send a message to a @{Set#SET_GROUP}.
|
||||
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #string Message The message text
|
||||
-- @param Dcs.DCSTypes#Duration Duration The duration of the message.
|
||||
-- @param Core.Set#SET_GROUP MessageSetGroup The SET_GROUP collection receiving the message.
|
||||
-- @param #string Name (optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
|
||||
function POSITIONABLE:MessageToSetGroup( Message, Duration, MessageSetGroup, Name ) --R2.1
|
||||
self:F2( { Message, Duration } )
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
if DCSObject:isExist() then
|
||||
MessageSetGroup:ForEachGroup(
|
||||
function( MessageGroup )
|
||||
self:GetMessage( Message, Duration, Name ):ToGroup( MessageGroup )
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Send a message to the players in the @{Group}.
|
||||
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
|
||||
-- @param #POSITIONABLE self
|
||||
@ -447,7 +473,7 @@ end
|
||||
-- Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #RADIO Radio
|
||||
function POSITIONABLE:GetRadio()
|
||||
function POSITIONABLE:GetRadio() --R2.1
|
||||
self:F2(self)
|
||||
return RADIO:New(self)
|
||||
end
|
||||
@ -455,7 +481,7 @@ end
|
||||
--- Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #RADIO Radio
|
||||
function POSITIONABLE:GetBeacon()
|
||||
function POSITIONABLE:GetBeacon() --R2.1
|
||||
self:F2(self)
|
||||
return BEACON:New(self)
|
||||
end
|
||||
@ -466,7 +492,7 @@ end
|
||||
-- @param #number LaserCode
|
||||
-- @param #number Duration
|
||||
-- @return Core.Spot#SPOT
|
||||
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
||||
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1
|
||||
self:F2()
|
||||
|
||||
LaserCode = LaserCode or math.random( 1000, 9999 )
|
||||
@ -475,8 +501,9 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
||||
local TargetVec3 = Target:GetVec3()
|
||||
|
||||
self:E("bulding spot")
|
||||
self.Spot = SPOT:New( self )
|
||||
self.Spot = SPOT:New( self ) -- Core.Spot#SPOT
|
||||
self.Spot:LaseOn( Target, LaserCode, Duration)
|
||||
self.LaserCode = LaserCode
|
||||
|
||||
return self.Spot
|
||||
|
||||
@ -484,13 +511,10 @@ end
|
||||
|
||||
--- Stop Lasing a POSITIONABLE
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #POSITIONABLE Target
|
||||
-- @return #POSITIONABLE
|
||||
function POSITIONABLE:LaseOff( Target )
|
||||
function POSITIONABLE:LaseOff() --R2.1
|
||||
self:F2()
|
||||
|
||||
local TargetUnitName = Target:GetName()
|
||||
|
||||
if self.Spot then
|
||||
self.Spot:LaseOff()
|
||||
self.Spot = nil
|
||||
@ -502,7 +526,7 @@ end
|
||||
--- Check if the POSITIONABLE is lasing a target
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #boolean true if it is lasing a target
|
||||
function POSITIONABLE:IsLasing()
|
||||
function POSITIONABLE:IsLasing() --R2.1
|
||||
self:F2()
|
||||
|
||||
local Lasing = false
|
||||
@ -513,3 +537,19 @@ function POSITIONABLE:IsLasing()
|
||||
|
||||
return Lasing
|
||||
end
|
||||
|
||||
--- Get the Spot
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return Core.Spot#SPOT The Spot
|
||||
function POSITIONABLE:GetSpot() --R2.1
|
||||
|
||||
return self.Spot
|
||||
end
|
||||
|
||||
--- Get the last assigned laser code
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #number The laser code
|
||||
function POSITIONABLE:GetLaserCode() --R2.1
|
||||
|
||||
return self.LaserCode
|
||||
end
|
||||
|
||||
@ -64,13 +64,18 @@
|
||||
--
|
||||
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
||||
--
|
||||
-- ### Zones
|
||||
-- ### Zones range
|
||||
--
|
||||
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
||||
--
|
||||
-- ### Units
|
||||
-- ### Unit range
|
||||
--
|
||||
-- * Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
||||
--
|
||||
-- ## Test Line of Sight
|
||||
--
|
||||
-- * Use the @{#UNIT.IsLOS}() method to check if the given unit is within line of sight.
|
||||
--
|
||||
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
||||
--
|
||||
-- @field #UNIT UNIT
|
||||
UNIT = {
|
||||
@ -1002,6 +1007,32 @@ do -- Event Handling
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- Detection
|
||||
|
||||
--- Returns if a unit is detecting the TargetUnit.
|
||||
-- @param #UNIT self
|
||||
-- @param #UNIT TargetUnit
|
||||
-- @return #boolean true If the TargetUnit is detected by the unit, otherwise false.
|
||||
function UNIT:IsDetected( TargetUnit ) --R2.1
|
||||
|
||||
local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity = self:IsTargetDetected( TargetUnit:GetDCSObject() )
|
||||
|
||||
return TargetIsDetected
|
||||
end
|
||||
|
||||
--- Returns if a unit has Line of Sight (LOS) with the TargetUnit.
|
||||
-- @param #UNIT self
|
||||
-- @param #UNIT TargetUnit
|
||||
-- @return #boolean true If the TargetUnit has LOS with the unit, otherwise false.
|
||||
function UNIT:IsLOS( TargetUnit ) --R2.1
|
||||
|
||||
local IsLOS = self:GetPointVec3():IsLOS( TargetUnit:GetPointVec3() )
|
||||
|
||||
return IsLOS
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170419_1937' )
|
||||
env.info( 'Moose Generation Timestamp: 20170423_0705' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<div id="content">
|
||||
<h1>Module <code>AI_Designate</code></h1>
|
||||
|
||||
<p><strong>AI (Release 2.1)</strong> -- Management of target designation.</p>
|
||||
<p><strong>AI R2.1</strong> -- Management of target <strong>Designation</strong>.</p>
|
||||
|
||||
|
||||
|
||||
@ -103,6 +103,38 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
||||
and communicates these to a dedicated attacking group of players,
|
||||
so that following a dynamically generated menu system,
|
||||
each detected set of potential targets can be lased or smoked...</p>
|
||||
|
||||
<p>Targets can be:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Lased</strong> for a period of time.</li>
|
||||
<li><strong>Smoked</strong>. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)</li>
|
||||
<li><strong>Illuminated</strong> through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=112175"><strong>Ciribob</strong></a>: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.</li>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=112055"><strong>EasyEB</strong></a>: Ideas and Beta Testing</li>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=123698"><strong>Wingthor</strong></a>: Beta Testing</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Authors:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>FlightControl</strong>: Design & Programming</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@ -121,6 +153,30 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<h2><a id="#(AI_DESIGNATE)">Type <code>AI_DESIGNATE</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).ActivateAutoLase">AI_DESIGNATE:ActivateAutoLase()</a></td>
|
||||
<td class="summary">
|
||||
<p>Coordinates the Auto Lase.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).AttackSet">AI_DESIGNATE.AttackSet</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).AutoLase">AI_DESIGNATE.AutoLase</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Designating">AI_DESIGNATE.Designating</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Detect">AI_DESIGNATE:Detect()</a></td>
|
||||
<td class="summary">
|
||||
<p>Detect Trigger for AI_DESIGNATE</p>
|
||||
@ -133,7 +189,13 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).GroupSet">AI_DESIGNATE.GroupSet</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Illuminate">AI_DESIGNATE:Illuminate()</a></td>
|
||||
<td class="summary">
|
||||
<p>Illuminate Trigger for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).LaseDuration">AI_DESIGNATE.LaseDuration</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -157,25 +219,49 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOff">AI_DESIGNATE:MenuLaseOff(AttackGroup, Index, Duration)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).LaserCodesUsed">AI_DESIGNATE.LaserCodesUsed</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOn">AI_DESIGNATE:MenuLaseOn(AttackGroup, Index, Duration)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuAutoLase">AI_DESIGNATE:MenuAutoLase(AutoLase)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuSmoke">AI_DESIGNATE:MenuSmoke(AttackGroup, Index)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuIlluminate">AI_DESIGNATE:MenuIlluminate(Index)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).New">AI_DESIGNATE:New(Detection, GroupSet)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOff">AI_DESIGNATE:MenuLaseOff(Index, Duration)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOn">AI_DESIGNATE:MenuLaseOn(Index, Duration)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuSmoke">AI_DESIGNATE:MenuSmoke(Index, Color)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuStatus">AI_DESIGNATE:MenuStatus(AttackGroup)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).New">AI_DESIGNATE:New(Detection, AttackSet)</a></td>
|
||||
<td class="summary">
|
||||
<p>AI_DESIGNATE Constructor.</p>
|
||||
</td>
|
||||
@ -184,6 +270,12 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).OnAfterDetect">AI_DESIGNATE:OnAfterDetect(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detect Handler OnAfter for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).OnAfterIlluminate">AI_DESIGNATE:OnAfterIlluminate(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>Illuminate Handler OnAfter for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -214,6 +306,12 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).OnBeforeDetect">AI_DESIGNATE:OnBeforeDetect(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detect Handler OnBefore for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).OnBeforeIlluminate">AI_DESIGNATE:OnBeforeIlluminate(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>Illuminate Handler OnBefore for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -244,12 +342,24 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).RecceSet">AI_DESIGNATE.RecceSet</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Recces">AI_DESIGNATE.Recces</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).SendStatus">AI_DESIGNATE:SendStatus()</a></td>
|
||||
<td class="summary">
|
||||
<p>Sends the status to the Attack Groups.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).SetAutoLase">AI_DESIGNATE:SetAutoLase(AutoLase)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set auto lase.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -268,12 +378,6 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Smoke">AI_DESIGNATE:Smoke()</a></td>
|
||||
<td class="summary">
|
||||
<p>Smoke Trigger for AI_DESIGNATE </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Spots">AI_DESIGNATE.Spots</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -286,6 +390,12 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).__Detect">AI_DESIGNATE:__Detect(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detect Asynchronous Trigger for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).__Illuminate">AI_DESIGNATE:__Illuminate(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>Illuminate Asynchronous Trigger for AI_DESIGNATE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -319,19 +429,37 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOff">AI_DESIGNATE:onafterLaseOff(From, Event, To, AttackGroup, Index)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterDone">AI_DESIGNATE:onafterDone(From, Event, To, Index)</a></td>
|
||||
<td class="summary">
|
||||
<p>Done</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterIlluminate">AI_DESIGNATE:onafterIlluminate(From, Event, To, Index)</a></td>
|
||||
<td class="summary">
|
||||
<p>Illuminating</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOff">AI_DESIGNATE:onafterLaseOff(From, Event, To, Index)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOn">AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOn">AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterSmoke">AI_DESIGNATE:onafterSmoke(From, Event, To, AttackGroup, Index)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLasing">AI_DESIGNATE:onafterLasing(From, Event, To, Index, Duration)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterSmoke">AI_DESIGNATE:onafterSmoke(From, Event, To, Index, Color)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -358,24 +486,67 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
|
||||
|
||||
|
||||
<p>The Recce group is detecting as part of the DETECTION_ class continuously targets.
|
||||
Once targets have been detected, they will be reported. The AI_DESIGNATE object will fire the <strong>Detect</strong> event in this case!
|
||||
As part of the reporting, the following happens:</p>
|
||||
<p>Targets can be:</p>
|
||||
|
||||
<ul>
|
||||
<li>A message is sent to each GROUP of the Attack SET_GROUP, containing the threat level and the target composition.</li>
|
||||
<li>A menu is created and updated for each GROUP of the Attack SET_GROUP, containing the the treat level and the target composition.</li>
|
||||
<li><strong>Lased</strong> for a period of time.</li>
|
||||
<li><strong>Smoked</strong>. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)</li>
|
||||
<li><strong>Illuminated</strong> through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.</li>
|
||||
</ul>
|
||||
|
||||
<p>One of the players in one of the Attack GROUPs, can then select a Target Set by selecting one of the menu options.
|
||||
Each menu option has two modes: </p>
|
||||
<p>The following terminology is being used throughout this document:</p>
|
||||
|
||||
<ul>
|
||||
<li>If the Target Set is not being designated, then the Designate menu for the target Set will provide options to Lase or Smoke the targets.</li>
|
||||
<li>If the Target Set is being designated, then the Designate menu will provide an option to cancel the designation.</li>
|
||||
<li>The <strong>DesignateObject</strong> is the object of the AI_DESIGNATE class, which is this class explained in the document.</li>
|
||||
<li>The <strong>DetectionObject</strong> is the object of a DETECTION_ class (DETECTION<em>TYPES, DETECTION</em>AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into <em>DetectionItems</em>.</li>
|
||||
<li><strong>DetectionItems</strong> is the list of detected target groupings by the <em>DetectionObject</em>. Each <em>DetectionItem</em> contains a <em>TargetSet</em>.</li>
|
||||
<li><strong>DetectionItem</strong> is one element of the <em>DetectionItems</em> list, and contains a <em>TargetSet</em>.</li>
|
||||
<li>The <strong>TargetSet</strong> is a SET_UNITS collection of <em>Targets</em>, that have been detected by the <em>DetectionObject</em>.</li>
|
||||
<li>A <strong>Target</strong> is a detected UNIT object by the <em>DetectionObject</em>.</li>
|
||||
<li>A <strong>Threat Level</strong> is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.</li>
|
||||
<li>The <strong>RecceSet</strong> is a SET_GROUP collection that contains the <strong>RecceGroups</strong>.</li>
|
||||
<li>A <strong>RecceGroup</strong> is a GROUP object containing the <strong>Recces</strong>.</li>
|
||||
<li>A <strong>Recce</strong> is a UNIT object executing the reconnaissance as part the <em>DetectionObject</em>. A Recce can be of any UNIT type.</li>
|
||||
<li>An <strong>AttackGroup</strong> is a GROUP object that contain <em>Players</em>.</li>
|
||||
<li>A <strong>Player</strong> is an active CLIENT object containing a human player.</li>
|
||||
<li>A <strong>Designate Menu</strong> is the menu that is dynamically created during the designation process for each <em>AttackGroup</em>.</li>
|
||||
</ul>
|
||||
|
||||
<p>In this way, the AI can assist players to designate ground targets for a coordinated attack!</p>
|
||||
<p>The <em>RecceSet</em> is continuously detecting for potential <em>Targets</em>, executing its task as part of the <em>DetectionObject</em>.
|
||||
Once <em>Targets</em> have been detected, the <em>DesignateObject</em> will trigger the <strong>Detect Event</strong>.</p>
|
||||
|
||||
<p>As part of the Detect Event, the <em>DetectionItems</em> list is used by the <em>DesignateObject</em> to provide the <em>Players</em> with:</p>
|
||||
|
||||
<ul>
|
||||
<li>The <em>RecceGroups</em> are reporting to each <em>AttackGroup</em>, sending <strong>Messages</strong> containing the <em>Threat Level</em> and the <em>TargetSet</em> composition.</li>
|
||||
<li><strong>Menu options</strong> are created and updated for each <em>AttackGroup</em>, containing the <em>Threat Level</em> and the <em>TargetSet</em> composition.</li>
|
||||
</ul>
|
||||
|
||||
<p>A <em>Player</em> can then select an action from the <em>Designate Menu</em>. </p>
|
||||
|
||||
<p><strong>Note that each selected action will be executed for a <em>TargetSet</em>, thus the <em>Target</em> grouping done by the <em>DetectionObject</em>.</strong></p>
|
||||
|
||||
<p>Each <strong>Menu Option</strong> in the <em>Designate Menu</em> has two modes: </p>
|
||||
|
||||
<ol>
|
||||
<li>If the <em>TargetSet</em> <strong>is not being designated</strong>, then the <strong>Designate Menu</strong> option for the target Set will provide options to <strong>Lase</strong> or <strong>Smoke</strong> the targets.</li>
|
||||
<li>If the Target Set <strong>is being designated</strong>, then the <strong>Designate Menu</strong> option will provide an option to stop or cancel the designation.</li>
|
||||
</ol>
|
||||
|
||||
<p>While designating, the <em>RecceGroups</em> will report any change in <em>TargetSet</em> composition or <em>Target</em> presence.</p>
|
||||
|
||||
<p>The following logic is executed when a <em>TargetSet</em> is selected to be <em>lased</em> from the <em>Designation Menu</em>:</p>
|
||||
|
||||
<ul>
|
||||
<li>The <em>RecceSet</em> is searched for any <em>Recce</em> that is within <em>designation distance</em> from a <em>Target</em> in the <em>TargetSet</em> that is currently not being designated.</li>
|
||||
<li>If there is a <em>Recce</em> found that is currently no designating a target, and is within designation distance from the <em>Target</em>, then that <em>Target</em> will be designated.</li>
|
||||
<li>During designation, any <em>Recce</em> that does not have Line of Sight (LOS) and is not within disignation distance from the <em>Target</em>, will stop designating the <em>Target</em>, and a report is given.</li>
|
||||
<li>When a <em>Recce</em> is designating a <em>Target</em>, and that <em>Target</em> is destroyed, then the <em>Recce</em> will stop designating the <em>Target</em>, and will report the event.</li>
|
||||
<li>When a <em>Recce</em> is designating a <em>Target</em>, and that <em>Recce</em> is destroyed, then the <em>Recce</em> will be removed from the <em>RecceSet</em> and designation will stop without reporting.</li>
|
||||
<li>When all <em>RecceGroups</em> are destroyed from the <em>RecceSet</em>, then the DesignationObject will stop functioning, and nothing will be reported.</li>
|
||||
</ul>
|
||||
|
||||
<p>In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!</p>
|
||||
|
||||
<p>Have FUN!</p>
|
||||
|
||||
@ -387,7 +558,7 @@ Each menu option has two modes: </p>
|
||||
|
||||
<h2>2. AI_DESIGNATE is a FSM</h2>
|
||||
|
||||
<p><img src="µ" alt="Process"/></p>
|
||||
<p><img src="" alt="Process"/></p>
|
||||
|
||||
<h3>2.1 AI_DESIGNATE States</h3>
|
||||
|
||||
@ -425,7 +596,17 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
|
||||
<p>The above sets a collection of possible laser codes that can be assigned. <strong>Note the { } notation!</strong></p>
|
||||
|
||||
<h2>4. Autolase to automatically lase detected targets.</h2>
|
||||
|
||||
<p><em>DetectionItems</em> can be auto lased once detected by <em>Recces</em>. As such, there is almost no action required from the <em>Players</em> using the <em>Designate Menu</em>.
|
||||
The <strong>auto lase</strong> function can be activated through the Designation Menu.
|
||||
Use the method <a href="##(AI_DESIGNATE).SetAutoLase">AI_DESIGNATE.SetAutoLase</a>() to activate or deactivate the auto lase function programmatically.
|
||||
Note that autolase will automatically activate lasing for ALL <em>DetectedItems</em>. Individual items can be switched-off if required using the <em>Designation Menu</em>.</p>
|
||||
|
||||
<pre><code>AIDesignate:SetAutoLase( true )
|
||||
</code></pre>
|
||||
|
||||
<p>Activate the auto lasing.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -437,6 +618,66 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).ActivateAutoLase" >
|
||||
<strong>AI_DESIGNATE:ActivateAutoLase()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Coordinates the Auto Lase.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).AttackSet" >
|
||||
<strong>AI_DESIGNATE.AttackSet</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).AutoLase" >
|
||||
<strong>AI_DESIGNATE.AutoLase</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).Designating" >
|
||||
<strong>AI_DESIGNATE.Designating</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).Detect" >
|
||||
<strong>AI_DESIGNATE:Detect()</strong>
|
||||
</a>
|
||||
@ -464,9 +705,22 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).GroupSet" >
|
||||
<strong>AI_DESIGNATE.GroupSet</strong>
|
||||
<a id="#(AI_DESIGNATE).Illuminate" >
|
||||
<strong>AI_DESIGNATE:Illuminate()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Illuminate Trigger for AI_DESIGNATE</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(AI_DESIGNATE).LaseDuration" >
|
||||
<strong>AI_DESIGNATE.LaseDuration</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -512,13 +766,69 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).LaserCodesUsed" >
|
||||
<strong>AI_DESIGNATE.LaserCodesUsed</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).MenuAutoLase" >
|
||||
<strong>AI_DESIGNATE:MenuAutoLase(AutoLase)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AutoLase </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).MenuIlluminate" >
|
||||
<strong>AI_DESIGNATE:MenuIlluminate(Index)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).MenuLaseOff" >
|
||||
<strong>AI_DESIGNATE:MenuLaseOff(AttackGroup, Index, Duration)</strong>
|
||||
<strong>AI_DESIGNATE:MenuLaseOff(Index, Duration)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -529,11 +839,6 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
@ -549,7 +854,7 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).MenuLaseOn" >
|
||||
<strong>AI_DESIGNATE:MenuLaseOn(AttackGroup, Index, Duration)</strong>
|
||||
<strong>AI_DESIGNATE:MenuLaseOn(Index, Duration)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -560,11 +865,6 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
@ -580,7 +880,7 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).MenuSmoke" >
|
||||
<strong>AI_DESIGNATE:MenuSmoke(AttackGroup, Index)</strong>
|
||||
<strong>AI_DESIGNATE:MenuSmoke(Index, Color)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -591,12 +891,33 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
<p><code><em> Color </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).MenuStatus" >
|
||||
<strong>AI_DESIGNATE:MenuStatus(AttackGroup)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@ -606,7 +927,7 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).New" >
|
||||
<strong>AI_DESIGNATE:New(Detection, GroupSet)</strong>
|
||||
<strong>AI_DESIGNATE:New(Detection, AttackSet)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -625,8 +946,8 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Set.html##(SET_GROUP)">Core.Set#SET_GROUP</a> GroupSet </em></code>:
|
||||
The set of groups to designate for.</p>
|
||||
<p><code><em><a href="Core.Set.html##(SET_GROUP)">Core.Set#SET_GROUP</a> AttackSet </em></code>:
|
||||
The Attack collection of GROUP objects to designate and report for.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@ -671,6 +992,37 @@ The set of groups to designate for.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).OnAfterIlluminate" >
|
||||
<strong>AI_DESIGNATE:OnAfterIlluminate(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Illuminate Handler OnAfter for AI_DESIGNATE</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).OnAfterLaseOff" >
|
||||
<strong>AI_DESIGNATE:OnAfterLaseOff(From, Event, To)</strong>
|
||||
</a>
|
||||
@ -826,6 +1178,42 @@ The set of groups to designate for.</p>
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).OnBeforeIlluminate" >
|
||||
<strong>AI_DESIGNATE:OnBeforeIlluminate(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Illuminate Handler OnBefore for AI_DESIGNATE</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -984,6 +1372,20 @@ The set of groups to designate for.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).Recces" >
|
||||
<strong>AI_DESIGNATE.Recces</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1002,6 +1404,35 @@ The set of groups to designate for.</p>
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).SetAutoLase" >
|
||||
<strong>AI_DESIGNATE:SetAutoLase(AutoLase)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set auto lase.</p>
|
||||
|
||||
|
||||
<p>Auto lase will start lasing targets immediately when these are in range.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean AutoLase </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1068,20 +1499,6 @@ number> LaserCodes</p>
|
||||
|
||||
<p>Smoke Trigger for AI_DESIGNATE </p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_DESIGNATE).Spots" >
|
||||
<strong>AI_DESIGNATE.Spots</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1121,6 +1538,27 @@ number> LaserCodes</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).__Illuminate" >
|
||||
<strong>AI_DESIGNATE:__Illuminate(Delay)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Illuminate Asynchronous Trigger for AI_DESIGNATE</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Delay </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).__LaseOff" >
|
||||
<strong>AI_DESIGNATE:__LaseOff(Delay)</strong>
|
||||
</a>
|
||||
@ -1218,13 +1656,95 @@ number> LaserCodes</p>
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).onafterDone" >
|
||||
<strong>AI_DESIGNATE:onafterDone(From, Event, To, Index)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Done</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).onafterIlluminate" >
|
||||
<strong>AI_DESIGNATE:onafterIlluminate(From, Event, To, Index)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Illuminating</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).onafterLaseOff" >
|
||||
<strong>AI_DESIGNATE:onafterLaseOff(From, Event, To, AttackGroup, Index)</strong>
|
||||
<strong>AI_DESIGNATE:onafterLaseOff(From, Event, To, Index)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -1250,11 +1770,6 @@ number> LaserCodes</p>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
@ -1270,7 +1785,7 @@ number> LaserCodes</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).onafterLaseOn" >
|
||||
<strong>AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)</strong>
|
||||
<strong>AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -1296,7 +1811,43 @@ number> LaserCodes</p>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Duration </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).onafterLasing" >
|
||||
<strong>AI_DESIGNATE:onafterLasing(From, Event, To, Index, Duration)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1321,7 +1872,7 @@ number> LaserCodes</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).onafterSmoke" >
|
||||
<strong>AI_DESIGNATE:onafterSmoke(From, Event, To, AttackGroup, Index)</strong>
|
||||
<strong>AI_DESIGNATE:onafterSmoke(From, Event, To, Index, Color)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -1347,12 +1898,12 @@ number> LaserCodes</p>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> AttackGroup </em></code>: </p>
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
<p><code><em> Color </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -951,6 +951,9 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
|
||||
|
||||
|
||||
|
||||
<p> This table contains the targets detected during patrol.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -312,6 +312,12 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).OnEventCrash">BASE:OnEventCrash(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Occurs when any aircraft crashes into the ground and is completely destroyed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).OnEventDead">BASE:OnEventDead(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Occurs when an object is dead.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1398,6 +1404,31 @@ The EventData structure.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).OnEventDead" >
|
||||
<strong>BASE:OnEventDead(EventData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Occurs when an object is dead.</p>
|
||||
|
||||
|
||||
<p>initiator : The unit that is dead. </p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>:
|
||||
The EventData structure.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).OnEventEjection" >
|
||||
<strong>BASE:OnEventEjection(EventData)</strong>
|
||||
</a>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<div id="content">
|
||||
<h1>Module <code>Cargo</code></h1>
|
||||
|
||||
<p><strong>Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
|
||||
<p><strong>(R2.1) Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
|
||||
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#CARGO">CARGO</a></td>
|
||||
<td class="summary">
|
||||
<h1>CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
<h1>(R2.1) CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
|
||||
<p>The CARGO class defines the core functions that defines a cargo object within MOOSE.</p>
|
||||
</td>
|
||||
@ -721,7 +721,7 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
<h1>(R2.1) CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
|
||||
<p>The CARGO class defines the core functions that defines a cargo object within MOOSE.</p>
|
||||
|
||||
@ -2847,7 +2847,6 @@ The range till cargo will board.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CARGO_UNIT).CargoCarrier" >
|
||||
<strong>CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
|
||||
@ -2300,7 +2300,7 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(DETECTION_BASE).DetectionInterval" >
|
||||
<strong>DETECTION_BASE.DetectionInterval</strong>
|
||||
</a>
|
||||
|
||||
@ -1622,7 +1622,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#string</em>
|
||||
<a id="#(FSM)._StartState" >
|
||||
<strong>FSM._StartState</strong>
|
||||
</a>
|
||||
@ -1921,7 +1921,6 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM).current" >
|
||||
<strong>FSM.current</strong>
|
||||
</a>
|
||||
|
||||
@ -190,6 +190,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).CopyRoute">GROUP:CopyRoute(Begin, End, Randomize, Radius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return the route of a group by using the <a href="Database.html##(DATABASE)">Database#DATABASE</a> class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).CountInZone">GROUP:CountInZone(Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the number of UNITs that are in the <a href="Zone.html">Zone</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -680,6 +686,33 @@ When randomization is on, the randomization is within the radius.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).CountInZone" >
|
||||
<strong>GROUP:CountInZone(Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the number of UNITs that are in the <a href="Zone.html">Zone</a></p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> Zone </em></code>:
|
||||
The zone to test.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The number of UNITs that are in the <a href="Zone.html">Zone</a></p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).Destroy" >
|
||||
<strong>GROUP:Destroy()</strong>
|
||||
</a>
|
||||
|
||||
@ -213,6 +213,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(MOVEMENT).AliveUnits" >
|
||||
<strong>MOVEMENT.AliveUnits</strong>
|
||||
</a>
|
||||
@ -221,6 +222,9 @@ on defined intervals (currently every minute).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Contains the counter how many units are currently alive</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -484,6 +484,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).IlluminationBomb">POINT_VEC3:IlluminationBomb()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates an illumination bomb at the point.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).IsLOS">POINT_VEC3:IsLOS(ToPointVec3)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -2140,6 +2146,32 @@ The z coodinate.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC3).IsLOS" >
|
||||
<strong>POINT_VEC3:IsLOS(ToPointVec3)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(POINT_VEC3)">#POINT_VEC3</a> ToPointVec3 </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true If the ToPointVec3 has LOS with the PointVec3, otherwise false.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC3).IsMetric" >
|
||||
<strong>POINT_VEC3:IsMetric()</strong>
|
||||
</a>
|
||||
|
||||
@ -169,6 +169,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetHeading">POSITIONABLE:GetHeading()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the POSITIONABLE heading in degrees.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetLaserCode">POSITIONABLE:GetLaserCode()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the last assigned laser code</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -205,6 +211,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetRandomVec3">POSITIONABLE:GetRandomVec3(Radius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns a random <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetSpot">POSITIONABLE:GetSpot()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the Spot</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -250,7 +262,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseOff">POSITIONABLE:LaseOff(Target)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseOff">POSITIONABLE:LaseOff()</a></td>
|
||||
<td class="summary">
|
||||
<p>Stop Lasing a POSITIONABLE</p>
|
||||
</td>
|
||||
@ -259,6 +271,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseUnit">POSITIONABLE:LaseUnit(Target, LaserCode, Duration)</a></td>
|
||||
<td class="summary">
|
||||
<p>Start Lasing a POSITIONABLE</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaserCode">POSITIONABLE.LaserCode</a></td>
|
||||
<td class="summary">
|
||||
<p>The last assigned laser code.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -301,6 +319,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).MessageToRed">POSITIONABLE:MessageToRed(Message, Duration, Name)</a></td>
|
||||
<td class="summary">
|
||||
<p>Send a message to the red coalition.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).MessageToSetGroup">POSITIONABLE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name)</a></td>
|
||||
<td class="summary">
|
||||
<p>Send a message to a <a href="Set.html##(SET_GROUP)">Set#SET_GROUP</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -318,7 +342,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).Spot">POSITIONABLE.Spot</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>The laser Spot.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -455,6 +479,24 @@ The POSITIONABLE is not existing or alive.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetLaserCode" >
|
||||
<strong>POSITIONABLE:GetLaserCode()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Get the last assigned laser code</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The laser code</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetMessage" >
|
||||
<strong>POSITIONABLE:GetMessage(Message, Duration, Name)</strong>
|
||||
</a>
|
||||
@ -639,6 +681,24 @@ The POSITIONABLE is not existing or alive. </p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetSpot" >
|
||||
<strong>POSITIONABLE:GetSpot()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Get the Spot</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a>:</em>
|
||||
The Spot</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetVec2" >
|
||||
<strong>POSITIONABLE:GetVec2()</strong>
|
||||
</a>
|
||||
@ -829,21 +889,13 @@ true if it is lasing a target</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).LaseOff" >
|
||||
<strong>POSITIONABLE:LaseOff(Target)</strong>
|
||||
<strong>POSITIONABLE:LaseOff()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Stop Lasing a POSITIONABLE</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(POSITIONABLE)">#POSITIONABLE</a> Target </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(POSITIONABLE)">#POSITIONABLE</a>:</em></p>
|
||||
@ -885,6 +937,20 @@ true if it is lasing a target</p>
|
||||
<p><em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(POSITIONABLE).LaserCode" >
|
||||
<strong>POSITIONABLE.LaserCode</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>The last assigned laser code.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1167,6 +1233,49 @@ The duration of the message.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).MessageToSetGroup" >
|
||||
<strong>POSITIONABLE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Send a message to a <a href="Set.html##(SET_GROUP)">Set#SET_GROUP</a>.</p>
|
||||
|
||||
|
||||
<p>The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Message </em></code>:
|
||||
The message text</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Duration)">Dcs.DCSTypes#Duration</a> Duration </em></code>:
|
||||
The duration of the message.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Set.html##(SET_GROUP)">Core.Set#SET_GROUP</a> MessageSetGroup </em></code>:
|
||||
The SET_GROUP collection receiving the message.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Name </em></code>:
|
||||
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).New" >
|
||||
<strong>POSITIONABLE:New(PositionableName)</strong>
|
||||
</a>
|
||||
@ -1208,13 +1317,14 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a></em>
|
||||
<a id="#(POSITIONABLE).Spot" >
|
||||
<strong>POSITIONABLE.Spot</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<p>The laser Spot.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SET_CARGO">SET_CARGO</a></td>
|
||||
<td class="summary">
|
||||
<h1>SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
<h1>(R2.1) SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p>
|
||||
|
||||
@ -349,6 +349,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).Filter">SET_BASE.Filter</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).FilterCrashes">SET_BASE:FilterCrashes()</a></td>
|
||||
<td class="summary">
|
||||
<p>Starts the filtering of the Crash events for the collection.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).FilterDeads">SET_BASE:FilterDeads()</a></td>
|
||||
<td class="summary">
|
||||
<p>Starts the filtering of the Dead events for the collection.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -508,97 +520,97 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddCargosByName">SET_CARGO:AddCargosByName(AddCargoNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add CARGOs to SET_CARGO.</p>
|
||||
<p>(R2.1) Add CARGOs to SET_CARGO.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddInDatabase">SET_CARGO:AddInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
<p>(R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCoalitions">SET_CARGO:FilterCoalitions(Coalitions)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of coalitions.</p>
|
||||
<p>(R2.1) Builds a set of cargos of coalitions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCountries">SET_CARGO:FilterCountries(Countries)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of defined countries.</p>
|
||||
<p>(R2.1) Builds a set of cargos of defined countries.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterPrefixes">SET_CARGO:FilterPrefixes(Prefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of defined cargo prefixes.</p>
|
||||
<p>(R2.1) Builds a set of cargos of defined cargo prefixes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterStart">SET_CARGO:FilterStart()</a></td>
|
||||
<td class="summary">
|
||||
<p>Starts the filtering.</p>
|
||||
<p>(R2.1) Starts the filtering.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterTypes">SET_CARGO:FilterTypes(Types)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of defined cargo types.</p>
|
||||
<p>(R2.1) Builds a set of cargos of defined cargo types.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindCargo">SET_CARGO:FindCargo(CargoName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds a Cargo based on the Cargo Name.</p>
|
||||
<p>(R2.1) Finds a Cargo based on the Cargo Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindInDatabase">SET_CARGO:FindInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
<p>(R2.1) Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindNearestCargoFromPointVec2">SET_CARGO:FindNearestCargoFromPointVec2(PointVec2)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
|
||||
<p>(R2.1) Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).ForEachCargo">SET_CARGO:ForEachCargo(IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
|
||||
<p>(R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).IsIncludeObject">SET_CARGO:IsIncludeObject(MCargo)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>(R2.1) </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).New">SET_CARGO:New()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
|
||||
<p>(R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventDeleteCargo">SET_CARGO:OnEventDeleteCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnDead or OnCrash event for alive units set.</p>
|
||||
<p>(R2.1) Handles the OnDead or OnCrash event for alive units set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventNewCargo">SET_CARGO:OnEventNewCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnEventNewCargo event for the Set.</p>
|
||||
<p>(R2.1) Handles the OnEventNewCargo event for the Set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).RemoveCargosByName">SET_CARGO:RemoveCargosByName(RemoveCargoNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Remove CARGOs from SET_CARGO.</p>
|
||||
<p>(R2.1) Remove CARGOs from SET_CARGO.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -715,6 +727,44 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).AddInDatabase">SET_GROUP:AddInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).AllCompletelyInZone">SET_GROUP:AllCompletelyInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_GROUP and return true if all the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> are completely in the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).AnyCompletelyInZone">SET_GROUP:AnyCompletelyInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_GROUP and return true if at least one of the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> is completely inside the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).AnyInZone">SET_GROUP:AnyInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_GROUP and return true if at least one <a href="##(UNIT)">#UNIT</a> of one <a href="GROUP.html">GROUP</a> of the <a href="SET_GROUP.html">SET_GROUP</a> is in <a href="ZONE.html">ZONE</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).AnyPartlyInZone">SET_GROUP:AnyPartlyInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_GROUP and return true if at least one <a href="GROUP.html">GROUP</a> of the <a href="SET_GROUP.html">SET_GROUP</a> is partly in <a href="ZONE.html">ZONE</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).CountInZone">SET_GROUP:CountInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET<em>GROUP and count how many GROUPs are completely in the Zone
|
||||
That could easily be done with SET</em>GROUP:ForEachGroupCompletelyInZone(), but this function
|
||||
provides an easy to use shortcut...</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).CountUnitInZone">SET_GROUP:CountUnitInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_GROUP and count how many UNITs are completely in the Zone</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -799,6 +849,14 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).New">SET_GROUP:New()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP).NoneInZone">SET_GROUP:NoneInZone(ZoneObject, Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_GROUP and return true if no <a href="GROUP.html">GROUP</a> of the <a href="SET_GROUP.html">SET_GROUP</a> is in <a href="ZONE.html">ZONE</a>
|
||||
This could also be achieved with <code>not SET_GROUP:AnyPartlyInZone(Zone)</code>, but it's easier for the
|
||||
mission designer to add a dedicated method</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1085,7 +1143,7 @@ You can set the <strong>"yield interval"</strong>, and the <strong>"time interva
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
<h1>(R2.1) SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p>
|
||||
|
||||
@ -1856,6 +1914,42 @@ Count</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_BASE).FilterCrashes" >
|
||||
<strong>SET_BASE:FilterCrashes()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Starts the filtering of the Crash events for the collection.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_BASE)">#SET_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_BASE).FilterDeads" >
|
||||
<strong>SET_BASE:FilterDeads()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Starts the filtering of the Dead events for the collection.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_BASE)">#SET_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2419,7 +2513,7 @@ The Object found.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add CARGOs to SET_CARGO.</p>
|
||||
<p>(R2.1) Add CARGOs to SET_CARGO.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2446,7 +2540,7 @@ A single name or an array of CARGO names.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
<p>(R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
|
||||
|
||||
<p>This is required, because sometimes the <em>DATABASE birth event gets called later than the SET</em>BASE birth event!</p>
|
||||
@ -2485,7 +2579,7 @@ The CARGO</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of coalitions.</p>
|
||||
<p>(R2.1) Builds a set of cargos of coalitions.</p>
|
||||
|
||||
|
||||
<p>Possible current coalitions are red, blue and neutral.</p>
|
||||
@ -2515,7 +2609,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of defined countries.</p>
|
||||
<p>(R2.1) Builds a set of cargos of defined countries.</p>
|
||||
|
||||
|
||||
<p>Possible current countries are those known within DCS world.</p>
|
||||
@ -2545,7 +2639,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of defined cargo prefixes.</p>
|
||||
<p>(R2.1) Builds a set of cargos of defined cargo prefixes.</p>
|
||||
|
||||
|
||||
<p>All the cargos starting with the given prefixes will be included within the set.</p>
|
||||
@ -2575,7 +2669,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Starts the filtering.</p>
|
||||
<p>(R2.1) Starts the filtering.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
@ -2593,7 +2687,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of defined cargo types.</p>
|
||||
<p>(R2.1) Builds a set of cargos of defined cargo types.</p>
|
||||
|
||||
|
||||
<p>Possible current types are those types known within DCS world.</p>
|
||||
@ -2623,7 +2717,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds a Cargo based on the Cargo Name.</p>
|
||||
<p>(R2.1) Finds a Cargo based on the Cargo Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2649,7 +2743,7 @@ The found Cargo.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
<p>(R2.1) Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
|
||||
|
||||
<p>This is required, because sometimes the <em>DATABASE event gets called later than the SET</em>BASE event or vise versa!</p>
|
||||
@ -2688,7 +2782,7 @@ The CARGO</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
|
||||
<p>(R2.1) Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2715,7 +2809,7 @@ The closest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a>.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
|
||||
<p>(R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
@ -2747,7 +2841,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<p>(R2.1) </p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2773,7 +2867,7 @@ self</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
|
||||
<p>(R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
@ -2795,7 +2889,7 @@ DatabaseSet = SET_CARGO:New()</code></pre>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnDead or OnCrash event for alive units set.</p>
|
||||
<p>(R2.1) Handles the OnDead or OnCrash event for alive units set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2816,7 +2910,7 @@ DatabaseSet = SET_CARGO:New()</code></pre>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnEventNewCargo event for the Set.</p>
|
||||
<p>(R2.1) Handles the OnEventNewCargo event for the Set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2837,7 +2931,7 @@ DatabaseSet = SET_CARGO:New()</code></pre>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Remove CARGOs from SET_CARGO.</p>
|
||||
<p>(R2.1) Remove CARGOs from SET_CARGO.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -3412,6 +3506,261 @@ The GROUP</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).AllCompletelyInZone" >
|
||||
<strong>SET_GROUP:AllCompletelyInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_GROUP and return true if all the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> are completely in the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a></p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if all the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> are completly in the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a>, false otherwise</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
if MySetGroup:AllCompletelyInZone(MyZone) then
|
||||
MESSAGE:New("All the SET's GROUP are in zone !", 10):ToAll()
|
||||
else
|
||||
MESSAGE:New("Some or all SET's GROUP are outside zone !", 10):ToAll()
|
||||
end</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).AnyCompletelyInZone" >
|
||||
<strong>SET_GROUP:AnyCompletelyInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_GROUP and return true if at least one of the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> is completely inside the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a></p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if at least one of the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> is completly inside the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a>, false otherwise.</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
if MySetGroup:AnyCompletelyInZone(MyZone) then
|
||||
MESSAGE:New("At least one GROUP is completely in zone !", 10):ToAll()
|
||||
else
|
||||
MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
|
||||
end</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).AnyInZone" >
|
||||
<strong>SET_GROUP:AnyInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_GROUP and return true if at least one <a href="##(UNIT)">#UNIT</a> of one <a href="GROUP.html">GROUP</a> of the <a href="SET_GROUP.html">SET_GROUP</a> is in <a href="ZONE.html">ZONE</a></p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if at least one of the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> is partly or completly inside the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a>, false otherwise.</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
if MySetGroup:AnyPartlyInZone(MyZone) then
|
||||
MESSAGE:New("At least one GROUP has at least one UNIT in zone !", 10):ToAll()
|
||||
else
|
||||
MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
|
||||
end</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).AnyPartlyInZone" >
|
||||
<strong>SET_GROUP:AnyPartlyInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_GROUP and return true if at least one <a href="GROUP.html">GROUP</a> of the <a href="SET_GROUP.html">SET_GROUP</a> is partly in <a href="ZONE.html">ZONE</a>.</p>
|
||||
|
||||
|
||||
<p>Will return false if a <a href="GROUP.html">GROUP</a> is fully in the <a href="ZONE.html">ZONE</a></p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if at least one of the <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> is partly or completly inside the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a>, false otherwise.</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
if MySetGroup:AnyPartlyInZone(MyZone) then
|
||||
MESSAGE:New("At least one GROUP is partially in the zone, but none are fully in it !", 10):ToAll()
|
||||
else
|
||||
MESSAGE:New("No GROUP are in zone, or one (or more) GROUP is completely in it !", 10):ToAll()
|
||||
end</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).CountInZone" >
|
||||
<strong>SET_GROUP:CountInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET<em>GROUP and count how many GROUPs are completely in the Zone
|
||||
That could easily be done with SET</em>GROUP:ForEachGroupCompletelyInZone(), but this function
|
||||
provides an easy to use shortcut...</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
the number of GROUPs completely in the Zone</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
MESSAGE:New("There are " .. MySetGroup:CountInZone(MyZone) .. " GROUPs in the Zone !", 10):ToAll()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).CountUnitInZone" >
|
||||
<strong>SET_GROUP:CountUnitInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_GROUP and count how many UNITs are completely in the Zone</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
the number of GROUPs completely in the Zone</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
MESSAGE:New("There are " .. MySetGroup:CountUnitInZone(MyZone) .. " UNITs in the Zone !", 10):ToAll()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).FilterCategories" >
|
||||
<strong>SET_GROUP:FilterCategories(Categories)</strong>
|
||||
</a>
|
||||
@ -3836,6 +4185,51 @@ DBObject = SET_GROUP:New()</code></pre>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).NoneInZone" >
|
||||
<strong>SET_GROUP:NoneInZone(ZoneObject, Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_GROUP and return true if no <a href="GROUP.html">GROUP</a> of the <a href="SET_GROUP.html">SET_GROUP</a> is in <a href="ZONE.html">ZONE</a>
|
||||
This could also be achieved with <code>not SET_GROUP:AnyPartlyInZone(Zone)</code>, but it's easier for the
|
||||
mission designer to add a dedicated method</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if no <a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> is inside the <a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> in any way, false otherwise.</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>local MyZone = ZONE:New("Zone1")
|
||||
local MySetGroup = SET_GROUP:New()
|
||||
MySetGroup:AddGroupsByName({"Group1", "Group2"})
|
||||
|
||||
if MySetGroup:NoneInZone(MyZone) then
|
||||
MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
|
||||
else
|
||||
MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
|
||||
end</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_GROUP).RemoveGroupsByName" >
|
||||
<strong>SET_GROUP:RemoveGroupsByName(RemoveGroupNames)</strong>
|
||||
</a>
|
||||
|
||||
@ -123,48 +123,6 @@
|
||||
|
||||
<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-04-08: SPAWN:<strong>InitDelayOnOff( DelayOnOff )</strong> added. <br/>
|
||||
2017-04-08: SPAWN:<strong>InitDelayOn()</strong> added. <br/>
|
||||
2017-04-08: SPAWN:<strong>InitDelayOff()</strong> added. </p>
|
||||
|
||||
<p>2017-03-14: SPAWN:<strong>InitKeepUnitNames()</strong> added. <br/>
|
||||
2017-03-14: SPAWN:<strong>InitRandomizePosition( RandomizePosition, OuterRadious, InnerRadius )</strong> added. </p>
|
||||
|
||||
<p>2017-02-04: SPAWN:InitUnControlled( <strong>UnControlled</strong> ) replaces SPAWN:InitUnControlled(). </p>
|
||||
|
||||
<p>2017-01-24: SPAWN:<strong>InitAIOnOff( AIOnOff )</strong> added. <br/>
|
||||
2017-01-24: SPAWN:<strong>InitAIOn()</strong> added. <br/>
|
||||
2017-01-24: SPAWN:<strong>InitAIOff()</strong> added. </p>
|
||||
|
||||
<p>2016-08-15: SPAWN:<strong>InitCleanUp</strong>( SpawnCleanUpInterval ) replaces SPAWN:<em>CleanUp</em>( SpawnCleanUpInterval ). <br/>
|
||||
2016-08-15: SPAWN:<strong>InitRandomizeZones( SpawnZones )</strong> added.</p>
|
||||
|
||||
<p>2016-08-14: SPAWN:<strong>OnSpawnGroup</strong>( SpawnCallBackFunction, ... ) replaces SPAWN:<em>SpawnFunction</em>( SpawnCallBackFunction, ... ). <br/>
|
||||
2016-08-14: SPAWN.SpawnInZone( Zone, <strong>RandomizeGroup</strong>, SpawnIndex ) replaces SpawnInZone( Zone, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ). <br/>
|
||||
2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ). <br/>
|
||||
2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ). <br/>
|
||||
2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ). <br/>
|
||||
2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ). <br/>
|
||||
2016-08-14: SPAWN.<strong>InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )</strong> added. <br/>
|
||||
2016-08-14: SPAWN.<strong>Init</strong>Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN.<em>Limit</em>( SpawnMaxUnitsAlive, SpawnMaxGroups ). <br/>
|
||||
2016-08-14: SPAWN.<strong>Init</strong>Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN.<em>Array</em>( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ). <br/>
|
||||
2016-08-14: SPAWN.<strong>Init</strong>RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN.<em>RandomizeRoute</em>( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ). <br/>
|
||||
2016-08-14: SPAWN.<strong>Init</strong>RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN.<em>RandomizeTemplate</em>( SpawnTemplatePrefixTable ). <br/>
|
||||
2016-08-14: SPAWN.<strong>Init</strong>UnControlled() replaces SPAWN.<em>UnControlled</em>(). </p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
@ -2113,6 +2071,9 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2583,6 +2544,9 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2618,7 +2582,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||
</a>
|
||||
@ -2635,7 +2599,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
@ -2963,7 +2927,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).SpawnUnControlled" >
|
||||
<strong>SPAWN.SpawnUnControlled</strong>
|
||||
</a>
|
||||
@ -2987,7 +2951,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<div id="content">
|
||||
<h1>Module <code>SpawnStatic</code></h1>
|
||||
|
||||
<p><strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p>
|
||||
<p>(R2.1) <strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<div id="content">
|
||||
<h1>Module <code>Spot</code></h1>
|
||||
|
||||
<p><strong>Core (Release 2.1)</strong> -- Management of SPOT logistics, that can be transported from and to transportation carriers.</p>
|
||||
<p><strong>Core 2.1</strong> -- Management of SPOT logistics, that can be transported from and to transportation carriers.</p>
|
||||
|
||||
|
||||
|
||||
@ -103,7 +103,14 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>Spot lases points endlessly or for a duration.</p>
|
||||
<p>SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:</p>
|
||||
|
||||
<ul>
|
||||
<li>Spot for a defined duration.</li>
|
||||
<li>wiggle the spot at the target.</li>
|
||||
<li>Provide a <a href="Unit.html">Unit</a> as a target, instead of a point.</li>
|
||||
<li>Implement a status machine, LaseOn, LaseOff.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
@ -123,7 +130,22 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>This module is still under construction, but is described above works already, and will keep working ...</p>
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=112175"><strong>Ciribob</strong></a>: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.</li>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=112055"><strong>EasyEB</strong></a>: Ideas and Beta Testing</li>
|
||||
<li><a href="https://forums.eagle.ru/member.php?u=123698"><strong>Wingthor</strong></a>: Beta Testing</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Authors:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>FlightControl</strong>: Design & Programming</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
@ -131,22 +153,40 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SPOT">SPOT</a></td>
|
||||
<td class="summary">
|
||||
<h1>SPOT class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
||||
|
||||
<p>SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:</p>
|
||||
|
||||
<ul>
|
||||
<li>Spot for a defined duration.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(SPOT)">Type <code>SPOT</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).ClassName">SPOT.ClassName</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).Destroyed">SPOT:Destroyed()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Destroyed Trigger for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).IsLasing">SPOT:IsLasing()</a></td>
|
||||
<td class="summary">
|
||||
<p>Check if the SPOT is lasing</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).LaseOff">SPOT:LaseOff()</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOff Trigger for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).LaseOn">SPOT:LaseOn()</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOn Trigger for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -159,12 +199,60 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).LaserCode">SPOT.LaserCode</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).Lasing">SPOT.Lasing</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).New">SPOT:New(Recce, LaserCode, Duration)</a></td>
|
||||
<td class="summary">
|
||||
<p>SPOT Constructor.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnAfterDestroyed">SPOT:OnAfterDestroyed(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>Destroyed Handler OnAfter for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnAfterLaseOff">SPOT:OnAfterLaseOff(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOff Handler OnAfter for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnAfterLaseOn">SPOT:OnAfterLaseOn(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOn Handler OnAfter for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnBeforeDestroyed">SPOT:OnBeforeDestroyed(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>Destroyed Handler OnBefore for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnBeforeLaseOff">SPOT:OnBeforeLaseOff(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOff Handler OnBefore for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnBeforeLaseOn">SPOT:OnBeforeLaseOn(From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOn Handler OnBefore for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnEventDead">SPOT:OnEventDead(EventData)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -180,7 +268,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).Spot">SPOT.Spot</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).SpotIR">SPOT.SpotIR</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).SpotLaser">SPOT.SpotLaser</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -189,6 +283,24 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).Target">SPOT.Target</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).__Destroyed">SPOT:__Destroyed(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>Destroyed Asynchronous Trigger for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).__LaseOff">SPOT:__LaseOff(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOff Asynchronous Trigger for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).__LaseOn">SPOT:__LaseOn(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>LaseOn Asynchronous Trigger for SPOT</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -222,6 +334,51 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>SPOT class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
||||
|
||||
<p>SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:</p>
|
||||
|
||||
<ul>
|
||||
<li>Spot for a defined duration.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>wiggle the spot at the target.</li>
|
||||
<li>Provide a <a href="Unit.html">Unit</a> as a target, instead of a point.</li>
|
||||
<li>Implement a status machine, LaseOn, LaseOff.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1. SPOT constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPOT).New">SPOT.New</a>(): Creates a new SPOT object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2. SPOT is a FSM</h2>
|
||||
|
||||
<p><img src="" alt="Process"/></p>
|
||||
|
||||
<h3>2.1 SPOT States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Off</strong>: Lasing is switched off.</li>
|
||||
<li><strong>On</strong>: Lasing is switched on.</li>
|
||||
<li><strong>Destroyed</strong>: Target is destroyed.</li>
|
||||
</ul>
|
||||
|
||||
<h3>2.2 SPOT Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="##(SPOT).LaseOn">SPOT.LaseOn</a>(Target, LaserCode, Duration)**: Lase to a target.</li>
|
||||
<li>**<a href="##(SPOT).LaseOff">SPOT.LaseOff</a>()**: Stop lasing the target.</li>
|
||||
<li>**<a href="##(SPOT).Lasing">SPOT.Lasing</a>()**: Target is being lased.</li>
|
||||
<li>**<a href="##(SPOT).Destroyed">SPOT.Destroyed</a>()**: Triggered when target is destroyed.</li>
|
||||
</ul>
|
||||
|
||||
<h2>3. Check if a Target is being lased</h2>
|
||||
|
||||
<p>The method <a href="##(SPOT).IsLasing">SPOT.IsLasing</a>() indicates whether lasing is on or off.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -233,14 +390,13 @@
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(SPOT).ClassName" >
|
||||
<strong>SPOT.ClassName</strong>
|
||||
<a id="#(SPOT).Destroyed" >
|
||||
<strong>SPOT:Destroyed()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<p>Destroyed Trigger for SPOT</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -260,6 +416,32 @@
|
||||
<p><em>#boolean:</em>
|
||||
true if it is lasing</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).LaseOff" >
|
||||
<strong>SPOT:LaseOff()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOff Trigger for SPOT</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).LaseOn" >
|
||||
<strong>SPOT:LaseOn()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOn Trigger for SPOT</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -288,6 +470,20 @@ true if it is lasing</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPOT).Lasing" >
|
||||
<strong>SPOT.Lasing</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -324,6 +520,228 @@ true if it is lasing</p>
|
||||
<p><em><a href="##(SPOT)">#SPOT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnAfterDestroyed" >
|
||||
<strong>SPOT:OnAfterDestroyed(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Destroyed Handler OnAfter for SPOT</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnAfterLaseOff" >
|
||||
<strong>SPOT:OnAfterLaseOff(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOff Handler OnAfter for SPOT</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnAfterLaseOn" >
|
||||
<strong>SPOT:OnAfterLaseOn(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOn Handler OnAfter for SPOT</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnBeforeDestroyed" >
|
||||
<strong>SPOT:OnBeforeDestroyed(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Destroyed Handler OnBefore for SPOT</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnBeforeLaseOff" >
|
||||
<strong>SPOT:OnBeforeLaseOff(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOff Handler OnBefore for SPOT</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnBeforeLaseOn" >
|
||||
<strong>SPOT:OnBeforeLaseOn(From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOn Handler OnBefore for SPOT</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).OnEventDead" >
|
||||
<strong>SPOT:OnEventDead(EventData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -343,7 +761,6 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).ScheduleID" >
|
||||
<strong>SPOT.ScheduleID</strong>
|
||||
</a>
|
||||
@ -357,9 +774,21 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).Spot" >
|
||||
<strong>SPOT.Spot</strong>
|
||||
<a id="#(SPOT).SpotIR" >
|
||||
<strong>SPOT.SpotIR</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).SpotLaser" >
|
||||
<strong>SPOT.SpotLaser</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -371,7 +800,6 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).Target" >
|
||||
<strong>SPOT.Target</strong>
|
||||
</a>
|
||||
@ -380,6 +808,69 @@ true if it is lasing</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).__Destroyed" >
|
||||
<strong>SPOT:__Destroyed(Delay)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Destroyed Asynchronous Trigger for SPOT</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Delay </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).__LaseOff" >
|
||||
<strong>SPOT:__LaseOff(Delay)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOff Asynchronous Trigger for SPOT</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Delay </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPOT).__LaseOn" >
|
||||
<strong>SPOT:__LaseOn(Delay)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>LaseOn Asynchronous Trigger for SPOT</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Delay </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -453,7 +453,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
|
||||
<em></em>
|
||||
<a id="#(FSM_PROCESS).Cargo" >
|
||||
<strong>FSM_PROCESS.Cargo</strong>
|
||||
</a>
|
||||
|
||||
@ -300,6 +300,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsAlive">UNIT:IsAlive()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if the Unit is alive.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsDetected">UNIT:IsDetected(TargetUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a unit is detecting the TargetUnit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -318,6 +324,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsInZone">UNIT:IsInZone(Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns true if the unit is within a <a href="Zone.html">Zone</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsLOS">UNIT:IsLOS(TargetUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a unit has Line of Sight (LOS) with the TargetUnit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -498,13 +510,22 @@ If you want to obtain the complete <strong>3D position</strong> including ori<72>
|
||||
|
||||
<p>The UNIT class contains methods to test the location or proximity against zones or other objects.</p>
|
||||
|
||||
<h3>Zones</h3>
|
||||
<h3>Zones range</h3>
|
||||
|
||||
<p>To test whether the Unit is within a <strong>zone</strong>, use the <a href="##(UNIT).IsInZone">UNIT.IsInZone</a>() or the <a href="##(UNIT).IsNotInZone">UNIT.IsNotInZone</a>() methods. Any zone can be tested on, but the zone must be derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>. </p>
|
||||
|
||||
<h3>Units</h3>
|
||||
<h3>Unit range</h3>
|
||||
|
||||
<ul>
|
||||
<li>Test if another DCS Unit is within a given radius of the current DCS Unit, use the <a href="##(UNIT).OtherUnitInRadius">UNIT.OtherUnitInRadius</a>() method.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Test Line of Sight</h2>
|
||||
|
||||
<ul>
|
||||
<li>Use the <a href="##(UNIT).IsLOS">UNIT.IsLOS</a>() method to check if the given unit is within line of sight.</li>
|
||||
</ul>
|
||||
|
||||
<p>Test if another DCS Unit is within a given radius of the current DCS Unit, use the <a href="##(UNIT).OtherUnitInRadius">UNIT.OtherUnitInRadius</a>() method.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -1278,6 +1299,32 @@ if the Unit is not existing or is not alive. </p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).IsDetected" >
|
||||
<strong>UNIT:IsDetected(TargetUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a unit is detecting the TargetUnit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(UNIT)">#UNIT</a> TargetUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true If the TargetUnit is detected by the unit, otherwise false.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).IsFriendly" >
|
||||
<strong>UNIT:IsFriendly(FriendlyCoalition)</strong>
|
||||
</a>
|
||||
@ -1352,6 +1399,32 @@ Returns true if the unit is within the <a href="Zone.html##(ZONE_BASE)">Zone#ZON
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).IsLOS" >
|
||||
<strong>UNIT:IsLOS(TargetUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a unit has Line of Sight (LOS) with the TargetUnit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(UNIT)">#UNIT</a> TargetUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true If the TargetUnit has LOS with the unit, otherwise false.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).IsNotInZone" >
|
||||
<strong>UNIT:IsNotInZone(Zone)</strong>
|
||||
</a>
|
||||
|
||||
@ -154,7 +154,7 @@ even when there are hardly any players in the mission.</strong></p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="AI_Designate.html">AI_Designate</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>AI (Release 2.1)</strong> -- Management of target designation.</p>
|
||||
<p><strong>AI R2.1</strong> -- Management of target <strong>Designation</strong>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -202,7 +202,7 @@ even when there are hardly any players in the mission.</strong></p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Cargo.html">Cargo</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
|
||||
<p><strong>(R2.1) Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -499,13 +499,13 @@ and creates a CSV file logging the scoring events and results for use at team or
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="SpawnStatic.html">SpawnStatic</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p>
|
||||
<p>(R2.1) <strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Spot.html">Spot</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Core (Release 2.1)</strong> -- Management of SPOT logistics, that can be transported from and to transportation carriers.</p>
|
||||
<p><strong>Core 2.1</strong> -- Management of SPOT logistics, that can be transported from and to transportation carriers.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
BIN
docs/Presentations/SPOT/Dia1.JPG
Normal file
BIN
docs/Presentations/SPOT/Dia1.JPG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 KiB |
Loading…
x
Reference in New Issue
Block a user