mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
New Refuelling process
This commit is contained in:
parent
2611ba0fe8
commit
dbe1d7aaa3
@ -220,6 +220,33 @@ function AI_A2A:New( AIGroup )
|
|||||||
-- @param #string Event The Event string.
|
-- @param #string Event The Event string.
|
||||||
-- @param #string To The To State string.
|
-- @param #string To The To State string.
|
||||||
|
|
||||||
|
self:AddTransition( "Patrolling", "Refuel", "Refuelling" )
|
||||||
|
|
||||||
|
--- Refuel Handler OnBefore for AI_A2A
|
||||||
|
-- @function [parent=#AI_A2A] OnBeforeRefuel
|
||||||
|
-- @param #AI_A2A self
|
||||||
|
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
|
--- Refuel Handler OnAfter for AI_A2A
|
||||||
|
-- @function [parent=#AI_A2A] OnAfterRefuel
|
||||||
|
-- @param #AI_A2A self
|
||||||
|
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string To
|
||||||
|
|
||||||
|
--- Refuel Trigger for AI_A2A
|
||||||
|
-- @function [parent=#AI_A2A] Refuel
|
||||||
|
-- @param #AI_A2A self
|
||||||
|
|
||||||
|
--- Refuel Asynchronous Trigger for AI_A2A
|
||||||
|
-- @function [parent=#AI_A2A] __Refuel
|
||||||
|
-- @param #AI_A2A self
|
||||||
|
-- @param #number Delay
|
||||||
|
|
||||||
self:AddTransition( "*", "Return", "Returning" )
|
self:AddTransition( "*", "Return", "Returning" )
|
||||||
self:AddTransition( "*", "Hold", "Holding" )
|
self:AddTransition( "*", "Hold", "Holding" )
|
||||||
@ -296,6 +323,16 @@ function AI_A2A:SetHomeAirbase( HomeAirbase )
|
|||||||
self.HomeAirbase = HomeAirbase
|
self.HomeAirbase = HomeAirbase
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Sets to refuel at the given tanker.
|
||||||
|
-- @param #AI_A2A self
|
||||||
|
-- @param Wrapper.Group#GROUP TankerName The group name of the tanker as defined within the Mission Editor or spawned.
|
||||||
|
-- @return #AI_A2A self
|
||||||
|
function AI_A2A:SetTanker( TankerName )
|
||||||
|
self:F2( { TankerName } )
|
||||||
|
|
||||||
|
self.TankerName = TankerName
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Sets the disengage range, that when engaging a target beyond the specified range, the engagement will be cancelled and the plane will RTB.
|
--- Sets the disengage range, that when engaging a target beyond the specified range, the engagement will be cancelled and the plane will RTB.
|
||||||
-- @param #AI_A2A self
|
-- @param #AI_A2A self
|
||||||
@ -415,16 +452,21 @@ function AI_A2A:onafterStatus()
|
|||||||
local Fuel = self.Controllable:GetUnit(1):GetFuel()
|
local Fuel = self.Controllable:GetUnit(1):GetFuel()
|
||||||
self:F({Fuel=Fuel})
|
self:F({Fuel=Fuel})
|
||||||
if Fuel < self.PatrolFuelThresholdPercentage then
|
if Fuel < self.PatrolFuelThresholdPercentage then
|
||||||
self:E( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... RTB!" )
|
if self.TankerName then
|
||||||
local OldAIControllable = self.Controllable
|
self:E( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... Refuelling at Tanker!" )
|
||||||
local AIControllableTemplate = self.Controllable:GetTemplate()
|
self:Refuel()
|
||||||
|
else
|
||||||
local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed )
|
self:E( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... RTB!" )
|
||||||
local TimedOrbitTask = OldAIControllable:TaskControlled( OrbitTask, OldAIControllable:TaskCondition(nil,nil,nil,nil,self.PatrolOutOfFuelOrbitTime,nil ) )
|
local OldAIControllable = self.Controllable
|
||||||
OldAIControllable:SetTask( TimedOrbitTask, 10 )
|
local AIControllableTemplate = self.Controllable:GetTemplate()
|
||||||
|
|
||||||
self:Fuel()
|
local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed )
|
||||||
RTB = true
|
local TimedOrbitTask = OldAIControllable:TaskControlled( OrbitTask, OldAIControllable:TaskCondition(nil,nil,nil,nil,self.PatrolOutOfFuelOrbitTime,nil ) )
|
||||||
|
OldAIControllable:SetTask( TimedOrbitTask, 10 )
|
||||||
|
|
||||||
|
self:Fuel()
|
||||||
|
RTB = true
|
||||||
|
end
|
||||||
else
|
else
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -573,6 +615,8 @@ function AI_A2A:onafterHome( AIGroup, From, Event, To )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- @param #AI_A2A self
|
--- @param #AI_A2A self
|
||||||
-- @param Wrapper.Group#GROUP AIGroup
|
-- @param Wrapper.Group#GROUP AIGroup
|
||||||
function AI_A2A:onafterHold( AIGroup, From, Event, To, HoldTime )
|
function AI_A2A:onafterHold( AIGroup, From, Event, To, HoldTime )
|
||||||
@ -595,7 +639,69 @@ function AI_A2A:onafterHold( AIGroup, From, Event, To, HoldTime )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @param Wrapper.Group#GROUP AIGroup
|
||||||
|
function AI_A2A.Resume( AIGroup )
|
||||||
|
|
||||||
|
AIGroup:E( { "AI_A2A.Resume:", AIGroup:GetName() } )
|
||||||
|
if AIGroup:IsAlive() then
|
||||||
|
local _AI_A2A = AIGroup:GetState( AIGroup, "AI_A2A" ) -- #AI_A2A
|
||||||
|
_AI_A2A:__RTB( 0.5 )
|
||||||
|
--_AI_A2A:Retur()
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param #AI_A2A self
|
||||||
|
-- @param Wrapper.Group#GROUP AIGroup
|
||||||
|
function AI_A2A:onafterRefuel( AIGroup, From, Event, To )
|
||||||
|
self:F( { AIGroup, From, Event, To } )
|
||||||
|
|
||||||
|
self:E( "Group " .. self.Controllable:GetName() .. " ... Refuelling! ( " .. self:GetState() .. " )" )
|
||||||
|
|
||||||
|
if AIGroup and AIGroup:IsAlive() then
|
||||||
|
local Tanker = GROUP:FindByName( self.TankerName )
|
||||||
|
if Tanker:IsAlive() and Tanker:IsAirPlane() then
|
||||||
|
|
||||||
|
local RefuelRoute = {}
|
||||||
|
|
||||||
|
--- Calculate the target route point.
|
||||||
|
|
||||||
|
local CurrentCoord = AIGroup:GetCoordinate()
|
||||||
|
local ToRefuelCoord = Tanker:GetCoordinate()
|
||||||
|
local ToRefuelSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
|
||||||
|
|
||||||
|
--- Create a route point of type air.
|
||||||
|
local ToRefuelRoutePoint = ToRefuelCoord:RoutePointAir(
|
||||||
|
self.PatrolAltType,
|
||||||
|
POINT_VEC3.RoutePointType.TurningPoint,
|
||||||
|
POINT_VEC3.RoutePointAction.TurningPoint,
|
||||||
|
ToRefuelSpeed,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
|
||||||
|
self:F( { ToRefuelSpeed = ToRefuelSpeed } )
|
||||||
|
|
||||||
|
RefuelRoute[#RefuelRoute+1] = ToRefuelRoutePoint
|
||||||
|
RefuelRoute[#RefuelRoute+1] = ToRefuelRoutePoint
|
||||||
|
|
||||||
|
AIGroup:OptionROEHoldFire()
|
||||||
|
AIGroup:OptionROTEvadeFire()
|
||||||
|
|
||||||
|
local Tasks = {}
|
||||||
|
Tasks[#Tasks+1] = AIGroup:TaskRefueling()
|
||||||
|
Tasks[#Tasks+1] = AIGroup:TaskFunction( 1, 1, self:GetClassName() .. ".Resume" )
|
||||||
|
RefuelRoute[#RefuelRoute].task = AIGroup:TaskCombo( Tasks )
|
||||||
|
AIGroup:SetState( AIGroup, "AI_A2A", self )
|
||||||
|
|
||||||
|
--- NOW ROUTE THE GROUP!
|
||||||
|
AIGroup:SetTask( AIGroup:TaskRoute( RefuelRoute ), 1 )
|
||||||
|
|
||||||
|
else
|
||||||
|
self:RTB()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -493,3 +493,15 @@ function AI_A2A_CAP:OnEventDead( EventData )
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @param Wrapper.Group#GROUP AIGroup
|
||||||
|
function AI_A2A_CAP.Resume( AIGroup )
|
||||||
|
|
||||||
|
AIGroup:E( { "AI_A2A_CAP.Resume:", AIGroup:GetName() } )
|
||||||
|
if AIGroup:IsAlive() then
|
||||||
|
local _AI_A2A = AIGroup:GetState( AIGroup, "AI_A2A" ) -- #AI_A2A
|
||||||
|
_AI_A2A:__Reset( 1 )
|
||||||
|
_AI_A2A:__Route( 5 )
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|||||||
@ -464,7 +464,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
--
|
--
|
||||||
-- The **grouping value is set for a Squadron**, and can be **dynamically adjusted** during mission execution, so to adjust the defense flights grouping when the tactical situation changes.
|
-- The **grouping value is set for a Squadron**, and can be **dynamically adjusted** during mission execution, so to adjust the defense flights grouping when the tactical situation changes.
|
||||||
--
|
--
|
||||||
-- ### 6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI
|
-- ### 6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI.
|
||||||
--
|
--
|
||||||
-- The effectiveness can be set with the **overhead parameter**. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
|
-- The effectiveness can be set with the **overhead parameter**. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
|
||||||
-- The **default value** of the overhead parameter is 1.0, which means **equal balance**.
|
-- The **default value** of the overhead parameter is 1.0, which means **equal balance**.
|
||||||
@ -490,6 +490,14 @@ do -- AI_A2A_DISPATCHER
|
|||||||
--
|
--
|
||||||
-- The **overhead value is set for a Squadron**, and can be **dynamically adjusted** during mission execution, so to adjust the defense overhead when the tactical situation changes.
|
-- The **overhead value is set for a Squadron**, and can be **dynamically adjusted** during mission execution, so to adjust the defense overhead when the tactical situation changes.
|
||||||
--
|
--
|
||||||
|
-- ## 6.5. Squadron fuel treshold.
|
||||||
|
--
|
||||||
|
-- When an airplane gets **out of fuel** to a certain %-tage, which is by default **15% (0.15)**, there are two possible actions that can be taken:
|
||||||
|
-- - The defender will go RTB, and will be replaced with a new defender if possible.
|
||||||
|
-- - The defender will refuel at a tanker, if a tanker has been specified for the squadron.
|
||||||
|
--
|
||||||
|
-- Use the method @{#AI_A2A_DISPATCHER.SetSquadronFuelThreshold}() to set the **squadron fuel treshold** of spawned airplanes for all squadrons.
|
||||||
|
--
|
||||||
-- ## 7. Setup a squadron for CAP
|
-- ## 7. Setup a squadron for CAP
|
||||||
--
|
--
|
||||||
-- ### 7.1. Set the CAP zones
|
-- ### 7.1. Set the CAP zones
|
||||||
@ -564,6 +572,31 @@ do -- AI_A2A_DISPATCHER
|
|||||||
-- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
-- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||||
--
|
--
|
||||||
|
-- ## 7.3. Squadron tanker to refuel when executing CAP and defender is out of fuel.
|
||||||
|
--
|
||||||
|
-- Instead of sending CAP to RTB when out of fuel, you can let CAP refuel in mid air using a tanker.
|
||||||
|
-- This greatly increases the efficiency of your CAP operations.
|
||||||
|
--
|
||||||
|
-- In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected.
|
||||||
|
-- Then, use the method @{#AI_A2A_DISPATCHER.SetDefaultTanker}() to set the default tanker for the refuelling.
|
||||||
|
-- You can also specify a specific tanker for refuelling for a squadron by using the method @{#AI_A2A_DISPATCHER.SetSquadronTanker}().
|
||||||
|
--
|
||||||
|
-- When the tanker specified is alive and in the air, the tanker will be used for refuelling.
|
||||||
|
--
|
||||||
|
-- For example, the following setup will create a CAP for squadron "Gelend" with a refuel task for the squadron:
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- -- Define the CAP
|
||||||
|
-- A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 )
|
||||||
|
-- A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 )
|
||||||
|
-- A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 )
|
||||||
|
-- A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 )
|
||||||
|
--
|
||||||
|
-- -- Setup the Refuelling for squadron "Gelend", at tanker (group) "TankerGelend" when the fuel in the tank of the CAP defenders is less than 80%.
|
||||||
|
-- A2ADispatcher:SetSquadronFuelThreshold( "Gelend", 0.8 )
|
||||||
|
-- A2ADispatcher:SetSquadronTanker( "Gelend", "TankerGelend" )
|
||||||
|
--
|
||||||
-- ## 8. Setup a squadron for GCI:
|
-- ## 8. Setup a squadron for GCI:
|
||||||
--
|
--
|
||||||
-- The method @{#AI_A2A_DISPATCHER.SetSquadronGci}() defines a GCI execution for a squadron.
|
-- The method @{#AI_A2A_DISPATCHER.SetSquadronGci}() defines a GCI execution for a squadron.
|
||||||
@ -665,6 +698,31 @@ do -- AI_A2A_DISPATCHER
|
|||||||
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultCapTimeInterval}() to set the **default CAP time interval** of spawned airplanes for all squadrons.
|
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultCapTimeInterval}() to set the **default CAP time interval** of spawned airplanes for all squadrons.
|
||||||
-- Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the @{#AI_A2A_DISPATCHER.SetSquadronCapTimeInterval}() method.
|
-- Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the @{#AI_A2A_DISPATCHER.SetSquadronCapTimeInterval}() method.
|
||||||
--
|
--
|
||||||
|
-- ## 10.7.3. Default tanker for refuelling when executing CAP.
|
||||||
|
--
|
||||||
|
-- Instead of sending CAP to RTB when out of fuel, you can let CAP refuel in mid air using a tanker.
|
||||||
|
-- This greatly increases the efficiency of your CAP operations.
|
||||||
|
--
|
||||||
|
-- In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected.
|
||||||
|
-- Then, use the method @{#AI_A2A_DISPATCHER.SetDefaultTanker}() to set the tanker for the dispatcher.
|
||||||
|
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultFuelTreshold}() to set the %-tage left in the defender airplane tanks when a refuel action is needed.
|
||||||
|
--
|
||||||
|
-- When the tanker specified is alive and in the air, the tanker will be used for refuelling.
|
||||||
|
--
|
||||||
|
-- For example, the following setup will set the default refuel tanker to "Tanker":
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- -- Define the CAP
|
||||||
|
-- A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 )
|
||||||
|
-- A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 )
|
||||||
|
-- A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 )
|
||||||
|
-- A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 )
|
||||||
|
--
|
||||||
|
-- -- Set the default tanker for refuelling to "Tanker", when the default fuel treshold has reached 90% fuel left.
|
||||||
|
-- A2ADispatcher:SetDefaultFuelThreshold( 0.9 )
|
||||||
|
-- A2ADispatcher:SetDefaultTanker( "Tanker" )
|
||||||
|
--
|
||||||
-- ## 10.8. Default settings for GCI.
|
-- ## 10.8. Default settings for GCI.
|
||||||
--
|
--
|
||||||
-- ## 10.8.1. Optimal intercept point calculation.
|
-- ## 10.8.1. Optimal intercept point calculation.
|
||||||
@ -689,10 +747,11 @@ do -- AI_A2A_DISPATCHER
|
|||||||
-- ## 10.8.2. Default disengage radius.
|
-- ## 10.8.2. Default disengage radius.
|
||||||
--
|
--
|
||||||
-- The radius to **disengage any target** when the **distance** of the defender to the **home base** is larger than the specified meters.
|
-- The radius to **disengage any target** when the **distance** of the defender to the **home base** is larger than the specified meters.
|
||||||
-- The default disengage radius is **100km** (100000 meters). Note that the disengage radius is applicable to ALL squadrons!
|
-- The default disengage radius is **300km** (300000 meters). Note that the disengage radius is applicable to ALL squadrons!
|
||||||
--
|
--
|
||||||
-- Use the method @{#AI_A2A_DISPATCHER.SetDisengageRadius}() to modify the default disengage radius to another distance setting.
|
-- Use the method @{#AI_A2A_DISPATCHER.SetDisengageRadius}() to modify the default disengage radius to another distance setting.
|
||||||
--
|
--
|
||||||
|
--
|
||||||
-- ## 11. Q & A:
|
-- ## 11. Q & A:
|
||||||
--
|
--
|
||||||
-- ### 11.1. Which countries will be selected for each coalition?
|
-- ### 11.1. Which countries will be selected for each coalition?
|
||||||
@ -777,7 +836,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
self:SetEngageRadius()
|
self:SetEngageRadius()
|
||||||
self:SetGciRadius()
|
self:SetGciRadius()
|
||||||
self:SetIntercept( 300 ) -- A default intercept delay time of 300 seconds.
|
self:SetIntercept( 300 ) -- A default intercept delay time of 300 seconds.
|
||||||
self:SetDisengageRadius( 100000 ) -- The default disengage radius is 100 km.
|
self:SetDisengageRadius( 300000 ) -- The default disengage radius is 300 km.
|
||||||
|
|
||||||
self:SetDefaultTakeoff( AI_A2A_DISPATCHER.Takeoff.Air )
|
self:SetDefaultTakeoff( AI_A2A_DISPATCHER.Takeoff.Air )
|
||||||
self:SetDefaultLanding( AI_A2A_DISPATCHER.Landing.NearAirbase )
|
self:SetDefaultLanding( AI_A2A_DISPATCHER.Landing.NearAirbase )
|
||||||
@ -978,7 +1037,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
|
|
||||||
--- Define the radius to disengage any target when the distance to the home base is larger than the specified meters.
|
--- Define the radius to disengage any target when the distance to the home base is larger than the specified meters.
|
||||||
-- @param #AI_A2A_DISPATCHER self
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
-- @param #number DisengageRadius (Optional, Default = 100000) The radius to disengage a target when too far from the home base.
|
-- @param #number DisengageRadius (Optional, Default = 300000) The radius to disengage a target when too far from the home base.
|
||||||
-- @return #AI_A2A_DISPATCHER
|
-- @return #AI_A2A_DISPATCHER
|
||||||
-- @usage
|
-- @usage
|
||||||
--
|
--
|
||||||
@ -986,11 +1045,11 @@ do -- AI_A2A_DISPATCHER
|
|||||||
-- Dispatcher:SetDisengageRadius( 50000 )
|
-- Dispatcher:SetDisengageRadius( 50000 )
|
||||||
--
|
--
|
||||||
-- -- Set 100km as the disengage radius.
|
-- -- Set 100km as the disengage radius.
|
||||||
-- Dispatcher:SetDisngageRadius() -- 100000 is the default value.
|
-- Dispatcher:SetDisngageRadius() -- 300000 is the default value.
|
||||||
--
|
--
|
||||||
function AI_A2A_DISPATCHER:SetDisengageRadius( DisengageRadius )
|
function AI_A2A_DISPATCHER:SetDisengageRadius( DisengageRadius )
|
||||||
|
|
||||||
self.DisengageRadius = DisengageRadius
|
self.DisengageRadius = DisengageRadius or 300000
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1086,27 +1145,6 @@ do -- AI_A2A_DISPATCHER
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set the default fuel treshold when defenders will RTB or Refuel in the air.
|
|
||||||
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.
|
|
||||||
-- @param #AI_A2A_DISPATCHER self
|
|
||||||
-- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
|
|
||||||
-- @return #AI_A2A_DISPATCHER
|
|
||||||
-- @usage
|
|
||||||
--
|
|
||||||
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
|
||||||
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
|
||||||
--
|
|
||||||
-- -- Now Setup the default fuel treshold.
|
|
||||||
-- A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
|
||||||
--
|
|
||||||
function AI_A2A_DISPATCHER:SetDefaultFuelThreshold( FuelThreshold )
|
|
||||||
|
|
||||||
self.DefenderDefault.FuelThreshold = FuelThreshold
|
|
||||||
|
|
||||||
return self
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Set the default damage treshold when defenders will RTB.
|
--- Set the default damage treshold when defenders will RTB.
|
||||||
-- The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB.
|
-- The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB.
|
||||||
-- @param #AI_A2A_DISPATCHER self
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
@ -2171,6 +2209,96 @@ do -- AI_A2A_DISPATCHER
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set the default fuel treshold when defenders will RTB or Refuel in the air.
|
||||||
|
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.
|
||||||
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
|
-- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
|
||||||
|
-- @return #AI_A2A_DISPATCHER
|
||||||
|
-- @usage
|
||||||
|
--
|
||||||
|
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
--
|
||||||
|
-- -- Now Setup the default fuel treshold.
|
||||||
|
-- A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
--
|
||||||
|
function AI_A2A_DISPATCHER:SetDefaultFuelThreshold( FuelThreshold )
|
||||||
|
|
||||||
|
self.DefenderDefault.FuelThreshold = FuelThreshold
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air.
|
||||||
|
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.
|
||||||
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
|
-- @param #string SquadronName The name of the squadron.
|
||||||
|
-- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
|
||||||
|
-- @return #AI_A2A_DISPATCHER
|
||||||
|
-- @usage
|
||||||
|
--
|
||||||
|
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
--
|
||||||
|
-- -- Now Setup the default fuel treshold.
|
||||||
|
-- A2ADispatcher:SetSquadronRefuelThreshold( "SquadronName", 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
--
|
||||||
|
function AI_A2A_DISPATCHER:SetSquadronFuelThreshold( SquadronName, FuelThreshold )
|
||||||
|
|
||||||
|
local DefenderSquadron = self:GetSquadron( SquadronName )
|
||||||
|
DefenderSquadron.FuelThreshold = FuelThreshold
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the default tanker where defenders will Refuel in the air.
|
||||||
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
|
-- @param #strig TankerName A string defining the group name of the Tanker as defined within the Mission Editor.
|
||||||
|
-- @return #AI_A2A_DISPATCHER
|
||||||
|
-- @usage
|
||||||
|
--
|
||||||
|
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
--
|
||||||
|
-- -- Now Setup the default fuel treshold.
|
||||||
|
-- A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
--
|
||||||
|
-- -- Now Setup the default tanker.
|
||||||
|
-- A2ADispatcher:SetDefaultTanker( "Tanker" ) -- The group name of the tanker is "Tanker" in the Mission Editor.
|
||||||
|
function AI_A2A_DISPATCHER:SetDefaultTanker( TankerName )
|
||||||
|
|
||||||
|
self.DefenderDefault.TankerName = TankerName
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Set the squadron tanker where defenders will Refuel in the air.
|
||||||
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
|
-- @param #string SquadronName The name of the squadron.
|
||||||
|
-- @param #strig TankerName A string defining the group name of the Tanker as defined within the Mission Editor.
|
||||||
|
-- @return #AI_A2A_DISPATCHER
|
||||||
|
-- @usage
|
||||||
|
--
|
||||||
|
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
--
|
||||||
|
-- -- Now Setup the squadron fuel treshold.
|
||||||
|
-- A2ADispatcher:SetSquadronRefuelThreshold( "SquadronName", 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
--
|
||||||
|
-- -- Now Setup the squadron tanker.
|
||||||
|
-- A2ADispatcher:SetSquadronTanker( "SquadronName", "Tanker" ) -- The group name of the tanker is "Tanker" in the Mission Editor.
|
||||||
|
function AI_A2A_DISPATCHER:SetSquadronTanker( SquadronName, TankerName )
|
||||||
|
|
||||||
|
local DefenderSquadron = self:GetSquadron( SquadronName )
|
||||||
|
DefenderSquadron.TankerName = TankerName
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- @param #AI_A2A_DISPATCHER self
|
--- @param #AI_A2A_DISPATCHER self
|
||||||
function AI_A2A_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size )
|
function AI_A2A_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size )
|
||||||
@ -2236,7 +2364,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
if AIGroup:IsAlive() then
|
if AIGroup:IsAlive() then
|
||||||
-- Check if the CAP is patrolling or engaging. If not, this is not a valid CAP, even if it is alive!
|
-- Check if the CAP is patrolling or engaging. If not, this is not a valid CAP, even if it is alive!
|
||||||
-- The CAP could be damaged, lost control, or out of fuel!
|
-- The CAP could be damaged, lost control, or out of fuel!
|
||||||
if DefenderTask.Fsm:Is( "Patrolling" ) or DefenderTask.Fsm:Is( "Engaging" ) then
|
if DefenderTask.Fsm:Is( "Patrolling" ) or DefenderTask.Fsm:Is( "Engaging" ) or DefenderTask.Fsm:Is( "Refuelling" )then
|
||||||
CapCount = CapCount + 1
|
CapCount = CapCount + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2341,9 +2469,10 @@ do -- AI_A2A_DISPATCHER
|
|||||||
local Fsm = AI_A2A_CAP:New( DefenderCAP, Cap.Zone, Cap.FloorAltitude, Cap.CeilingAltitude, Cap.PatrolMinSpeed, Cap.PatrolMaxSpeed, Cap.EngageMinSpeed, Cap.EngageMaxSpeed, Cap.AltType )
|
local Fsm = AI_A2A_CAP:New( DefenderCAP, Cap.Zone, Cap.FloorAltitude, Cap.CeilingAltitude, Cap.PatrolMinSpeed, Cap.PatrolMaxSpeed, Cap.EngageMinSpeed, Cap.EngageMaxSpeed, Cap.AltType )
|
||||||
Fsm:SetDispatcher( self )
|
Fsm:SetDispatcher( self )
|
||||||
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
|
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
|
||||||
Fsm:SetFuelThreshold( self.DefenderDefault.FuelThreshold, 60 )
|
Fsm:SetFuelThreshold( DefenderSquadron.FuelThreshold or self.DefenderDefault.FuelThreshold, 60 )
|
||||||
Fsm:SetDamageThreshold( self.DefenderDefault.DamageThreshold )
|
Fsm:SetDamageThreshold( self.DefenderDefault.DamageThreshold )
|
||||||
Fsm:SetDisengageRadius( self.DisengageRadius )
|
Fsm:SetDisengageRadius( self.DisengageRadius )
|
||||||
|
Fsm:SetTanker( DefenderSquadron.TankerName or self.DefenderDefault.TankerName )
|
||||||
Fsm:Start()
|
Fsm:Start()
|
||||||
Fsm:__Patrol( 2 )
|
Fsm:__Patrol( 2 )
|
||||||
|
|
||||||
@ -2493,7 +2622,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
local Fsm = AI_A2A_GCI:New( DefenderGCI, Gci.EngageMinSpeed, Gci.EngageMaxSpeed )
|
local Fsm = AI_A2A_GCI:New( DefenderGCI, Gci.EngageMinSpeed, Gci.EngageMaxSpeed )
|
||||||
Fsm:SetDispatcher( self )
|
Fsm:SetDispatcher( self )
|
||||||
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
|
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
|
||||||
Fsm:SetFuelThreshold( self.DefenderDefault.FuelThreshold, 60 )
|
Fsm:SetFuelThreshold( DefenderSquadron.FuelThreshold or self.DefenderDefault.FuelThreshold, 60 )
|
||||||
Fsm:SetDamageThreshold( self.DefenderDefault.DamageThreshold )
|
Fsm:SetDamageThreshold( self.DefenderDefault.DamageThreshold )
|
||||||
Fsm:SetDisengageRadius( self.DisengageRadius )
|
Fsm:SetDisengageRadius( self.DisengageRadius )
|
||||||
Fsm:Start()
|
Fsm:Start()
|
||||||
|
|||||||
@ -179,7 +179,7 @@ function AI_A2A_PATROL:New( AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeil
|
|||||||
-- defafult PatrolAltType to "RADIO" if not specified
|
-- defafult PatrolAltType to "RADIO" if not specified
|
||||||
self.PatrolAltType = PatrolAltType or "RADIO"
|
self.PatrolAltType = PatrolAltType or "RADIO"
|
||||||
|
|
||||||
self:AddTransition( "Started", "Patrol", "Patrolling" )
|
self:AddTransition( { "Started", "Refuelling" }, "Patrol", "Patrolling" )
|
||||||
|
|
||||||
--- OnBefore Transition Handler for Event Patrol.
|
--- OnBefore Transition Handler for Event Patrol.
|
||||||
-- @function [parent=#AI_A2A_PATROL] OnBeforePatrol
|
-- @function [parent=#AI_A2A_PATROL] OnBeforePatrol
|
||||||
@ -252,6 +252,8 @@ function AI_A2A_PATROL:New( AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeil
|
|||||||
-- @param #AI_A2A_PATROL self
|
-- @param #AI_A2A_PATROL self
|
||||||
-- @param #number Delay The delay in seconds.
|
-- @param #number Delay The delay in seconds.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_A2A_PATROL.
|
self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_A2A_PATROL.
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -386,3 +388,14 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @param Wrapper.Group#GROUP AIGroup
|
||||||
|
function AI_A2A_PATROL.Resume( AIGroup )
|
||||||
|
|
||||||
|
AIGroup:E( { "AI_A2A_PATROL.Resume:", AIGroup:GetName() } )
|
||||||
|
if AIGroup:IsAlive() then
|
||||||
|
local _AI_A2A = AIGroup:GetState( AIGroup, "AI_A2A" ) -- #AI_A2A
|
||||||
|
_AI_A2A:__Reset( 1 )
|
||||||
|
_AI_A2A:__Route( 5 )
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|||||||
@ -182,6 +182,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).OnAfterRTB">AI_A2A:OnAfterRTB(Controllable, From, Event, To)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).OnAfterRTB">AI_A2A:OnAfterRTB(Controllable, From, Event, To)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>OnAfter Transition Handler for Event RTB.</p>
|
<p>OnAfter Transition Handler for Event RTB.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).OnAfterRefuel">AI_A2A:OnAfterRefuel(Controllable, From, Event, To)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Refuel Handler OnAfter for AI_A2A</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -206,6 +212,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).OnBeforeRTB">AI_A2A:OnBeforeRTB(Controllable, From, Event, To)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).OnBeforeRTB">AI_A2A:OnBeforeRTB(Controllable, From, Event, To)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>OnBefore Transition Handler for Event RTB.</p>
|
<p>OnBefore Transition Handler for Event RTB.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).OnBeforeRefuel">AI_A2A:OnBeforeRefuel(Controllable, From, Event, To)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Refuel Handler OnBefore for AI_A2A</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -326,12 +338,30 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTB">AI_A2A:RTB()</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTB">AI_A2A:RTB()</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Synchronous Event Trigger for Event RTB.</p>
|
<p>Synchronous Event Trigger for Event RTB.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBHold">AI_A2A.RTBHold(AIGroup)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBRoute">AI_A2A.RTBRoute(AIGroup)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).RTBRoute">AI_A2A.RTBRoute(AIGroup)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).Refuel">AI_A2A:Refuel()</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Refuel Trigger for AI_A2A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).Resume">AI_A2A.Resume(AIGroup)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -380,6 +410,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetStatusOff">AI_A2A:SetStatusOff()</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetStatusOff">AI_A2A:SetStatusOff()</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Set the status checking off.</p>
|
<p>Set the status checking off.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetTanker">AI_A2A:SetTanker(TankerName)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Sets to refuel at the given tanker.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -404,12 +440,24 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).Stop">AI_A2A:Stop()</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).Stop">AI_A2A:Stop()</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Synchronous Event Trigger for Event Stop.</p>
|
<p>Synchronous Event Trigger for Event Stop.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).TankerName">AI_A2A.TankerName</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).__RTB">AI_A2A:__RTB(Delay)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).__RTB">AI_A2A:__RTB(Delay)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Asynchronous Event Trigger for Event RTB.</p>
|
<p>Asynchronous Event Trigger for Event RTB.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).__Refuel">AI_A2A:__Refuel(Delay)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Refuel Asynchronous Trigger for AI_A2A</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -434,6 +482,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).onafterDead">AI_A2A:onafterDead()</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).onafterDead">AI_A2A:onafterDead()</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).onafterHold">AI_A2A:onafterHold(AIGroup, From, Event, To, HoldTime)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -446,6 +500,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).onafterRTB">AI_A2A:onafterRTB(AIGroup, From, Event, To)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).onafterRTB">AI_A2A:onafterRTB(AIGroup, From, Event, To)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).onafterRefuel">AI_A2A:onafterRefuel(AIGroup, From, Event, To)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -682,6 +742,43 @@ The To State string.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).OnAfterRefuel" >
|
||||||
|
<strong>AI_A2A:OnAfterRefuel(Controllable, From, Event, To)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Refuel Handler OnAfter for AI_A2A</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
||||||
|
The Controllable Object managed by the FSM.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<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_A2A).OnAfterStart" >
|
<a id="#(AI_A2A).OnAfterStart" >
|
||||||
<strong>AI_A2A:OnAfterStart(From, Event, To)</strong>
|
<strong>AI_A2A:OnAfterStart(From, Event, To)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -833,6 +930,48 @@ The To State string.</p>
|
|||||||
<p><em>#boolean:</em>
|
<p><em>#boolean:</em>
|
||||||
Return false to cancel Transition.</p>
|
Return false to cancel Transition.</p>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).OnBeforeRefuel" >
|
||||||
|
<strong>AI_A2A:OnBeforeRefuel(Controllable, From, Event, To)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Refuel Handler OnBefore for AI_A2A</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
||||||
|
The Controllable Object managed by the FSM.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<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>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -1336,6 +1475,27 @@ Return false to cancel Transition.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).RTBHold" >
|
||||||
|
<strong>AI_A2A.RTBHold(AIGroup)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A).RTBRoute" >
|
<a id="#(AI_A2A).RTBRoute" >
|
||||||
<strong>AI_A2A.RTBRoute(AIGroup)</strong>
|
<strong>AI_A2A.RTBRoute(AIGroup)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -1344,6 +1504,40 @@ Return false to cancel Transition.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).Refuel" >
|
||||||
|
<strong>AI_A2A:Refuel()</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Refuel Trigger for AI_A2A</p>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).Resume" >
|
||||||
|
<strong>AI_A2A.Resume(AIGroup)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameter</h3>
|
<h3>Parameter</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -1587,6 +1781,33 @@ self</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).SetTanker" >
|
||||||
|
<strong>AI_A2A:SetTanker(TankerName)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Sets to refuel at the given tanker.</p>
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> TankerName </em></code>:
|
||||||
|
The group name of the tanker as defined within the Mission Editor or spawned.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em><a href="##(AI_A2A)">#AI_A2A</a>:</em>
|
||||||
|
self</p>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A).SetTargetDistance" >
|
<a id="#(AI_A2A).SetTargetDistance" >
|
||||||
<strong>AI_A2A:SetTargetDistance(Coordinate)</strong>
|
<strong>AI_A2A:SetTargetDistance(Coordinate)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -1642,6 +1863,20 @@ self</p>
|
|||||||
|
|
||||||
<p>Synchronous Event Trigger for Event Stop.</p>
|
<p>Synchronous Event Trigger for Event Stop.</p>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<em></em>
|
||||||
|
<a id="#(AI_A2A).TankerName" >
|
||||||
|
<strong>AI_A2A.TankerName</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -1669,6 +1904,27 @@ The delay in seconds.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).__Refuel" >
|
||||||
|
<strong>AI_A2A:__Refuel(Delay)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Refuel Asynchronous Trigger for AI_A2A</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_A2A).__Start" >
|
<a id="#(AI_A2A).__Start" >
|
||||||
<strong>AI_A2A:__Start(Delay)</strong>
|
<strong>AI_A2A:__Start(Delay)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -1742,6 +1998,47 @@ The delay in seconds.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).onafterHold" >
|
||||||
|
<strong>AI_A2A:onafterHold(AIGroup, From, Event, To, HoldTime)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<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> HoldTime </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -1791,6 +2088,42 @@ The delay in seconds.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<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>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A).onafterRefuel" >
|
||||||
|
<strong>AI_A2A:onafterRefuel(AIGroup, From, Event, To)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters</h3>
|
<h3>Parameters</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@ -312,6 +312,12 @@ and automatically engage any airborne enemies that are within a certain range or
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_CAP).OnLeaveEngaging">AI_A2A_CAP:OnLeaveEngaging(Controllable, From, Event, To)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_CAP).OnLeaveEngaging">AI_A2A_CAP:OnLeaveEngaging(Controllable, From, Event, To)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>OnLeave Transition Handler for State Engaging.</p>
|
<p>OnLeave Transition Handler for State Engaging.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_CAP).Resume">AI_A2A_CAP.Resume(AIGroup)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -499,6 +505,8 @@ Use the method <a href="AI_Cap.html##(AI_A2A_CAP).SetEngageZone">AI<em>Cap#AI</e
|
|||||||
</dl>
|
</dl>
|
||||||
<h2><a id="#(AI_A2A_Cap)" >Type <code>AI_A2A_Cap</code></a></h2>
|
<h2><a id="#(AI_A2A_Cap)" >Type <code>AI_A2A_Cap</code></a></h2>
|
||||||
|
|
||||||
|
<h2><a id="#(AI_A2A)" >Type <code>AI_A2A</code></a></h2>
|
||||||
|
|
||||||
<h2><a id="#(AI_A2A_CAP)" >Type <code>AI_A2A_CAP</code></a></h2>
|
<h2><a id="#(AI_A2A_CAP)" >Type <code>AI_A2A_CAP</code></a></h2>
|
||||||
<h3>Field(s)</h3>
|
<h3>Field(s)</h3>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -1293,6 +1301,27 @@ Return false to cancel Transition.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A_CAP).Resume" >
|
||||||
|
<strong>AI_A2A_CAP.Resume(AIGroup)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A_CAP).SetEngageRange" >
|
<a id="#(AI_A2A_CAP).SetEngageRange" >
|
||||||
<strong>AI_A2A_CAP:SetEngageRange(EngageRange)</strong>
|
<strong>AI_A2A_CAP:SetEngageRange(EngageRange)</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -299,7 +299,7 @@ Per one, two, three, four?</p>
|
|||||||
<h2><a id="#(AI_A2A_DISPATCHER)">Type <code>AI_A2A_DISPATCHER</code></a></h2>
|
<h2><a id="#(AI_A2A_DISPATCHER)">Type <code>AI_A2A_DISPATCHER</code></a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).AddDefenderToSquadron">AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).AddDefenderToSquadron">AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender, Size)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -698,6 +698,12 @@ Per one, two, three, four?</p>
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffInAir">AI_A2A_DISPATCHER:SetDefaultTakeoffInAir()</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffInAir">AI_A2A_DISPATCHER:SetDefaultTakeoffInAir()</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Sets flights to default take-off in the air, as part of the defense system.</p>
|
<p>Sets flights to default take-off in the air, as part of the defense system.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefaultTanker">AI_A2A_DISPATCHER:SetDefaultTanker(TankerName)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Set the default tanker where defenders will Refuel in the air.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -752,6 +758,12 @@ Per one, two, three, four?</p>
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronCapInterval">AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName, CapLimit, LowInterval, HighInterval, Probability)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronCapInterval">AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName, CapLimit, LowInterval, HighInterval, Probability)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronFuelThreshold">AI_A2A_DISPATCHER:SetSquadronFuelThreshold(SquadronName, FuelThreshold)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -824,6 +836,12 @@ Per one, two, three, four?</p>
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffInAir">AI_A2A_DISPATCHER:SetSquadronTakeoffInAir(SquadronName)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffInAir">AI_A2A_DISPATCHER:SetSquadronTakeoffInAir(SquadronName)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Sets flights to take-off in the air, as part of the defense system.</p>
|
<p>Sets flights to take-off in the air, as part of the defense system.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTanker">AI_A2A_DISPATCHER:SetSquadronTanker(SquadronName, TankerName)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Set the squadron tanker where defenders will Refuel in the air.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -1244,9 +1262,11 @@ targets to be engaged. Depending on the grouping parameter, the spawned flights
|
|||||||
For example with a group setting of 2, if 3 targets are detected and cannot be engaged by CAP or any airborne flight,
|
For example with a group setting of 2, if 3 targets are detected and cannot be engaged by CAP or any airborne flight,
|
||||||
a GCI needs to be started, the GCI flights will be grouped as follows: Group 1 of 2 flights and Group 2 of one flight!</p>
|
a GCI needs to be started, the GCI flights will be grouped as follows: Group 1 of 2 flights and Group 2 of one flight!</p>
|
||||||
|
|
||||||
|
<p>Even more ... If one target has been detected, and the overhead is 1.5, grouping is 1, then two groups of planes will be spawned, with one unit each!</p>
|
||||||
|
|
||||||
<p>The <strong>grouping value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense flights grouping when the tactical situation changes.</p>
|
<p>The <strong>grouping value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense flights grouping when the tactical situation changes.</p>
|
||||||
|
|
||||||
<h3>6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI</h3>
|
<h3>6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI.</h3>
|
||||||
|
|
||||||
<p>The effectiveness can be set with the <strong>overhead parameter</strong>. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
|
<p>The effectiveness can be set with the <strong>overhead parameter</strong>. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
|
||||||
The <strong>default value</strong> of the overhead parameter is 1.0, which means <strong>equal balance</strong>. </p>
|
The <strong>default value</strong> of the overhead parameter is 1.0, which means <strong>equal balance</strong>. </p>
|
||||||
@ -1270,8 +1290,18 @@ The overhead must be given as a decimal value with 1 as the neutral value, which
|
|||||||
<p>The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group
|
<p>The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group
|
||||||
multiplied by the Overhead and rounded up to the smallest integer. </p>
|
multiplied by the Overhead and rounded up to the smallest integer. </p>
|
||||||
|
|
||||||
|
<p>For example ... If one target has been detected, and the overhead is 1.5, grouping is 1, then two groups of planes will be spawned, with one unit each!</p>
|
||||||
|
|
||||||
<p>The <strong>overhead value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense overhead when the tactical situation changes.</p>
|
<p>The <strong>overhead value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense overhead when the tactical situation changes.</p>
|
||||||
|
|
||||||
|
<h2>6.5. Squadron fuel treshold.</h2>
|
||||||
|
|
||||||
|
<p>When an airplane gets <strong>out of fuel</strong> to a certain %-tage, which is by default <strong>15% (0.15)</strong>, there are two possible actions that can be taken:
|
||||||
|
- The defender will go RTB, and will be replaced with a new defender if possible.
|
||||||
|
- The defender will refuel at a tanker, if a tanker has been specified for the squadron.</p>
|
||||||
|
|
||||||
|
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetSquadronFuelThreshold">AI<em>A2A</em>DISPATCHER.SetSquadronFuelThreshold</a>() to set the <strong>squadron fuel treshold</strong> of spawned airplanes for all squadrons.</p>
|
||||||
|
|
||||||
<h2>7. Setup a squadron for CAP</h2>
|
<h2>7. Setup a squadron for CAP</h2>
|
||||||
|
|
||||||
<h3>7.1. Set the CAP zones</h3>
|
<h3>7.1. Set the CAP zones</h3>
|
||||||
@ -1349,6 +1379,32 @@ Zones can be circles, can be setup in the mission editor using trigger zones, bu
|
|||||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
<h2>7.3. Squadron tanker to refuel when executing CAP and defender is out of fuel.</h2>
|
||||||
|
|
||||||
|
<p>Instead of sending CAP to RTB when out of fuel, you can let CAP refuel in mid air using a tanker.
|
||||||
|
This greatly increases the efficiency of your CAP operations.</p>
|
||||||
|
|
||||||
|
<p>In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected.
|
||||||
|
Then, use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultTanker">AI<em>A2A</em>DISPATCHER.SetDefaultTanker</a>() to set the default tanker for the refuelling.
|
||||||
|
You can also specify a specific tanker for refuelling for a squadron by using the method <a href="##(AI_A2A_DISPATCHER).SetSquadronTanker">AI<em>A2A</em>DISPATCHER.SetSquadronTanker</a>().</p>
|
||||||
|
|
||||||
|
<p>When the tanker specified is alive and in the air, the tanker will be used for refuelling.</p>
|
||||||
|
|
||||||
|
<p>For example, the following setup will create a CAP for squadron "Gelend" with a refuel task for the squadron:</p>
|
||||||
|
|
||||||
|
<p><img src="..\Presentations\AI_A2A_DISPATCHER\AI_A2A_DISPATCHER-ME_10.JPG" alt="Banner Image"/></p>
|
||||||
|
|
||||||
|
<pre><code> -- Define the CAP
|
||||||
|
A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 )
|
||||||
|
A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 )
|
||||||
|
A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 )
|
||||||
|
A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 )
|
||||||
|
|
||||||
|
-- Setup the Refuelling for squadron "Gelend", at tanker (group) "TankerGelend" when the fuel in the tank of the CAP defenders is less than 80%.
|
||||||
|
A2ADispatcher:SetSquadronFuelThreshold( "Gelend", 0.8 )
|
||||||
|
A2ADispatcher:SetSquadronTanker( "Gelend", "TankerGelend" )
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h2>8. Setup a squadron for GCI:</h2>
|
<h2>8. Setup a squadron for GCI:</h2>
|
||||||
|
|
||||||
<p>The method <a href="##(AI_A2A_DISPATCHER).SetSquadronGci">AI<em>A2A</em>DISPATCHER.SetSquadronGci</a>() defines a GCI execution for a squadron.</p>
|
<p>The method <a href="##(AI_A2A_DISPATCHER).SetSquadronGci">AI<em>A2A</em>DISPATCHER.SetSquadronGci</a>() defines a GCI execution for a squadron.</p>
|
||||||
@ -1457,6 +1513,32 @@ So, ensure that you set the default CAP limit <strong>before</strong> you spawn
|
|||||||
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultCapTimeInterval">AI<em>A2A</em>DISPATCHER.SetDefaultCapTimeInterval</a>() to set the <strong>default CAP time interval</strong> of spawned airplanes for all squadrons. <br/>
|
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultCapTimeInterval">AI<em>A2A</em>DISPATCHER.SetDefaultCapTimeInterval</a>() to set the <strong>default CAP time interval</strong> of spawned airplanes for all squadrons. <br/>
|
||||||
Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the <a href="##(AI_A2A_DISPATCHER).SetSquadronCapTimeInterval">AI<em>A2A</em>DISPATCHER.SetSquadronCapTimeInterval</a>() method.</p>
|
Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the <a href="##(AI_A2A_DISPATCHER).SetSquadronCapTimeInterval">AI<em>A2A</em>DISPATCHER.SetSquadronCapTimeInterval</a>() method.</p>
|
||||||
|
|
||||||
|
<h2>10.7.3. Default tanker for refuelling when executing CAP.</h2>
|
||||||
|
|
||||||
|
<p>Instead of sending CAP to RTB when out of fuel, you can let CAP refuel in mid air using a tanker.
|
||||||
|
This greatly increases the efficiency of your CAP operations.</p>
|
||||||
|
|
||||||
|
<p>In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected.
|
||||||
|
Then, use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultTanker">AI<em>A2A</em>DISPATCHER.SetDefaultTanker</a>() to set the tanker for the dispatcher.
|
||||||
|
Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultFuelTreshold">AI<em>A2A</em>DISPATCHER.SetDefaultFuelTreshold</a>() to set the %-tage left in the defender airplane tanks when a refuel action is needed.</p>
|
||||||
|
|
||||||
|
<p>When the tanker specified is alive and in the air, the tanker will be used for refuelling.</p>
|
||||||
|
|
||||||
|
<p>For example, the following setup will set the default refuel tanker to "Tanker":</p>
|
||||||
|
|
||||||
|
<p><img src="..\Presentations\AI_A2A_DISPATCHER\AI_A2A_DISPATCHER-ME_11.JPG" alt="Banner Image"/></p>
|
||||||
|
|
||||||
|
<pre><code> -- Define the CAP
|
||||||
|
A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 )
|
||||||
|
A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 )
|
||||||
|
A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 )
|
||||||
|
A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 )
|
||||||
|
|
||||||
|
-- Set the default tanker for refuelling to "Tanker", when the default fuel treshold has reached 90% fuel left.
|
||||||
|
A2ADispatcher:SetDefaultFuelThreshold( 0.9 )
|
||||||
|
A2ADispatcher:SetDefaultTanker( "Tanker" )
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h2>10.8. Default settings for GCI.</h2>
|
<h2>10.8. Default settings for GCI.</h2>
|
||||||
|
|
||||||
<h2>10.8.1. Optimal intercept point calculation.</h2>
|
<h2>10.8.1. Optimal intercept point calculation.</h2>
|
||||||
@ -1485,10 +1567,11 @@ This time can easily take 2 to 3 minutes, and even then the defenders still need
|
|||||||
<h2>10.8.2. Default disengage radius.</h2>
|
<h2>10.8.2. Default disengage radius.</h2>
|
||||||
|
|
||||||
<p>The radius to <strong>disengage any target</strong> when the <strong>distance</strong> of the defender to the <strong>home base</strong> is larger than the specified meters.
|
<p>The radius to <strong>disengage any target</strong> when the <strong>distance</strong> of the defender to the <strong>home base</strong> is larger than the specified meters.
|
||||||
The default disengage radius is <strong>100km</strong> (100000 meters). Note that the disengage radius is applicable to ALL squadrons!</p>
|
The default disengage radius is <strong>300km</strong> (300000 meters). Note that the disengage radius is applicable to ALL squadrons!</p>
|
||||||
|
|
||||||
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDisengageRadius">AI<em>A2A</em>DISPATCHER.SetDisengageRadius</a>() to modify the default disengage radius to another distance setting.</p>
|
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDisengageRadius">AI<em>A2A</em>DISPATCHER.SetDisengageRadius</a>() to modify the default disengage radius to another distance setting.</p>
|
||||||
|
|
||||||
|
|
||||||
<h2>11. Q & A:</h2>
|
<h2>11. Q & A:</h2>
|
||||||
|
|
||||||
<h3>11.1. Which countries will be selected for each coalition?</h3>
|
<h3>11.1. Which countries will be selected for each coalition?</h3>
|
||||||
@ -1813,7 +1896,7 @@ The following parameters were given to the :New method of AI<em>A2A</em>GCICAP,
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A_DISPATCHER).AddDefenderToSquadron" >
|
<a id="#(AI_A2A_DISPATCHER).AddDefenderToSquadron" >
|
||||||
<strong>AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender)</strong>
|
<strong>AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender, Size)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -1831,6 +1914,11 @@ The following parameters were given to the :New method of AI<em>A2A</em>GCICAP,
|
|||||||
|
|
||||||
<p><code><em> Defender </em></code>: </p>
|
<p><code><em> Defender </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> Size </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -2107,7 +2195,6 @@ DefenderSquadron</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em></em>
|
|
||||||
<a id="#(AI_A2A_DISPATCHER).DisengageRadius" >
|
<a id="#(AI_A2A_DISPATCHER).DisengageRadius" >
|
||||||
<strong>AI_A2A_DISPATCHER.DisengageRadius</strong>
|
<strong>AI_A2A_DISPATCHER.DisengageRadius</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -3686,6 +3773,44 @@ From the airbase hot, from the airbase cold, in the air, from the runway.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A_DISPATCHER).SetDefaultTanker" >
|
||||||
|
<strong>AI_A2A_DISPATCHER:SetDefaultTanker(TankerName)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Set the default tanker where defenders will Refuel in the air.</p>
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="##(strig)">#strig</a> TankerName </em></code>:
|
||||||
|
A string defining the group name of the Tanker as defined within the Mission Editor.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Usage:</h3>
|
||||||
|
<pre class="example"><code>
|
||||||
|
-- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
|
||||||
|
-- Now Setup the default fuel treshold.
|
||||||
|
A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
|
||||||
|
-- Now Setup the default tanker.
|
||||||
|
A2ADispatcher:SetDefaultTanker( "Tanker" ) -- The group name of the tanker is "Tanker" in the Mission Editor.</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A_DISPATCHER).SetDefenderTask" >
|
<a id="#(AI_A2A_DISPATCHER).SetDefenderTask" >
|
||||||
<strong>AI_A2A_DISPATCHER:SetDefenderTask(Defender, Type, Fsm, Target)</strong>
|
<strong>AI_A2A_DISPATCHER:SetDefenderTask(Defender, Type, Fsm, Target)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -3766,7 +3891,7 @@ From the airbase hot, from the airbase cold, in the air, from the runway.</p>
|
|||||||
<li>
|
<li>
|
||||||
|
|
||||||
<p><code><em>#number DisengageRadius </em></code>:
|
<p><code><em>#number DisengageRadius </em></code>:
|
||||||
(Optional, Default = 100000) The radius to disengage a target when too far from the home base.</p>
|
(Optional, Default = 300000) The radius to disengage a target when too far from the home base.</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -3781,7 +3906,7 @@ From the airbase hot, from the airbase cold, in the air, from the runway.</p>
|
|||||||
Dispatcher:SetDisengageRadius( 50000 )
|
Dispatcher:SetDisengageRadius( 50000 )
|
||||||
|
|
||||||
-- Set 100km as the disengage radius.
|
-- Set 100km as the disengage radius.
|
||||||
Dispatcher:SetDisngageRadius() -- 100000 is the default value.
|
Dispatcher:SetDisngageRadius() -- 300000 is the default value.
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
@ -4164,6 +4289,51 @@ The squadron name.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A_DISPATCHER).SetSquadronFuelThreshold" >
|
||||||
|
<strong>AI_A2A_DISPATCHER:SetSquadronFuelThreshold(SquadronName, FuelThreshold)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p>The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em>#string SquadronName </em></code>:
|
||||||
|
The name of the squadron.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em>#number FuelThreshold </em></code>:
|
||||||
|
A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Usage:</h3>
|
||||||
|
<pre class="example"><code>
|
||||||
|
-- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
|
||||||
|
-- Now Setup the default fuel treshold.
|
||||||
|
A2ADispatcher:SetSquadronRefuelThreshold( "SquadronName", 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A_DISPATCHER).SetSquadronGci" >
|
<a id="#(AI_A2A_DISPATCHER).SetSquadronGci" >
|
||||||
<strong>AI_A2A_DISPATCHER:SetSquadronGci(SquadronName, EngageMinSpeed, EngageMaxSpeed)</strong>
|
<strong>AI_A2A_DISPATCHER:SetSquadronGci(SquadronName, EngageMinSpeed, EngageMaxSpeed)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -4673,6 +4843,50 @@ The name of the squadron.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A_DISPATCHER).SetSquadronTanker" >
|
||||||
|
<strong>AI_A2A_DISPATCHER:SetSquadronTanker(SquadronName, TankerName)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Set the squadron tanker where defenders will Refuel in the air.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em>#string SquadronName </em></code>:
|
||||||
|
The name of the squadron.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="##(strig)">#strig</a> TankerName </em></code>:
|
||||||
|
A string defining the group name of the Tanker as defined within the Mission Editor.</p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Usage:</h3>
|
||||||
|
<pre class="example"><code>
|
||||||
|
-- Now Setup the A2A dispatcher, and initialize it using the Detection object.
|
||||||
|
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
|
||||||
|
|
||||||
|
-- Now Setup the squadron fuel treshold.
|
||||||
|
A2ADispatcher:SetSquadronRefuelThreshold( "SquadronName", 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
|
||||||
|
|
||||||
|
-- Now Setup the squadron tanker.
|
||||||
|
A2ADispatcher:SetSquadronTanker( "SquadronName", "Tanker" ) -- The group name of the tanker is "Tanker" in the Mission Editor.</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A_DISPATCHER).SetTacticalDisplay" >
|
<a id="#(AI_A2A_DISPATCHER).SetTacticalDisplay" >
|
||||||
<strong>AI_A2A_DISPATCHER:SetTacticalDisplay(TacticalDisplay)</strong>
|
<strong>AI_A2A_DISPATCHER:SetTacticalDisplay(TacticalDisplay)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -5115,6 +5329,8 @@ The radius in meters wherein detected airplanes will GCI.</p>
|
|||||||
|
|
||||||
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||||
|
|
||||||
|
<h2><a id="#(strig)" >Type <code>strig</code></a></h2>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -204,7 +204,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCI).InterceptRoute">AI_A2A_GCI.InterceptRoute(AIControllable)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCI).InterceptRoute">AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -617,19 +617,24 @@ Use the method <a href="AI_Cap.html##(AI_A2A_GCI).SetEngageZone">AI<em>Cap#AI</e
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(AI_A2A_GCI).InterceptRoute" >
|
<a id="#(AI_A2A_GCI).InterceptRoute" >
|
||||||
<strong>AI_A2A_GCI.InterceptRoute(AIControllable)</strong>
|
<strong>AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameter</h3>
|
<h3>Parameters</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIControllable </em></code>: </p>
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIControllable </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@ -251,6 +251,12 @@
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_PATROL).PatrolZone">AI_A2A_PATROL.PatrolZone</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_PATROL).PatrolZone">AI_A2A_PATROL.PatrolZone</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_PATROL).Resume">AI_A2A_PATROL.Resume(AIGroup)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -430,6 +436,8 @@ Use the method <a href="##(AI_A2A_PATROL).ManageDamage">AI<em>A2A</em>PATROL.Man
|
|||||||
</dl>
|
</dl>
|
||||||
<h2><a id="#(AI_A2A_Patrol)" >Type <code>AI_A2A_Patrol</code></a></h2>
|
<h2><a id="#(AI_A2A_Patrol)" >Type <code>AI_A2A_Patrol</code></a></h2>
|
||||||
|
|
||||||
|
<h2><a id="#(AI_A2A)" >Type <code>AI_A2A</code></a></h2>
|
||||||
|
|
||||||
<h2><a id="#(AI_A2A_PATROL)" >Type <code>AI_A2A_PATROL</code></a></h2>
|
<h2><a id="#(AI_A2A_PATROL)" >Type <code>AI_A2A_PATROL</code></a></h2>
|
||||||
<h3>Field(s)</h3>
|
<h3>Field(s)</h3>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -875,6 +883,27 @@ Note that this method is required, as triggers the next route when patrolling fo
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(AI_A2A_PATROL).Resume" >
|
||||||
|
<strong>AI_A2A_PATROL.Resume(AIGroup)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
|||||||
@ -3417,6 +3417,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>
|
||||||
|
|||||||
@ -625,6 +625,12 @@ The different values of Unit.Category can be:</p>
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetFriendliesNearBy">DETECTION_BASE:GetFriendliesNearBy(DetectedItem)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetFriendliesNearBy">DETECTION_BASE:GetFriendliesNearBy(DetectedItem)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Returns friendly units nearby the FAC units ...</p>
|
<p>Returns friendly units nearby the FAC units ...</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetFriendliesNearIntercept">DETECTION_BASE:GetFriendliesNearIntercept(DetectedItem)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Returns friendly units nearby the intercept point ...</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -703,6 +709,12 @@ The different values of Unit.Category can be:</p>
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).IsFriendliesNearBy">DETECTION_BASE:IsFriendliesNearBy(DetectedItem)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).IsFriendliesNearBy">DETECTION_BASE:IsFriendliesNearBy(DetectedItem)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Returns if there are friendlies nearby the FAC units ...</p>
|
<p>Returns if there are friendlies nearby the FAC units ...</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).IsFriendliesNearIntercept">DETECTION_BASE:IsFriendliesNearIntercept(DetectedItem)</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
<p>Returns if there are friendlies nearby the intercept ...</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -2630,7 +2642,7 @@ The group to generate the report for.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em></em>
|
<em>#number</em>
|
||||||
<a id="#(DETECTION_BASE).DetectionInterval" >
|
<a id="#(DETECTION_BASE).DetectionInterval" >
|
||||||
<strong>DETECTION_BASE.DetectionInterval</strong>
|
<strong>DETECTION_BASE.DetectionInterval</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -3099,6 +3111,32 @@ The distance. </p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(DETECTION_BASE).GetFriendliesNearIntercept" >
|
||||||
|
<strong>DETECTION_BASE:GetFriendliesNearIntercept(DetectedItem)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Returns friendly units nearby the intercept point ...</p>
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> DetectedItem </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em><a href="##(map)">#map</a>:</em></p>
|
||||||
|
<h1>string,Wrapper.Unit#UNIT> The map of Friendly UNITs.</h1>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(DETECTION_BASE).GetPlayersNearBy" >
|
<a id="#(DETECTION_BASE).GetPlayersNearBy" >
|
||||||
<strong>DETECTION_BASE:GetPlayersNearBy(DetectedItem)</strong>
|
<strong>DETECTION_BASE:GetPlayersNearBy(DetectedItem)</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -3408,6 +3446,32 @@ trhe if there are friendlies nearby </p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<a id="#(DETECTION_BASE).IsFriendliesNearIntercept" >
|
||||||
|
<strong>DETECTION_BASE:IsFriendliesNearIntercept(DetectedItem)</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<p>Returns if there are friendlies nearby the intercept ...</p>
|
||||||
|
|
||||||
|
<h3>Parameter</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<p><code><em> DetectedItem </em></code>: </p>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Return value</h3>
|
||||||
|
|
||||||
|
<p><em>#boolean:</em>
|
||||||
|
trhe if there are friendlies near the intercept.</p>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
<a id="#(DETECTION_BASE).IsPlayersNearBy" >
|
<a id="#(DETECTION_BASE).IsPlayersNearBy" >
|
||||||
<strong>DETECTION_BASE:IsPlayersNearBy(DetectedItem)</strong>
|
<strong>DETECTION_BASE:IsPlayersNearBy(DetectedItem)</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -1598,7 +1598,7 @@ A string defining the start state.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em>#string</em>
|
<em></em>
|
||||||
<a id="#(FSM)._StartState" >
|
<a id="#(FSM)._StartState" >
|
||||||
<strong>FSM._StartState</strong>
|
<strong>FSM._StartState</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -1897,6 +1897,7 @@ A string defining the start state.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<em></em>
|
||||||
<a id="#(FSM).current" >
|
<a id="#(FSM).current" >
|
||||||
<strong>FSM.current</strong>
|
<strong>FSM.current</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -227,6 +227,7 @@ 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>
|
||||||
@ -235,6 +236,9 @@ 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">
|
||||||
|
|||||||
@ -2829,6 +2829,7 @@ The y coordinate.</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>
|
||||||
|
|||||||
@ -1838,6 +1838,7 @@ self</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a></em>
|
||||||
<a id="#(POSITIONABLE).Spot" >
|
<a id="#(POSITIONABLE).Spot" >
|
||||||
<strong>POSITIONABLE.Spot</strong>
|
<strong>POSITIONABLE.Spot</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -1142,7 +1142,7 @@ true if metric.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em></em>
|
<em>#boolean</em>
|
||||||
<a id="#(SETTINGS).Metric" >
|
<a id="#(SETTINGS).Metric" >
|
||||||
<strong>SETTINGS.Metric</strong>
|
<strong>SETTINGS.Metric</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -822,6 +822,12 @@ and any spaces before and after the resulting name are removed.</p>
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||||
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -2194,9 +2200,6 @@ 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">
|
||||||
@ -2729,9 +2732,6 @@ 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">
|
||||||
@ -2746,9 +2746,6 @@ when nothing was spawned.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p> By default, no InitLimit</p>
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
@ -2784,7 +2781,7 @@ when nothing was spawned.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em>#number</em>
|
<em></em>
|
||||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -2801,7 +2798,7 @@ when nothing was spawned.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em>#number</em>
|
<em></em>
|
||||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -3129,7 +3126,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>
|
||||||
@ -3153,7 +3150,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@ -3733,6 +3730,20 @@ True = Continue Scheduler</p>
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
|
||||||
|
<em></em>
|
||||||
|
<a id="#(SPAWN).uncontrolled" >
|
||||||
|
<strong>SPAWN.uncontrolled</strong>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|||||||
@ -436,6 +436,7 @@ ptional) The name of the new static.</p>
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
|
<em>#number</em>
|
||||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -552,7 +552,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
|
<em><a href="Core.Cargo.html##(CARGO)">Core.Cargo#CARGO</a></em>
|
||||||
<a id="#(FSM_PROCESS).Cargo" >
|
<a id="#(FSM_PROCESS).Cargo" >
|
||||||
<strong>FSM_PROCESS.Cargo</strong>
|
<strong>FSM_PROCESS.Cargo</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -566,6 +566,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>
|
||||||
<a id="#(FSM_PROCESS).DeployZone" >
|
<a id="#(FSM_PROCESS).DeployZone" >
|
||||||
<strong>FSM_PROCESS.DeployZone</strong>
|
<strong>FSM_PROCESS.DeployZone</strong>
|
||||||
</a>
|
</a>
|
||||||
@ -630,7 +631,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<em>#number</em>
|
<em></em>
|
||||||
<a id="#(TASK_CARGO).CargoLimit" >
|
<a id="#(TASK_CARGO).CargoLimit" >
|
||||||
<strong>TASK_CARGO.CargoLimit</strong>
|
<strong>TASK_CARGO.CargoLimit</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
BIN
docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_10.jpg
Normal file
BIN
docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_10.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 351 KiB |
BIN
docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_11.jpg
Normal file
BIN
docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_11.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 319 KiB |
Loading…
x
Reference in New Issue
Block a user