mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge pull request #318 from FlightControl-Master/master-missions-rework
Master missions rework
This commit is contained in:
commit
fe3ffae01c
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -17,12 +17,12 @@
|
|||||||
-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base.
|
-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base.
|
||||||
|
|
||||||
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
||||||
local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
||||||
|
|
||||||
-- Define the SPAWN object for the red AI plane template.
|
-- Define the SPAWN object for the red AI plane template.
|
||||||
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
||||||
-- If a blocked plane exists, this red plane will be ReSpawned.
|
-- If a blocked plane exists, this red plane will be ReSpawned.
|
||||||
local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
||||||
|
|
||||||
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
||||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||||
|
|||||||
Binary file not shown.
@ -17,15 +17,15 @@
|
|||||||
-- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa.
|
-- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa.
|
||||||
|
|
||||||
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
||||||
local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
||||||
|
|
||||||
-- Define the SPAWN object for the red AI plane template.
|
-- Define the SPAWN object for the red AI plane template.
|
||||||
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
||||||
-- If a blocked plane exists, this red plane will be ReSpawned.
|
-- If a blocked plane exists, this red plane will be ReSpawned.
|
||||||
local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
||||||
|
|
||||||
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
||||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||||
|
|
||||||
local PatrolZones = {}
|
local PatrolZones = {}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -22,15 +22,15 @@
|
|||||||
|
|
||||||
|
|
||||||
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
||||||
local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
||||||
|
|
||||||
-- Define the SPAWN object for the red AI plane template.
|
-- Define the SPAWN object for the red AI plane template.
|
||||||
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
||||||
-- If a blocked plane exists, this red plane will be ReSpawned.
|
-- If a blocked plane exists, this red plane will be ReSpawned.
|
||||||
local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
||||||
|
|
||||||
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
||||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||||
|
|
||||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||||
|
|
||||||
@ -44,3 +44,4 @@ function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
|||||||
Patrol:__Start( 5 )
|
Patrol:__Start( 5 )
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -20,26 +20,26 @@
|
|||||||
-- 6. Ensure that you see the AI patrol in one of the two zones ...
|
-- 6. Ensure that you see the AI patrol in one of the two zones ...
|
||||||
|
|
||||||
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
||||||
local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
||||||
|
|
||||||
-- Define the SPAWN object for the red AI plane template.
|
-- Define the SPAWN object for the red AI plane template.
|
||||||
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
||||||
-- If a blocked plane exists, this red plane will be ReSpawned.
|
-- If a blocked plane exists, this red plane will be ReSpawned.
|
||||||
local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
||||||
|
|
||||||
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
||||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||||
|
|
||||||
-- Create the first polygon zone ...
|
-- Create the first polygon zone ...
|
||||||
local PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" )
|
PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" )
|
||||||
local PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
||||||
|
|
||||||
-- Create the second polygon zone ...
|
-- Create the second polygon zone ...
|
||||||
local PatrolZoneGroup2 = GROUP:FindByName( "PatrolZone2" )
|
PatrolZoneGroup2 = GROUP:FindByName( "PatrolZone2" )
|
||||||
local PatrolZone2 = ZONE_POLYGON:New( "PatrolZone2", PatrolZoneGroup2 )
|
PatrolZone2 = ZONE_POLYGON:New( "PatrolZone2", PatrolZoneGroup2 )
|
||||||
|
|
||||||
-- Now, create an array of these zones ...
|
-- Now, create an array of these zones ...
|
||||||
local PatrolZoneArray = { PatrolZone1, PatrolZone2 }
|
PatrolZoneArray = { PatrolZone1, PatrolZone2 }
|
||||||
|
|
||||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -19,19 +19,19 @@
|
|||||||
-- 2. Play with the InitCleanUp API of the SPAWN class, extende the amount of seconds to find the optimal setting.
|
-- 2. Play with the InitCleanUp API of the SPAWN class, extende the amount of seconds to find the optimal setting.
|
||||||
|
|
||||||
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
||||||
local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
||||||
|
|
||||||
-- Define the SPAWN object for the red AI plane template.
|
-- Define the SPAWN object for the red AI plane template.
|
||||||
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off.
|
||||||
-- If a blocked plane exists, this red plane will be ReSpawned.
|
-- If a blocked plane exists, this red plane will be ReSpawned.
|
||||||
local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 )
|
||||||
|
|
||||||
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
||||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||||
|
|
||||||
-- Create the first polygon zone ...
|
-- Create the first polygon zone ...
|
||||||
local PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" )
|
PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" )
|
||||||
local PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
||||||
|
|
||||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -26,7 +26,7 @@
|
|||||||
-- This zone array will be used in the AI_BALANCER to randomize the patrol
|
-- This zone array will be used in the AI_BALANCER to randomize the patrol
|
||||||
-- zone that each spawned group will patrol
|
-- zone that each spawned group will patrol
|
||||||
|
|
||||||
local RedPatrolZone = {}
|
RedPatrolZone = {}
|
||||||
RedPatrolZone[1] = ZONE:New( "RedPatrolZone1" )
|
RedPatrolZone[1] = ZONE:New( "RedPatrolZone1" )
|
||||||
RedPatrolZone[2] = ZONE:New( "RedPatrolZone2" )
|
RedPatrolZone[2] = ZONE:New( "RedPatrolZone2" )
|
||||||
RedPatrolZone[3] = ZONE:New( "RedPatrolZone3" )
|
RedPatrolZone[3] = ZONE:New( "RedPatrolZone3" )
|
||||||
@ -40,7 +40,7 @@ RedPatrolZone[6] = ZONE:New( "RedPatrolZone6" )
|
|||||||
-- with replacing any CLIENT created aircraft in the mission that a human
|
-- with replacing any CLIENT created aircraft in the mission that a human
|
||||||
-- player does not take.
|
-- player does not take.
|
||||||
|
|
||||||
local RU_PlanesSpawn = {}
|
RU_PlanesSpawn = {}
|
||||||
RU_PlanesSpawn[1] = SPAWN:New( "RU CAP Anapa AB" ):InitCleanUp( 45 )
|
RU_PlanesSpawn[1] = SPAWN:New( "RU CAP Anapa AB" ):InitCleanUp( 45 )
|
||||||
RU_PlanesSpawn[2] = SPAWN:New( "RU CAP Beslan AB" ):InitCleanUp( 45 )
|
RU_PlanesSpawn[2] = SPAWN:New( "RU CAP Beslan AB" ):InitCleanUp( 45 )
|
||||||
RU_PlanesSpawn[3] = SPAWN:New( "RU CAP Gelendzhik AB" ):InitCleanUp( 45 )
|
RU_PlanesSpawn[3] = SPAWN:New( "RU CAP Gelendzhik AB" ):InitCleanUp( 45 )
|
||||||
@ -62,7 +62,7 @@ RU_PlanesSpawn[11] = SPAWN:New( "RU CAP Novorossiysk AB" ):InitCleanUp( 45 )
|
|||||||
-- The code here does not need to be changed. Only an addition in the mission editor. An example
|
-- The code here does not need to be changed. Only an addition in the mission editor. An example
|
||||||
-- of this can be found on the USA side at Sochi AB.
|
-- of this can be found on the USA side at Sochi AB.
|
||||||
|
|
||||||
local RU_PlanesClientSet = {}
|
RU_PlanesClientSet = {}
|
||||||
RU_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Anapa AB")
|
RU_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Anapa AB")
|
||||||
RU_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Beslan AB")
|
RU_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Beslan AB")
|
||||||
RU_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Gelendzhik AB")
|
RU_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Gelendzhik AB")
|
||||||
@ -84,7 +84,7 @@ RU_PlanesClientSet[11] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Novorossiysk
|
|||||||
-- of them are included to pick randomly.
|
-- of them are included to pick randomly.
|
||||||
|
|
||||||
|
|
||||||
local RU_AI_Balancer = {}
|
RU_AI_Balancer = {}
|
||||||
for i=1, 11 do
|
for i=1, 11 do
|
||||||
RU_AI_Balancer[i] = AI_BALANCER:New(RU_PlanesClientSet[i], RU_PlanesSpawn[i])
|
RU_AI_Balancer[i] = AI_BALANCER:New(RU_PlanesClientSet[i], RU_PlanesSpawn[i])
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ end
|
|||||||
-- leader.
|
-- leader.
|
||||||
|
|
||||||
-- Create the Blue Patrol Zone Array
|
-- Create the Blue Patrol Zone Array
|
||||||
local BluePatrolZone = {}
|
BluePatrolZone = {}
|
||||||
BluePatrolZone[1] = ZONE:New( "BluePatrolZone1")
|
BluePatrolZone[1] = ZONE:New( "BluePatrolZone1")
|
||||||
BluePatrolZone[2] = ZONE:New( "BluePatrolZone2")
|
BluePatrolZone[2] = ZONE:New( "BluePatrolZone2")
|
||||||
BluePatrolZone[3] = ZONE:New( "BluePatrolZone3")
|
BluePatrolZone[3] = ZONE:New( "BluePatrolZone3")
|
||||||
@ -123,7 +123,7 @@ BluePatrolZone[6] = ZONE:New( "BluePatrolZone6")
|
|||||||
|
|
||||||
--United States CAP Aircraft (these are used as templates for AI)
|
--United States CAP Aircraft (these are used as templates for AI)
|
||||||
|
|
||||||
local US_PlanesSpawn = {}
|
US_PlanesSpawn = {}
|
||||||
US_PlanesSpawn[1] = SPAWN:New( "US CAP Batumi AB" ):InitCleanUp( 45 )
|
US_PlanesSpawn[1] = SPAWN:New( "US CAP Batumi AB" ):InitCleanUp( 45 )
|
||||||
US_PlanesSpawn[2] = SPAWN:New( "US CAP Gudauta AB" ):InitCleanUp( 45 )
|
US_PlanesSpawn[2] = SPAWN:New( "US CAP Gudauta AB" ):InitCleanUp( 45 )
|
||||||
US_PlanesSpawn[3] = SPAWN:New( "US CAP Kobuleti AB" ):InitCleanUp( 45 )
|
US_PlanesSpawn[3] = SPAWN:New( "US CAP Kobuleti AB" ):InitCleanUp( 45 )
|
||||||
@ -137,7 +137,7 @@ US_PlanesSpawn[10] = SPAWN:New( "US CAP Tbilisi AB" ):InitCleanUp( 45 )
|
|||||||
|
|
||||||
--United States Client Aircraft (via AI_BALANCER, AI will replace these if no human players are in the slot)
|
--United States Client Aircraft (via AI_BALANCER, AI will replace these if no human players are in the slot)
|
||||||
|
|
||||||
local US_PlanesClientSet = {}
|
US_PlanesClientSet = {}
|
||||||
US_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("US CLIENT Batumi AB")
|
US_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("US CLIENT Batumi AB")
|
||||||
US_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("US CLIENT Gudauta AB")
|
US_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("US CLIENT Gudauta AB")
|
||||||
US_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("US CLIENT Kobuleti AB")
|
US_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("US CLIENT Kobuleti AB")
|
||||||
@ -149,7 +149,7 @@ US_PlanesClientSet[8] = SET_CLIENT:New():FilterPrefixes("US CLIENT Sukhumi AB")
|
|||||||
US_PlanesClientSet[9] = SET_CLIENT:New():FilterPrefixes("US CLIENT Vaziani AB")
|
US_PlanesClientSet[9] = SET_CLIENT:New():FilterPrefixes("US CLIENT Vaziani AB")
|
||||||
US_PlanesClientSet[10] = SET_CLIENT:New():FilterPrefixes("US CLIENT Tbilisi AB")
|
US_PlanesClientSet[10] = SET_CLIENT:New():FilterPrefixes("US CLIENT Tbilisi AB")
|
||||||
|
|
||||||
local US_AI_Balancer = {}
|
US_AI_Balancer = {}
|
||||||
for i=1, 10 do
|
for i=1, 10 do
|
||||||
US_AI_Balancer[i] = AI_BALANCER:New( US_PlanesClientSet[i], US_PlanesSpawn[i] )
|
US_AI_Balancer[i] = AI_BALANCER:New( US_PlanesClientSet[i], US_PlanesSpawn[i] )
|
||||||
|
|
||||||
@ -160,4 +160,4 @@ for i=1, 10 do
|
|||||||
Patrol:SetControllable( AIGroup )
|
Patrol:SetControllable( AIGroup )
|
||||||
Patrol:Start()
|
Patrol:Start()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
@ -16,7 +16,7 @@ local CapPlane = GROUP:FindByName( "Plane" )
|
|||||||
|
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||||
|
|
||||||
AICapZone:SetControllable( CapPlane )
|
AICapZone:SetControllable( CapPlane )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -15,11 +15,11 @@
|
|||||||
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
|
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
|
||||||
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
|
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
|
||||||
|
|
||||||
local CapPlane = GROUP:FindByName( "Plane" )
|
CapPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||||
|
|
||||||
AICapZone:SetControllable( CapPlane )
|
AICapZone:SetControllable( CapPlane )
|
||||||
AICapZone:SetEngageRange( 20000 ) -- Set the Engage Range to 20.000 meters. The AI won't engage when the enemy is beyond 20.000 meters.
|
AICapZone:SetEngageRange( 20000 ) -- Set the Engage Range to 20.000 meters. The AI won't engage when the enemy is beyond 20.000 meters.
|
||||||
|
|||||||
Binary file not shown.
@ -16,15 +16,15 @@
|
|||||||
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
|
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
|
||||||
|
|
||||||
|
|
||||||
local CapPlane = GROUP:FindByName( "Plane" )
|
CapPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||||
|
|
||||||
local EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||||
|
|
||||||
local CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||||
|
|
||||||
AICapZone:SetControllable( CapPlane )
|
AICapZone:SetControllable( CapPlane )
|
||||||
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
||||||
|
|||||||
Binary file not shown.
@ -17,15 +17,15 @@
|
|||||||
-- 4. When it engages, it will abort the engagement after 1 minute.
|
-- 4. When it engages, it will abort the engagement after 1 minute.
|
||||||
|
|
||||||
|
|
||||||
local CapPlane = GROUP:FindByName( "Plane" )
|
CapPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||||
|
|
||||||
local EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||||
|
|
||||||
local CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||||
|
|
||||||
AICapZone:SetControllable( CapPlane )
|
AICapZone:SetControllable( CapPlane )
|
||||||
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
||||||
@ -39,4 +39,5 @@ end
|
|||||||
function AICapZone:OnAfterAbort(Controllable,From,Event,To)
|
function AICapZone:OnAfterAbort(Controllable,From,Event,To)
|
||||||
BASE:E("MISSION ABORTED! Returning to Patrol Zone!")
|
BASE:E("MISSION ABORTED! Returning to Patrol Zone!")
|
||||||
MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!")
|
MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -13,13 +13,13 @@
|
|||||||
-- 2. It should return to base when out of fuel.
|
-- 2. It should return to base when out of fuel.
|
||||||
--
|
--
|
||||||
|
|
||||||
local CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding()
|
CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding()
|
||||||
|
|
||||||
local CapGroup = CapSpawn:Spawn()
|
CapGroup = CapSpawn:Spawn()
|
||||||
|
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||||
|
|
||||||
AICapZone:SetControllable( CapGroup )
|
AICapZone:SetControllable( CapGroup )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -24,24 +24,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Plane" )
|
CASPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -25,24 +25,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Plane" )
|
CASPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -26,24 +26,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Plane" )
|
CASPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -24,24 +24,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Plane" )
|
CASPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -28,24 +28,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Plane" )
|
CASPlane = GROUP:FindByName( "Plane" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -26,24 +26,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Helicopter" )
|
CASPlane = GROUP:FindByName( "Helicopter" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -25,24 +25,24 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variable (in this case called CASPlane) and
|
-- Create a local variable (in this case called CASPlane) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||||
local CASPlane = GROUP:FindByName( "Helicopter" )
|
CASPlane = GROUP:FindByName( "Helicopter" )
|
||||||
|
|
||||||
-- Create a local Variable (in this cased called PatrolZone and
|
-- Create a local Variable (in this cased called PatrolZone and
|
||||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -28,26 +28,26 @@
|
|||||||
-- Create a local variable (in this case called CASEngagementZone) and
|
-- Create a local variable (in this case called CASEngagementZone) and
|
||||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||||
-- currently on the map and assign it to this variable
|
-- currently on the map and assign it to this variable
|
||||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||||
|
|
||||||
-- Create a local variables (in this case called CASPlane and CASHelicopters) and
|
-- Create a local variables (in this case called CASPlane and CASHelicopters) and
|
||||||
-- using the GROUP function find the aircraft group called "Plane" and "Helicopter" and assign to these variables
|
-- using the GROUP function find the aircraft group called "Plane" and "Helicopter" and assign to these variables
|
||||||
local CASPlane = GROUP:FindByName( "Plane" )
|
CASPlane = GROUP:FindByName( "Plane" )
|
||||||
local CASHelicopter = GROUP:FindByName( "Helicopter" )
|
CASHelicopter = GROUP:FindByName( "Helicopter" )
|
||||||
|
|
||||||
-- Create two patrol zones, one for the Planes and one for the Helicopters.
|
-- Create two patrol zones, one for the Planes and one for the Helicopters.
|
||||||
local PatrolZonePlanes = ZONE:New( "Patrol Zone Planes" )
|
PatrolZonePlanes = ZONE:New( "Patrol Zone Planes" )
|
||||||
local PatrolZoneHelicopters = ZONE:New( "Patrol Zone Helicopters" )
|
PatrolZoneHelicopters = ZONE:New( "Patrol Zone Helicopters" )
|
||||||
|
|
||||||
-- Create and object (in this case called AICasZone) and
|
-- Create and object (in this case called AICasZone) and
|
||||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||||
local AICasZonePlanes = AI_CAS_ZONE:New( PatrolZonePlanes, 400, 500, 500, 2500, CASEngagementZone )
|
AICasZonePlanes = AI_CAS_ZONE:New( PatrolZonePlanes, 400, 500, 500, 2500, CASEngagementZone )
|
||||||
local AICasZoneHelicopters = AI_CAS_ZONE:New( PatrolZoneHelicopters, 100, 250, 300, 1000, CASEngagementZone )
|
AICasZoneHelicopters = AI_CAS_ZONE:New( PatrolZoneHelicopters, 100, 250, 300, 1000, CASEngagementZone )
|
||||||
|
|
||||||
-- Create an object (in this case called Targets) and
|
-- Create an object (in this case called Targets) and
|
||||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||||
local Targets = GROUP:FindByName("Targets")
|
Targets = GROUP:FindByName("Targets")
|
||||||
|
|
||||||
|
|
||||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||||
|
|||||||
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
-- This call will make the Cargo run to the CargoCarrier.
|
-- This call will make the Cargo run to the CargoCarrier.
|
||||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||||
|
|||||||
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is.
|
-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is.
|
||||||
InfantryCargo:Load( CargoCarrier )
|
InfantryCargo:Load( CargoCarrier )
|
||||||
|
|||||||
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
||||||
|
|
||||||
local CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
||||||
|
|
||||||
-- This call will make the Cargo run to the CargoCarrier.
|
-- This call will make the Cargo run to the CargoCarrier.
|
||||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||||
|
|||||||
Binary file not shown.
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local CargoSet = SET_BASE:New()
|
CargoSet = SET_BASE:New()
|
||||||
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
||||||
|
|
||||||
local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
-- This call will make the Cargo run to the CargoCarrier.
|
-- This call will make the Cargo run to the CargoCarrier.
|
||||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||||
|
|||||||
Binary file not shown.
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local CargoSet = SET_BASE:New()
|
CargoSet = SET_BASE:New()
|
||||||
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
||||||
|
|
||||||
local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is.
|
-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is.
|
||||||
InfantryCargo:Load( CargoCarrier )
|
InfantryCargo:Load( CargoCarrier )
|
||||||
|
|||||||
Binary file not shown.
@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
local CargoSet = SET_BASE:New()
|
CargoSet = SET_BASE:New()
|
||||||
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
||||||
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
||||||
|
|
||||||
local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
||||||
|
|
||||||
local CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
||||||
|
|
||||||
-- This call will make the Cargo run to the CargoCarrier.
|
-- This call will make the Cargo run to the CargoCarrier.
|
||||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||||
|
|||||||
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
local DeliveryUnit = UNIT:FindByName( "Delivery" )
|
DeliveryUnit = UNIT:FindByName( "Delivery" )
|
||||||
local Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 )
|
Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
-- This call will make the Cargo run to the CargoCarrier.
|
-- This call will make the Cargo run to the CargoCarrier.
|
||||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||||
|
|||||||
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
-- This will Load the Cargo into the Carrier, regardless where the Cargo is.
|
-- This will Load the Cargo into the Carrier, regardless where the Cargo is.
|
||||||
InfantryCargo:Load( CargoCarrier )
|
InfantryCargo:Load( CargoCarrier )
|
||||||
|
|||||||
Binary file not shown.
@ -17,8 +17,8 @@
|
|||||||
-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second.
|
-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second.
|
||||||
-- 5. While driving in between the areas, it will have a separate area.
|
-- 5. While driving in between the areas, it will have a separate area.
|
||||||
|
|
||||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||||
|
|
||||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||||
|
|
||||||
FACDetection:__Start( 5 )
|
FACDetection:__Start( 5 )
|
||||||
Binary file not shown.
@ -16,16 +16,16 @@
|
|||||||
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
||||||
-- 2. Eventually all units should be detected by both JTAC.
|
-- 2. Eventually all units should be detected by both JTAC.
|
||||||
|
|
||||||
local RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||||
local RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||||
|
|
||||||
local HQ = GROUP:FindByName( "HQ" )
|
HQ = GROUP:FindByName( "HQ" )
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||||
|
|
||||||
local RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||||
|
|
||||||
local RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||||
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
||||||
|
|
||||||
RecceDetection1:Start()
|
RecceDetection1:Start()
|
||||||
@ -53,4 +53,4 @@ function RecceDetection2:OnAfterDetect(From,Event,To)
|
|||||||
local DetectionReport = RecceDetection2:DetectedReportDetailed()
|
local DetectionReport = RecceDetection2:DetectedReportDetailed()
|
||||||
|
|
||||||
HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" )
|
HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" )
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||||
|
|
||||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 )
|
FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 )
|
||||||
local SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||||
local DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||||
|
|
||||||
local FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection )
|
FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection )
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -16,18 +16,18 @@
|
|||||||
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
||||||
-- 2. Eventually all units should be detected by both JTAC.
|
-- 2. Eventually all units should be detected by both JTAC.
|
||||||
|
|
||||||
local RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||||
local RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||||
|
|
||||||
local HQ = GROUP:FindByName( "HQ" )
|
HQ = GROUP:FindByName( "HQ" )
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||||
|
|
||||||
local RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||||
|
|
||||||
local RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||||
|
|
||||||
local ForestZone = ZONE_POLYGON:New( "ForestZone", GROUP:FindByName( "ForestZone" ) )
|
ForestZone = ZONE_POLYGON:New( "ForestZone", GROUP:FindByName( "ForestZone" ) )
|
||||||
|
|
||||||
RecceDetection2:SetZoneProbability( { { ForestZone, 0.1 } } ) -- Set a 10% probability that a vehicle can be detected within the forest.
|
RecceDetection2:SetZoneProbability( { { ForestZone, 0.1 } } ) -- Set a 10% probability that a vehicle can be detected within the forest.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -16,13 +16,13 @@
|
|||||||
-- 1. Observe the detection reporting of both the Recce.
|
-- 1. Observe the detection reporting of both the Recce.
|
||||||
-- 2. Eventually all units should be detected by both Recce.
|
-- 2. Eventually all units should be detected by both Recce.
|
||||||
|
|
||||||
local RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||||
|
|
||||||
local HQ = GROUP:FindByName( "HQ" )
|
HQ = GROUP:FindByName( "HQ" )
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||||
|
|
||||||
local RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||||
|
|
||||||
RecceDetection:Start()
|
RecceDetection:Start()
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -18,13 +18,13 @@
|
|||||||
-- 1. Observe the detection reporting of both the Recce.
|
-- 1. Observe the detection reporting of both the Recce.
|
||||||
-- 2. Eventually all units should be detected by both Recce.
|
-- 2. Eventually all units should be detected by both Recce.
|
||||||
|
|
||||||
local RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||||
|
|
||||||
local HQ = GROUP:FindByName( "HQ" )
|
HQ = GROUP:FindByName( "HQ" )
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||||
|
|
||||||
local RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
||||||
|
|
||||||
RecceDetection:Start()
|
RecceDetection:Start()
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -16,17 +16,17 @@
|
|||||||
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
||||||
-- 2. Eventually all units should be detected by both JTAC.
|
-- 2. Eventually all units should be detected by both JTAC.
|
||||||
|
|
||||||
local RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||||
local RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||||
|
|
||||||
local HQ = GROUP:FindByName( "HQ" )
|
HQ = GROUP:FindByName( "HQ" )
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||||
|
|
||||||
local RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 )
|
RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 )
|
||||||
RecceDetection1:BoundDetectedZones()
|
RecceDetection1:BoundDetectedZones()
|
||||||
|
|
||||||
local RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 )
|
RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 )
|
||||||
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
||||||
RecceDetection1:BoundDetectedZones()
|
RecceDetection1:BoundDetectedZones()
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -21,9 +21,9 @@
|
|||||||
-- 5. While driving in between the areas, it will have a separate area.
|
-- 5. While driving in between the areas, it will have a separate area.
|
||||||
-- 6. Observe the correct removal or relocation of the ZONEs.
|
-- 6. Observe the correct removal or relocation of the ZONEs.
|
||||||
|
|
||||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||||
|
|
||||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||||
|
|
||||||
FACDetection:__Start( 5 )
|
FACDetection:__Start( 5 )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -16,14 +16,14 @@
|
|||||||
-- 2. When one Recce group detects a target, it will select an artillery unit and fire a missile.
|
-- 2. When one Recce group detects a target, it will select an artillery unit and fire a missile.
|
||||||
-- 3. This will run until all Recces have eliminated the targets.
|
-- 3. This will run until all Recces have eliminated the targets.
|
||||||
|
|
||||||
local RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart()
|
RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart()
|
||||||
local ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart()
|
ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart()
|
||||||
|
|
||||||
local HQ = GROUP:FindByName( "HQ" )
|
HQ = GROUP:FindByName( "HQ" )
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||||
|
|
||||||
local RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||||
RecceDetection:SetDetectionInterval( 5 )
|
RecceDetection:SetDetectionInterval( 5 )
|
||||||
|
|
||||||
RecceDetection:Start()
|
RecceDetection:Start()
|
||||||
|
|||||||
Binary file not shown.
@ -17,9 +17,9 @@
|
|||||||
-- 2. Observe the smoking of the units detected
|
-- 2. Observe the smoking of the units detected
|
||||||
-- 3. Observe the areas being flexibly changed very detection run.
|
-- 3. Observe the areas being flexibly changed very detection run.
|
||||||
|
|
||||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart()
|
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart()
|
||||||
|
|
||||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||||
|
|
||||||
|
|
||||||
FACDetection:__Start( 5 )
|
FACDetection:__Start( 5 )
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@
|
|||||||
-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging.
|
-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging.
|
||||||
-- 3. Check the contents of the fields of the S_EVENT_SHOT entry.
|
-- 3. Check the contents of the fields of the S_EVENT_SHOT entry.
|
||||||
|
|
||||||
local Plane = UNIT:FindByName( "Plane" )
|
Plane = UNIT:FindByName( "Plane" )
|
||||||
|
|
||||||
Plane:HandleEvent( EVENTS.Shot )
|
Plane:HandleEvent( EVENTS.Shot )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -13,9 +13,9 @@
|
|||||||
-- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging.
|
-- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging.
|
||||||
-- 3. Check the contents of the fields of the S_EVENT_HIT entry.
|
-- 3. Check the contents of the fields of the S_EVENT_HIT entry.
|
||||||
|
|
||||||
local Plane = UNIT:FindByName( "Plane" )
|
Plane = UNIT:FindByName( "Plane" )
|
||||||
|
|
||||||
local Tank = UNIT:FindByName( "Tank" )
|
Tank = UNIT:FindByName( "Tank" )
|
||||||
|
|
||||||
Plane:HandleEvent( EVENTS.Hit )
|
Plane:HandleEvent( EVENTS.Hit )
|
||||||
Tank:HandleEvent( EVENTS.Hit )
|
Tank:HandleEvent( EVENTS.Hit )
|
||||||
|
|||||||
Binary file not shown.
@ -13,9 +13,9 @@
|
|||||||
-- 2. When the planes take-off, observe the message being sent.
|
-- 2. When the planes take-off, observe the message being sent.
|
||||||
-- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file.
|
-- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file.
|
||||||
|
|
||||||
local PlaneAI = UNIT:FindByName( "PlaneAI" )
|
PlaneAI = UNIT:FindByName( "PlaneAI" )
|
||||||
|
|
||||||
local PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
||||||
|
|
||||||
PlaneAI:HandleEvent( EVENTS.Takeoff )
|
PlaneAI:HandleEvent( EVENTS.Takeoff )
|
||||||
PlaneHuman:HandleEvent( EVENTS.Takeoff )
|
PlaneHuman:HandleEvent( EVENTS.Takeoff )
|
||||||
|
|||||||
Binary file not shown.
@ -15,10 +15,10 @@
|
|||||||
-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file.
|
-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file.
|
||||||
|
|
||||||
-- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI".
|
-- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI".
|
||||||
local PlaneAI = UNIT:FindByName( "PlaneAI" )
|
PlaneAI = UNIT:FindByName( "PlaneAI" )
|
||||||
|
|
||||||
-- Create a SPAWN object to spawn a new plane once the hold one lands.
|
-- Create a SPAWN object to spawn a new plane once the hold one lands.
|
||||||
local SpawnPlane = SPAWN:New( "SpawnPlaneAI" )
|
SpawnPlane = SPAWN:New( "SpawnPlaneAI" )
|
||||||
|
|
||||||
-- Declare a new variable that will hold the new spawned SpawnPlaneAI
|
-- Declare a new variable that will hold the new spawned SpawnPlaneAI
|
||||||
local NewPlane
|
local NewPlane
|
||||||
|
|||||||
Binary file not shown.
@ -15,7 +15,7 @@
|
|||||||
-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file.
|
-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file.
|
||||||
|
|
||||||
-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman".
|
-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman".
|
||||||
local PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
||||||
|
|
||||||
-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else).
|
-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else).
|
||||||
PlaneHuman:HandleEvent( EVENTS.Crash )
|
PlaneHuman:HandleEvent( EVENTS.Crash )
|
||||||
|
|||||||
Binary file not shown.
@ -15,7 +15,7 @@
|
|||||||
-- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile.
|
-- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile.
|
||||||
-- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile.
|
-- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile.
|
||||||
|
|
||||||
local PlaneGroup = GROUP:FindByName( "Group Plane A" )
|
PlaneGroup = GROUP:FindByName( "Group Plane A" )
|
||||||
|
|
||||||
PlaneGroup:HandleEvent( EVENTS.Shot )
|
PlaneGroup:HandleEvent( EVENTS.Shot )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -15,7 +15,7 @@
|
|||||||
-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit.
|
-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit.
|
||||||
-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit.
|
-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit.
|
||||||
|
|
||||||
local TanksGroup = GROUP:FindByName( "Group Tanks A" )
|
TanksGroup = GROUP:FindByName( "Group Tanks A" )
|
||||||
|
|
||||||
TanksGroup:HandleEvent( EVENTS.Hit )
|
TanksGroup:HandleEvent( EVENTS.Hit )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -13,10 +13,10 @@
|
|||||||
-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging.
|
-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging.
|
||||||
-- 3. The generic EventHandler objects should receive the hit events.
|
-- 3. The generic EventHandler objects should receive the hit events.
|
||||||
|
|
||||||
local CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" )
|
CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" )
|
||||||
|
|
||||||
local EventHandler1 = EVENTHANDLER:New()
|
EventHandler1 = EVENTHANDLER:New()
|
||||||
local EventHandler2 = EVENTHANDLER:New()
|
EventHandler2 = EVENTHANDLER:New()
|
||||||
|
|
||||||
EventHandler1:HandleEvent( EVENTS.Hit )
|
EventHandler1:HandleEvent( EVENTS.Hit )
|
||||||
EventHandler2:HandleEvent( EVENTS.Hit )
|
EventHandler2:HandleEvent( EVENTS.Hit )
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user