diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index e53b04120..14aea951f 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -377,76 +377,76 @@ do -- AI_A2A_DISPATCHER -- -- Find the following mission script as an example: -- - -- -- Define a SET_GROUP object that builds a collection of groups that define the EWR network. - -- -- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. - -- DetectionSetGroup = SET_GROUP:New() - -- DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) - -- DetectionSetGroup:FilterStart() - -- - -- -- Setup the A2A dispatcher, and initialize it. - -- A2ADispatcher = AI_A2A_DISPATCHER:New( DetectionSetGroup, 30000 ) - -- - -- -- Initialize the dispatcher, setting up a border zone. This is a polygon, - -- -- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. - -- -- Any enemy crossing this border will be engaged. - -- CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) - -- A2ADispatcher:SetBorderZone( { CCCPBorderZone } ) - -- - -- -- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly - -- -- without an assignment within 100km radius from a detected target, will engage that target. - -- A2ADispatcher:SetEngageRadius( 300000 ) - -- - -- -- Setup the squadrons. - -- A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 ) - -- A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) - -- A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 ) - -- A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) - -- A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 ) - -- - -- -- Setup the overhead - -- A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) - -- A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) - -- A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 ) - -- A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) - -- A2ADispatcher:SetSquadronOverhead( "Novo", 1 ) - -- - -- -- Setup the Grouping - -- A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 ) - -- A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) - -- A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) - -- - -- -- Setup the Takeoff methods - -- A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air ) - -- A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" ) - -- A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) - -- A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) - -- A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) - -- - -- -- Setup the Landing methods - -- A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) - -- A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) - -- A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) - -- A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) - -- A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) - -- - -- - -- -- CAP Squadron execution. - -- CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) - -- A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) - -- A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) - -- - -- CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) - -- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) - -- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - -- - -- CAPZoneMiddle = ZONE:New( "CAP Zone Middle") - -- A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) - -- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - -- - -- -- GCI Squadron execution. - -- A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 ) - -- A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 ) - -- A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 ) + -- -- Define a SET_GROUP object that builds a collection of groups that define the EWR network. + -- -- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. + -- DetectionSetGroup = SET_GROUP:New() + -- DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) + -- DetectionSetGroup:FilterStart() + -- + -- -- Setup the A2A dispatcher, and initialize it. + -- A2ADispatcher = AI_A2A_DISPATCHER:New( DetectionSetGroup, 30000 ) + -- + -- -- Initialize the dispatcher, setting up a border zone. This is a polygon, + -- -- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. + -- -- Any enemy crossing this border will be engaged. + -- CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) + -- A2ADispatcher:SetBorderZone( { CCCPBorderZone } ) + -- + -- -- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly + -- -- without an assignment within 100km radius from a detected target, will engage that target. + -- A2ADispatcher:SetEngageRadius( 300000 ) + -- + -- -- Setup the squadrons. + -- A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 ) + -- A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) + -- A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 ) + -- A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) + -- A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 ) + -- + -- -- Setup the overhead + -- A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) + -- A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) + -- A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 ) + -- A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) + -- A2ADispatcher:SetSquadronOverhead( "Novo", 1 ) + -- + -- -- Setup the Grouping + -- A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 ) + -- A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) + -- A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) + -- + -- -- Setup the Takeoff methods + -- A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air ) + -- A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" ) + -- A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) + -- A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) + -- A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) + -- + -- -- Setup the Landing methods + -- A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) + -- A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) + -- A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) + -- A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) + -- A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) + -- + -- + -- -- CAP Squadron execution. + -- CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) + -- A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) + -- A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) + -- + -- CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) + -- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) + -- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) + -- + -- CAPZoneMiddle = ZONE:New( "CAP Zone Middle") + -- A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) + -- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) + -- + -- -- GCI Squadron execution. + -- A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 ) + -- A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 ) + -- A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 ) -- -- #### 8.5.1. Script the EWR network -- diff --git a/docs/Documentation/AI_A2A_Dispatcher.html b/docs/Documentation/AI_A2A_Dispatcher.html index d12ec06c3..62c2c7011 100644 --- a/docs/Documentation/AI_A2A_Dispatcher.html +++ b/docs/Documentation/AI_A2A_Dispatcher.html @@ -974,76 +974,77 @@ But you can also define other zone types instead, like moving zones.
Find the following mission script as an example:
- -- Define a SETGROUP object that builds a collection of groups that define the EWR network.
+
GROUP:New()
+ DetectionSetGroup = SET_GROUP:New()
DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
- DetectionSetGroup:FilterStart() -- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
- DetectionSetGroup = SET
-- Setup the A2A dispatcher, and initialize it. - A2ADispatcher = AIA2ADISPATCHER:New( DetectionSetGroup, 30000 )
+ -- Setup the A2A dispatcher, and initialize it. + A2ADispatcher = AI_A2A_DISPATCHER:New( DetectionSetGroup, 30000 ) --- Initialize the dispatcher, setting up a border zone. This is a polygon, + -- Initialize the dispatcher, setting up a border zone. This is a polygon, -- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. -- Any enemy crossing this border will be engaged. CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) - A2ADispatcher:SetBorderZone( { CCCPBorderZone } )
+ A2ADispatcher:SetBorderZone( { CCCPBorderZone } ) --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly + -- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly -- without an assignment within 100km radius from a detected target, will engage that target. - A2ADispatcher:SetEngageRadius( 300000 )
+ A2ADispatcher:SetEngageRadius( 300000 ) --- Setup the squadrons. - A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.MineralnyeVody, { "SQ CCCP SU-27" }, 20 ) - A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.MaykopKhanskaya, { "SQ CCCP MIG-31" }, 20 ) + -- Setup the squadrons. + A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 ) + A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 ) A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) - A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )
+ A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 ) --- Setup the overhead + -- Setup the overhead A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 ) A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) - A2ADispatcher:SetSquadronOverhead( "Novo", 1 )
+ A2ADispatcher:SetSquadronOverhead( "Novo", 1 ) --- Setup the Grouping + -- Setup the Grouping A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 ) A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) - A2ADispatcher:SetSquadronGrouping( "Novo", 3 )
+ A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) --- Setup the Takeoff methods - A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AIA2ADISPATCHER.Takeoff.Air ) + -- Setup the Takeoff methods + A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air ) A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" ) A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) - A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )
+ A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) --- Setup the Landing methods + -- Setup the Landing methods A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) - A2ADispatcher:SetSquadronLanding( "Novo", AIA2ADISPATCHER.Landing.AtRunway )
+ A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) --- CAP Squadron execution. + -- CAP Squadron execution. CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) - A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
+ A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) + CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) 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 ) -CAPZoneMiddle = ZONE:New( "CAP Zone Middle") + CAPZoneMiddle = ZONE:New( "CAP Zone Middle") A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) - A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
+ A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) --- GCI Squadron execution. + -- GCI Squadron execution. A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 ) A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 ) - A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
+ A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 ) +This table contains the targets detected during patrol.
-Contains the counter how many units are currently alive
+Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.
+Overwrite unit names by default with group name.
+By default, no InitLimit
+When the first Spawn executes, all the Groups need to be made visible before start.
+Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.