mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Finalized AI_DESIGNATE
This commit is contained in:
parent
e946c6a863
commit
ca3ee12c41
@ -1,6 +1,6 @@
|
|||||||
--- **AI (Release 2.1)** -- Management of target designation.
|
--- **AI (Release 2.1)** -- Management of target designation.
|
||||||
--
|
--
|
||||||
-- --
|
-- --
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
@ -14,8 +14,27 @@ do -- AI_DESIGNATE
|
|||||||
|
|
||||||
--- # AI_DESIGNATE class, extends @{Fsm#FSM}
|
--- # AI_DESIGNATE class, extends @{Fsm#FSM}
|
||||||
--
|
--
|
||||||
-- AI_DESIGNATE is orchestrating the designation of potential targets, and communicate these to a dedicated attacking group
|
-- AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
||||||
-- of players, so that following a dynamically generated menu system, each detected set of potential targets can be lased or smoked...
|
-- 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...
|
||||||
|
--
|
||||||
|
-- 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:
|
||||||
|
--
|
||||||
|
-- * 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.
|
||||||
|
--
|
||||||
|
-- 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:
|
||||||
|
--
|
||||||
|
-- * 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.
|
||||||
|
--
|
||||||
|
-- In this way, the AI can assist players to designate ground targets for a coordinated attack!
|
||||||
|
--
|
||||||
|
-- Have FUN!
|
||||||
--
|
--
|
||||||
-- ## 1. AI_DESIGNATE constructor
|
-- ## 1. AI_DESIGNATE constructor
|
||||||
--
|
--
|
||||||
@ -35,7 +54,27 @@ do -- AI_DESIGNATE
|
|||||||
-- * **@{#AI_DESIGNATE.LaseOn}**: Lase the targets with the specified Index.
|
-- * **@{#AI_DESIGNATE.LaseOn}**: Lase the targets with the specified Index.
|
||||||
-- * **@{#AI_DESIGNATE.LaseOff}**: Stop lasing the targets with the specified Index.
|
-- * **@{#AI_DESIGNATE.LaseOff}**: Stop lasing the targets with the specified Index.
|
||||||
-- * **@{#AI_DESIGNATE.Smoke}**: Smoke the targets with the specified Index.
|
-- * **@{#AI_DESIGNATE.Smoke}**: Smoke the targets with the specified Index.
|
||||||
-- * **@{#AI_DESIGNATE.}Status**: Report designation status.
|
-- * **@{#AI_DESIGNATE.Status}**: Report designation status.
|
||||||
|
--
|
||||||
|
-- ## 3. Set laser codes
|
||||||
|
--
|
||||||
|
-- An array of laser codes can be provided, that will be used by the AI_DESIGNATE when lasing.
|
||||||
|
-- The laser code is communicated by the Recce when it is lasing a larget.
|
||||||
|
-- Note that the default laser code is 1113.
|
||||||
|
-- Working known laser codes are: 1113,1462,1483,1537,1362,1214,1131,1182,1644,1614,1515,1411,1621,1138,1542,1678,1573,1314,1643,1257,1467,1375,1341,1275,1237
|
||||||
|
--
|
||||||
|
-- Use the method @{#AI_DESIGNATE.SetLaserCodes}() to set the possible laser codes to be selected from.
|
||||||
|
-- One laser code can be given or an sequence of laser codes through an table...
|
||||||
|
--
|
||||||
|
-- AIDesignate:SetLaserCodes( 1214 )
|
||||||
|
--
|
||||||
|
-- The above sets one laser code with the value 1214.
|
||||||
|
--
|
||||||
|
-- AIDesignate:SetLaserCodes( { 1214, 1131, 1614, 1138 } )
|
||||||
|
--
|
||||||
|
-- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!**
|
||||||
|
--
|
||||||
|
--
|
||||||
--
|
--
|
||||||
-- @field #AI_DESIGNATE
|
-- @field #AI_DESIGNATE
|
||||||
--
|
--
|
||||||
@ -55,22 +94,169 @@ do -- AI_DESIGNATE
|
|||||||
|
|
||||||
self:SetStartState( "Designating" )
|
self:SetStartState( "Designating" )
|
||||||
self:AddTransition( "*", "Detect", "*" )
|
self:AddTransition( "*", "Detect", "*" )
|
||||||
|
|
||||||
|
--- Detect Handler OnBefore for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE] OnBeforeDetect
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
|
--- Detect Handler OnAfter for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE] OnAfterDetect
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
|
||||||
|
--- Detect Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE] Detect
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
|
||||||
|
--- Detect Asynchronous Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE] __Detect
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #number Delay
|
||||||
|
|
||||||
self:AddTransition( "*", "LaseOn", "*" )
|
self:AddTransition( "*", "LaseOn", "*" )
|
||||||
|
|
||||||
|
--- LaseOn Handler OnBefore for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnBeforeLaseOn
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
|
--- LaseOn Handler OnAfter for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnAfterLaseOn
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
|
||||||
|
--- LaseOn Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] LaseOn
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
|
||||||
|
--- LaseOn Asynchronous Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] __LaseOn
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #number Delay
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self:AddTransition( "*", "LaseOff", "*" )
|
self:AddTransition( "*", "LaseOff", "*" )
|
||||||
|
|
||||||
|
--- LaseOff Handler OnBefore for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnBeforeLaseOff
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
|
--- LaseOff Handler OnAfter for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnAfterLaseOff
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
|
||||||
|
--- LaseOff Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] LaseOff
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
|
||||||
|
--- LaseOff Asynchronous Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] __LaseOff
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #number Delay
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self:AddTransition( "*", "Smoke", "*" )
|
self:AddTransition( "*", "Smoke", "*" )
|
||||||
|
|
||||||
|
--- Smoke Handler OnBefore for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnBeforeSmoke
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
|
--- Smoke Handler OnAfter for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnAfterSmoke
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
|
||||||
|
--- Smoke Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] Smoke
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
|
||||||
|
--- Smoke Asynchronous Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] __Smoke
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #number Delay
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self:AddTransition( "*", "Status", "*" )
|
self:AddTransition( "*", "Status", "*" )
|
||||||
|
|
||||||
|
--- Status Handler OnBefore for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnBeforeStatus
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
|
--- Status Handler OnAfter for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] OnAfterStatus
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
|
||||||
|
--- Status Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] Status
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
|
||||||
|
--- Status Asynchronous Trigger for AI_DESIGNATE
|
||||||
|
-- @function [parent=#AI_DESIGNATE ] __Status
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #number Delay
|
||||||
|
|
||||||
self.Detection = Detection
|
self.Detection = Detection
|
||||||
self.GroupSet = GroupSet
|
self.GroupSet = GroupSet
|
||||||
self.RecceSet = Detection:GetDetectionSetGroup()
|
self.RecceSet = Detection:GetDetectionSetGroup()
|
||||||
self.Spots = {}
|
self.Spots = {}
|
||||||
|
|
||||||
|
self:SetLaserCodes( 1113 )
|
||||||
|
|
||||||
self.Detection:__Start( 2 )
|
self.Detection:__Start( 2 )
|
||||||
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Set an array of possible laser codes.
|
||||||
|
-- Each new lase will select a code from this table.
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @param #list<#number> LaserCodes
|
||||||
|
-- @return #AI_DESIGNATE
|
||||||
|
function AI_DESIGNATE:SetLaserCodes( LaserCodes )
|
||||||
|
|
||||||
|
self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes }
|
||||||
|
self:E(self.LaserCodes)
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
-- @return #AI_DESIGNATE
|
-- @return #AI_DESIGNATE
|
||||||
@ -78,75 +264,112 @@ do -- AI_DESIGNATE
|
|||||||
|
|
||||||
self:__Detect( -60 )
|
self:__Detect( -60 )
|
||||||
|
|
||||||
|
self:SendStatus()
|
||||||
|
self:SetDesignateMenu()
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sends the status to the Attack Groups.
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @return #AI_DESIGNATE
|
||||||
|
function AI_DESIGNATE:SendStatus()
|
||||||
|
|
||||||
|
local DetectedReport = REPORT:New( "Targets ready to be designated:" )
|
||||||
|
local DetectedItems = self.Detection:GetDetectedItems()
|
||||||
|
|
||||||
|
for Index, DetectedItemData in pairs( DetectedItems ) do
|
||||||
|
|
||||||
|
local Report = self.Detection:DetectedItemReportSummary( Index )
|
||||||
|
DetectedReport:Add(" - " .. Report)
|
||||||
|
end
|
||||||
|
|
||||||
|
local RecceLeader = self.RecceSet:GetFirst() -- Wrapper.Group#GROUP
|
||||||
|
|
||||||
self.GroupSet:ForEachGroup(
|
self.GroupSet:ForEachGroup(
|
||||||
|
|
||||||
--- @param Wrapper.Group#GROUP GroupReport
|
--- @param Wrapper.Group#GROUP GroupReport
|
||||||
function( GroupReport )
|
function( AttackGroup )
|
||||||
|
RecceLeader:MessageToGroup( DetectedReport:Text( "\n" ), 15, AttackGroup )
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
self:E(GroupReport:GetName())
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
local DesignateMenu = GroupReport:GetState( GroupReport, "DesignateMenu" ) -- Core.Menu#MENU_GROUP
|
--- Sets the Designate Menu.
|
||||||
|
-- @param #AI_DESIGNATE self
|
||||||
|
-- @return #AI_DESIGNATE
|
||||||
|
function AI_DESIGNATE:SetDesignateMenu()
|
||||||
|
|
||||||
|
self.GroupSet:ForEachGroup(
|
||||||
|
|
||||||
|
--- @param Wrapper.Group#GROUP GroupReport
|
||||||
|
function( AttackGroup )
|
||||||
|
local DesignateMenu = AttackGroup:GetState( AttackGroup, "DesignateMenu" ) -- Core.Menu#MENU_GROUP
|
||||||
if DesignateMenu then
|
if DesignateMenu then
|
||||||
DesignateMenu:Remove()
|
DesignateMenu:Remove()
|
||||||
DesignateMenu = nil
|
DesignateMenu = nil
|
||||||
self:E("Remove Menu")
|
self:E("Remove Menu")
|
||||||
end
|
end
|
||||||
DesignateMenu = MENU_GROUP:New( GroupReport, "Designate Targets" )
|
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate Targets" )
|
||||||
self:E(DesignateMenu)
|
self:E(DesignateMenu)
|
||||||
GroupReport:SetState( GroupReport, "DesignateMenu", DesignateMenu )
|
AttackGroup:SetState( AttackGroup, "DesignateMenu", DesignateMenu )
|
||||||
|
|
||||||
|
|
||||||
local DetectedItems = self.Detection:GetDetectedItems()
|
local DetectedItems = self.Detection:GetDetectedItems()
|
||||||
|
|
||||||
for Index, DetectedItemData in pairs( DetectedItems ) do
|
for Index, DetectedItemData in pairs( DetectedItems ) do
|
||||||
|
|
||||||
local DetectedReport = self.Detection:DetectedItemReportSummary( Index )
|
local Report = self.Detection:DetectedItemReportSummary( Index )
|
||||||
|
|
||||||
GroupReport:MessageToAll( DetectedReport, 15, "Detected" )
|
|
||||||
|
|
||||||
local DetectedMenu = MENU_GROUP:New(
|
local DetectedMenu = MENU_GROUP:New(
|
||||||
GroupReport,
|
AttackGroup,
|
||||||
DetectedReport,
|
Report,
|
||||||
DesignateMenu
|
DesignateMenu
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.Spots[Index] then
|
if self.Spots[Index] then
|
||||||
|
|
||||||
MENU_GROUP_COMMAND:New(
|
MENU_GROUP_COMMAND:New(
|
||||||
GroupReport,
|
AttackGroup,
|
||||||
"Switch laser Off",
|
"Switch laser Off",
|
||||||
DetectedMenu,
|
DetectedMenu,
|
||||||
self.MenuLaseOff,
|
self.MenuLaseOff,
|
||||||
self,
|
self,
|
||||||
|
AttackGroup,
|
||||||
Index
|
Index
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
MENU_GROUP_COMMAND:New(
|
MENU_GROUP_COMMAND:New(
|
||||||
GroupReport,
|
AttackGroup,
|
||||||
"Lase target 60 secs",
|
"Lase target 60 secs",
|
||||||
DetectedMenu,
|
DetectedMenu,
|
||||||
self.MenuLaseOn,
|
self.MenuLaseOn,
|
||||||
self,
|
self,
|
||||||
|
AttackGroup,
|
||||||
Index,
|
Index,
|
||||||
60
|
60
|
||||||
)
|
)
|
||||||
MENU_GROUP_COMMAND:New(
|
MENU_GROUP_COMMAND:New(
|
||||||
GroupReport,
|
AttackGroup,
|
||||||
"Lase target 120 secs",
|
"Lase target 120 secs",
|
||||||
DetectedMenu,
|
DetectedMenu,
|
||||||
self.MenuLaseOn,
|
self.MenuLaseOn,
|
||||||
self,
|
self,
|
||||||
|
AttackGroup,
|
||||||
Index,
|
Index,
|
||||||
120
|
120
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
MENU_GROUP_COMMAND:New(
|
MENU_GROUP_COMMAND:New(
|
||||||
GroupReport,
|
AttackGroup,
|
||||||
"Smoke",
|
"Smoke",
|
||||||
DetectedMenu,
|
DetectedMenu,
|
||||||
self.MenuSmoke,
|
self.MenuSmoke,
|
||||||
self,
|
self,
|
||||||
|
AttackGroup,
|
||||||
Index
|
Index
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -160,35 +383,35 @@ do -- AI_DESIGNATE
|
|||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
function AI_DESIGNATE:MenuSmoke( Index )
|
function AI_DESIGNATE:MenuSmoke( AttackGroup, Index )
|
||||||
|
|
||||||
self:E("Designate through Smoke")
|
self:E("Designate through Smoke")
|
||||||
|
|
||||||
self:__Smoke( 1, Index )
|
self:__Smoke( 1, AttackGroup, Index )
|
||||||
end
|
end
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
function AI_DESIGNATE:MenuLaseOn( Index, Duration )
|
function AI_DESIGNATE:MenuLaseOn( AttackGroup, Index, Duration )
|
||||||
|
|
||||||
self:E("Designate through Lase")
|
self:E("Designate through Lase")
|
||||||
|
|
||||||
self:__LaseOn( 1, Index, Duration )
|
self:__LaseOn( 1, AttackGroup, Index, Duration )
|
||||||
end
|
end
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
function AI_DESIGNATE:MenuLaseOff( Index, Duration )
|
function AI_DESIGNATE:MenuLaseOff( AttackGroup, Index, Duration )
|
||||||
|
|
||||||
self:E("Lasing off")
|
self:E("Lasing off")
|
||||||
|
|
||||||
self:__LaseOff( 1, Index )
|
self:__LaseOff( 1, AttackGroup, Index )
|
||||||
end
|
end
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
-- @return #AI_DESIGNATE
|
-- @return #AI_DESIGNATE
|
||||||
function AI_DESIGNATE:onafterLaseOn( From, Event, To, Index, Duration )
|
function AI_DESIGNATE:onafterLaseOn( From, Event, To, AttackGroup, Index, Duration )
|
||||||
|
|
||||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||||
|
|
||||||
@ -203,7 +426,12 @@ do -- AI_DESIGNATE
|
|||||||
for UnitID, UnitData in pairs( NearestRecceGroup:GetUnits() or {} ) do
|
for UnitID, UnitData in pairs( NearestRecceGroup:GetUnits() or {} ) do
|
||||||
local RecceUnit = UnitData -- Wrapper.Unit#UNIT
|
local RecceUnit = UnitData -- Wrapper.Unit#UNIT
|
||||||
if RecceUnit:IsLasing() == false then
|
if RecceUnit:IsLasing() == false then
|
||||||
self.Spots[Index] = RecceUnit:LaseUnit( SmokeUnit, nil, Duration )
|
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[#Spots+1] = Spot
|
||||||
|
RecceUnit:MessageToGroup( "Lasing " .. SmokeUnit:GetTypeName() .. " for " .. Duration .. " seconds. Laser Code: " .. Spot.LaserCode, 15, AttackGroup )
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -212,25 +440,37 @@ do -- AI_DESIGNATE
|
|||||||
--end
|
--end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self:SetDesignateMenu()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
-- @return #AI_DESIGNATE
|
-- @return #AI_DESIGNATE
|
||||||
function AI_DESIGNATE:onafterLaseOff( From, Event, To, Index )
|
function AI_DESIGNATE:onafterLaseOff( From, Event, To, AttackGroup, Index )
|
||||||
|
|
||||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||||
|
|
||||||
self.Spots[Index]:LaseOff()
|
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()
|
||||||
|
end
|
||||||
|
|
||||||
|
Spots = nil
|
||||||
self.Spots[Index] = nil
|
self.Spots[Index] = nil
|
||||||
|
|
||||||
|
self:SetDesignateMenu()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #AI_DESIGNATE self
|
-- @param #AI_DESIGNATE self
|
||||||
-- @return #AI_DESIGNATE
|
-- @return #AI_DESIGNATE
|
||||||
function AI_DESIGNATE:onafterSmoke( From, Event, To, Index )
|
function AI_DESIGNATE:onafterSmoke( From, Event, To, AttackGroup, Index )
|
||||||
|
|
||||||
|
|
||||||
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
|
||||||
|
|||||||
@ -568,7 +568,7 @@ do -- DETECTION_BASE
|
|||||||
|
|
||||||
local DetectedUnitCategory = DetectedObject:getDesc().category
|
local DetectedUnitCategory = DetectedObject:getDesc().category
|
||||||
|
|
||||||
self:T( { "Detected Target:", DetectionGroupName, DetectedObjectName, Distance, DetectedUnitCategory, DetectedCategory } )
|
self:T( { "Detected Target:", DetectionGroupName, DetectedObjectName, Distance, DetectedUnitCategory } )
|
||||||
|
|
||||||
-- Calculate Acceptance
|
-- Calculate Acceptance
|
||||||
|
|
||||||
|
|||||||
@ -311,7 +311,8 @@ function POSITIONABLE:GetMessage( Message, Duration, Name )
|
|||||||
local DCSObject = self:GetDCSObject()
|
local DCSObject = self:GetDCSObject()
|
||||||
if DCSObject then
|
if DCSObject then
|
||||||
Name = Name or self:GetTypeName()
|
Name = Name or self:GetTypeName()
|
||||||
return MESSAGE:New( Message, Duration, self:GetCallsign() .. " (" .. Name .. ")" )
|
local Callsign = self:GetCallsign() ~= "" and self:GetCallsign() or self:GetName()
|
||||||
|
return MESSAGE:New( Message, Duration, Callsign .. " (" .. Name .. ")" )
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -456,7 +457,7 @@ end
|
|||||||
-- @param #POSITIONABLE Target
|
-- @param #POSITIONABLE Target
|
||||||
-- @param #number LaserCode
|
-- @param #number LaserCode
|
||||||
-- @param #number Duration
|
-- @param #number Duration
|
||||||
-- @return Spot
|
-- @return Core.Spot#SPOT
|
||||||
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
||||||
self:F2()
|
self:F2()
|
||||||
|
|
||||||
@ -467,7 +468,7 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
|||||||
|
|
||||||
self:E("bulding spot")
|
self:E("bulding spot")
|
||||||
self.Spot = SPOT:New( self )
|
self.Spot = SPOT:New( self )
|
||||||
self.Spot:LaseOn( Target:GetPointVec3(), LaserCode, Duration)
|
self.Spot:LaseOn( Target, LaserCode, Duration)
|
||||||
|
|
||||||
return self.Spot
|
return self.Spot
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p>--<img src="..\Presentations\AI_DESIGNATE\CARGO.JPG" alt="Banner Image"/></p>
|
<p>--<img src="..\Presentations\DESIGNATE\Dia1.JPG" alt="Banner Image"/></p>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
@ -111,8 +111,10 @@
|
|||||||
<td class="summary">
|
<td class="summary">
|
||||||
<h1>AI_DESIGNATE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
<h1>AI_DESIGNATE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
||||||
|
|
||||||
<p>AI_DESIGNATE is orchestrating the designation of potential targets, and communicate these to a dedicated attacking group
|
<p>AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
||||||
of players, so that following a dynamically generated menu system, each detected set of potential targets can be lased or smoked...</p>
|
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>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -131,19 +133,25 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOff">AI_DESIGNATE:MenuLaseOff(Index, Duration)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).LaserCodes">AI_DESIGNATE.LaserCodes</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOn">AI_DESIGNATE:MenuLaseOn(Index, Duration)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOff">AI_DESIGNATE:MenuLaseOff(AttackGroup, Index, Duration)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuSmoke">AI_DESIGNATE:MenuSmoke(Index)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).MenuLaseOn">AI_DESIGNATE:MenuLaseOn(AttackGroup, Index, Duration)</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="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -158,6 +166,24 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).RecceSet">AI_DESIGNATE.RecceSet</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).RecceSet">AI_DESIGNATE.RecceSet</a></td>
|
||||||
<td class="summary">
|
<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).SetDesignateMenu">AI_DESIGNATE:SetDesignateMenu()</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Sets the Designate Menu.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).SetLaserCodes">AI_DESIGNATE:SetLaserCodes(<, LaserCodes)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Set an array of possible laser codes.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -173,19 +199,19 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOff">AI_DESIGNATE:onafterLaseOff(From, Event, To, Index)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOff">AI_DESIGNATE:onafterLaseOff(From, Event, To, AttackGroup, Index)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOn">AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOn">AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterSmoke">AI_DESIGNATE:onafterSmoke(From, Event, To, Index)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterSmoke">AI_DESIGNATE:onafterSmoke(From, Event, To, AttackGroup, Index)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -205,11 +231,34 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
|
|
||||||
<h1>AI_DESIGNATE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
<h1>AI_DESIGNATE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
||||||
|
|
||||||
<p>AI_DESIGNATE is orchestrating the designation of potential targets, and communicate these to a dedicated attacking group
|
<p>AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
||||||
of players, so that following a dynamically generated menu system, each detected set of potential targets can be lased or smoked...</p>
|
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>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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>In this way, the AI can assist players to designate ground targets for a coordinated attack!</p>
|
||||||
|
|
||||||
|
<p>Have FUN!</p>
|
||||||
|
|
||||||
<h2>1. AI_DESIGNATE constructor</h2>
|
<h2>1. AI_DESIGNATE constructor</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -233,9 +282,31 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
<li>**<a href="##(AI_DESIGNATE).LaseOn">AI_DESIGNATE.LaseOn</a>**: Lase the targets with the specified Index.</li>
|
<li>**<a href="##(AI_DESIGNATE).LaseOn">AI_DESIGNATE.LaseOn</a>**: Lase the targets with the specified Index.</li>
|
||||||
<li>**<a href="##(AI_DESIGNATE).LaseOff">AI_DESIGNATE.LaseOff</a>**: Stop lasing the targets with the specified Index.</li>
|
<li>**<a href="##(AI_DESIGNATE).LaseOff">AI_DESIGNATE.LaseOff</a>**: Stop lasing the targets with the specified Index.</li>
|
||||||
<li>**<a href="##(AI_DESIGNATE).Smoke">AI_DESIGNATE.Smoke</a>**: Smoke the targets with the specified Index.</li>
|
<li>**<a href="##(AI_DESIGNATE).Smoke">AI_DESIGNATE.Smoke</a>**: Smoke the targets with the specified Index.</li>
|
||||||
<li>**<a href="##(AI_DESIGNATE.)">#AI_DESIGNATE.</a>Status**: Report designation status.</li>
|
<li>**<a href="##(AI_DESIGNATE).Status">AI_DESIGNATE.Status</a>**: Report designation status.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>3. Set laser codes</h2>
|
||||||
|
|
||||||
|
<p>An array of laser codes can be provided, that will be used by the AI_DESIGNATE when lasing.
|
||||||
|
The laser code is communicated by the Recce when it is lasing a larget.
|
||||||
|
Note that the default laser code is 1113.
|
||||||
|
Working known laser codes are: 1113,1462,1483,1537,1362,1214,1131,1182,1644,1614,1515,1411,1621,1138,1542,1678,1573,1314,1643,1257,1467,1375,1341,1275,1237</p>
|
||||||
|
|
||||||
|
<p>Use the method <a href="##(AI_DESIGNATE).SetLaserCodes">AI_DESIGNATE.SetLaserCodes</a>() to set the possible laser codes to be selected from.
|
||||||
|
One laser code can be given or an sequence of laser codes through an table...</p>
|
||||||
|
|
||||||
|
<pre><code>AIDesignate:SetLaserCodes( 1214 )
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The above sets one laser code with the value 1214.</p>
|
||||||
|
|
||||||
|
<pre><code>AIDesignate:SetLaserCodes( { 1214, 1131, 1614, 1138 } )
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The above sets a collection of possible laser codes that can be assigned. <strong>Note the { } notation!</strong></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@ -269,13 +340,26 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_DESIGNATE).LaserCodes" >
|
||||||
|
<strong>AI_DESIGNATE.LaserCodes</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_DESIGNATE).MenuLaseOff" >
|
<a id="#(AI_DESIGNATE).MenuLaseOff" >
|
||||||
<strong>AI_DESIGNATE:MenuLaseOff(Index, Duration)</strong>
|
<strong>AI_DESIGNATE:MenuLaseOff(AttackGroup, Index, Duration)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -286,6 +370,11 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AttackGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<p><code><em> Index </em></code>: </p>
|
<p><code><em> Index </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -301,7 +390,7 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_DESIGNATE).MenuLaseOn" >
|
<a id="#(AI_DESIGNATE).MenuLaseOn" >
|
||||||
<strong>AI_DESIGNATE:MenuLaseOn(Index, Duration)</strong>
|
<strong>AI_DESIGNATE:MenuLaseOn(AttackGroup, Index, Duration)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -312,6 +401,11 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AttackGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<p><code><em> Index </em></code>: </p>
|
<p><code><em> Index </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -327,17 +421,22 @@ of players, so that following a dynamically generated menu system, each detected
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_DESIGNATE).MenuSmoke" >
|
<a id="#(AI_DESIGNATE).MenuSmoke" >
|
||||||
<strong>AI_DESIGNATE:MenuSmoke(Index)</strong>
|
<strong>AI_DESIGNATE:MenuSmoke(AttackGroup, Index)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameter</h3>
|
<h3>Parameters</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AttackGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<p><code><em> Index </em></code>: </p>
|
<p><code><em> Index </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -391,6 +490,77 @@ The set of groups to designate for.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_DESIGNATE).SendStatus" >
|
||||||
|
<strong>AI_DESIGNATE:SendStatus()</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Sends the status to the Attack Groups.</p>
|
||||||
|
|
||||||
|
<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).SetDesignateMenu" >
|
||||||
|
<strong>AI_DESIGNATE:SetDesignateMenu()</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Sets the Designate Menu.</p>
|
||||||
|
|
||||||
|
<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).SetLaserCodes" >
|
||||||
|
<strong>AI_DESIGNATE:SetLaserCodes(<, LaserCodes)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Set an array of possible laser codes.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p>Each new lase will select a code from this table.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="##(list)">#list</a> < </em></code>:
|
||||||
|
number> LaserCodes</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> LaserCodes </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -429,7 +599,7 @@ The set of groups to designate for.</p>
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_DESIGNATE).onafterLaseOff" >
|
<a id="#(AI_DESIGNATE).onafterLaseOff" >
|
||||||
<strong>AI_DESIGNATE:onafterLaseOff(From, Event, To, Index)</strong>
|
<strong>AI_DESIGNATE:onafterLaseOff(From, Event, To, AttackGroup, Index)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -455,6 +625,11 @@ The set of groups to designate for.</p>
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AttackGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<p><code><em> Index </em></code>: </p>
|
<p><code><em> Index </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -470,7 +645,7 @@ The set of groups to designate for.</p>
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_DESIGNATE).onafterLaseOn" >
|
<a id="#(AI_DESIGNATE).onafterLaseOn" >
|
||||||
<strong>AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration)</strong>
|
<strong>AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -496,6 +671,11 @@ The set of groups to designate for.</p>
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AttackGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<p><code><em> Index </em></code>: </p>
|
<p><code><em> Index </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -516,7 +696,7 @@ The set of groups to designate for.</p>
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_DESIGNATE).onafterSmoke" >
|
<a id="#(AI_DESIGNATE).onafterSmoke" >
|
||||||
<strong>AI_DESIGNATE:onafterSmoke(From, Event, To, Index)</strong>
|
<strong>AI_DESIGNATE:onafterSmoke(From, Event, To, AttackGroup, Index)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -542,6 +722,11 @@ The set of groups to designate for.</p>
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AttackGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<p><code><em> Index </em></code>: </p>
|
<p><code><em> Index </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -554,6 +739,8 @@ The set of groups to designate for.</p>
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -951,9 +951,6 @@ 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>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
|||||||
@ -2847,6 +2847,7 @@ The range till cargo will board.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<em></em>
|
||||||
<a id="#(CARGO_UNIT).CargoCarrier" >
|
<a id="#(CARGO_UNIT).CargoCarrier" >
|
||||||
<strong>CARGO_UNIT.CargoCarrier</strong>
|
<strong>CARGO_UNIT.CargoCarrier</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -213,7 +213,6 @@ on defined intervals (currently every minute).</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em>#number</em>
|
|
||||||
<a id="#(MOVEMENT).AliveUnits" >
|
<a id="#(MOVEMENT).AliveUnits" >
|
||||||
<strong>MOVEMENT.AliveUnits</strong>
|
<strong>MOVEMENT.AliveUnits</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -222,9 +221,6 @@ on defined intervals (currently every minute).</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p> Contains the counter how many units are currently alive</p>
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
|||||||
@ -1445,6 +1445,7 @@ The new calculated POINT_VEC2.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<em></em>
|
||||||
<a id="#(POINT_VEC2).z" >
|
<a id="#(POINT_VEC2).z" >
|
||||||
<strong>POINT_VEC2.z</strong>
|
<strong>POINT_VEC2.z</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -2113,6 +2113,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>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -2566,6 +2569,9 @@ when nothing was spawned.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p> Overwrite unit names by default with group name.</p>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -2580,6 +2586,9 @@ when nothing was spawned.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p> By default, no InitLimit</p>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -2615,7 +2624,7 @@ when nothing was spawned.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em></em>
|
<em>#number</em>
|
||||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -2632,7 +2641,7 @@ when nothing was spawned.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em></em>
|
<em>#number</em>
|
||||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -2960,7 +2969,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em>#boolean</em>
|
<em></em>
|
||||||
<a id="#(SPAWN).SpawnUnControlled" >
|
<a id="#(SPAWN).SpawnUnControlled" >
|
||||||
<strong>SPAWN.SpawnUnControlled</strong>
|
<strong>SPAWN.SpawnUnControlled</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -2984,7 +2993,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>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@ -177,6 +177,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).Spot">SPOT.Spot</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(SPOT).Spot">SPOT.Spot</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(SPOT).Target">SPOT.Target</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -186,7 +192,13 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(SPOT).onafterLaseOn">SPOT:onafterLaseOn(From, Event, To, PointVec3, LaserCode, Duration)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(SPOT).onafterLaseOn">SPOT:onafterLaseOn(From, Event, To, Target, LaserCode, Duration)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(SPOT).onafterLasing">SPOT:onafterLasing(From, Event, To)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -332,6 +344,20 @@ true if it is lasing</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<em></em>
|
||||||
|
<a id="#(SPOT).Target" >
|
||||||
|
<strong>SPOT.Target</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -374,7 +400,7 @@ true if it is lasing</p>
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(SPOT).onafterLaseOn" >
|
<a id="#(SPOT).onafterLaseOn" >
|
||||||
<strong>SPOT:onafterLaseOn(From, Event, To, PointVec3, LaserCode, Duration)</strong>
|
<strong>SPOT:onafterLaseOn(From, Event, To, Target, LaserCode, Duration)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -400,7 +426,7 @@ true if it is lasing</p>
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<p><code><em><a href="Core.Point.html##(POINT_VEC3)">Core.Point#POINT_VEC3</a> PointVec3 </em></code>: </p>
|
<p><code><em><a href="Wrapper.Positionable.html##(POSITIONABLE)">Wrapper.Positionable#POSITIONABLE</a> Target </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@ -414,11 +440,37 @@ true if it is lasing</p>
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Return value</h3>
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<p><em><a href="##(SPOT)">#SPOT</a>:</em></p>
|
<a id="#(SPOT).onafterLasing" >
|
||||||
|
<strong>SPOT:onafterLasing(From, Event, To)</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>
|
||||||
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|||||||
@ -453,7 +453,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em></em>
|
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
|
||||||
<a id="#(FSM_PROCESS).Cargo" >
|
<a id="#(FSM_PROCESS).Cargo" >
|
||||||
<strong>FSM_PROCESS.Cargo</strong>
|
<strong>FSM_PROCESS.Cargo</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
BIN
docs/Presentations/DESIGNATE/Dia1.JPG
Normal file
BIN
docs/Presentations/DESIGNATE/Dia1.JPG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 KiB |
Loading…
x
Reference in New Issue
Block a user