Updated Moose.lua

This commit is contained in:
funkyfranky
2024-01-01 22:47:10 +00:00
parent f15138294b
commit 235e6f1a81
159 changed files with 7043 additions and 6992 deletions
@@ -1,51 +1,51 @@
---
-- Name: TAD-A2G-000 - AREAS - Detection test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
---
-- Name: TAD-A2G-000 - AREAS - Detection test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,52 +1,52 @@
---
-- Name: TAD-A2G-001 - AREAS - Destroy Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
---
-- Name: TAD-A2G-001 - AREAS - Destroy Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,66 +1,66 @@
---
-- Name: TAD-A2G-002 - AREAS - Task Success Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
--- Success Handler OnAfter for TaskDispatcher
-- @function [parent=#TaskDispatcher] OnAfterSuccess
-- @param #TaskDispatcher self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param Tasking.Task#TASK Task
function TaskDispatcher:OnAfterSuccess( From, Event, To, Task )
self:E( "Task Success!!!" )
end
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
---
-- Name: TAD-A2G-002 - AREAS - Task Success Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
--- Success Handler OnAfter for TaskDispatcher
-- @function [parent=#TaskDispatcher] OnAfterSuccess
-- @param #TaskDispatcher self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param Tasking.Task#TASK Task
function TaskDispatcher:OnAfterSuccess( From, Event, To, Task )
self:E( "Task Success!!!" )
end
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,50 +1,50 @@
-- Name: TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD
-- Author: FlightControl
-- Date Created: 05 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone.
-- While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task!
-- This is only applicable for AREA detections. Other detection methods won't have this dynamic.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
-- Name: TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD
-- Author: FlightControl
-- Date Created: 05 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone.
-- While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task!
-- This is only applicable for AREA detections. Other detection methods won't have this dynamic.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,50 +1,50 @@
-- Name: TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD
-- Author: FlightControl
-- Date Created: 05 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about a SEAD task, dispatched, that is split into a SEAD and CAS task, when units are moving away from the zone.
-- While the units are moving away, monitor if the task is correctly split into a SEAD and CAS task!
-- This is only applicable for AREA detections. Other detection methods won't have this dynamic.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
-- Name: TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD
-- Author: FlightControl
-- Date Created: 05 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about a SEAD task, dispatched, that is split into a SEAD and CAS task, when units are moving away from the zone.
-- While the units are moving away, monitor if the task is correctly split into a SEAD and CAS task!
-- This is only applicable for AREA detections. Other detection methods won't have this dynamic.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,52 +1,52 @@
-- Name: TAD-A2G-020 - AREAS - Remain BAI as a Player
-- Author: FlightControl
-- Date Created: 20 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS!
-- Jump into the helicopter. Fly to the blue targets. They won't fire at you.
-- The su-34 will detect the blue targets, but will report a BAI task, even if you are in the helicopter are near to the targets.
-- This is a very important aspect of BAI.
-- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
-- Name: TAD-A2G-020 - AREAS - Remain BAI as a Player
-- Author: FlightControl
-- Date Created: 20 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS!
-- Jump into the helicopter. Fly to the blue targets. They won't fire at you.
-- The su-34 will detect the blue targets, but will report a BAI task, even if you are in the helicopter are near to the targets.
-- This is a very important aspect of BAI.
-- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,52 +1,52 @@
-- Name: TAD-A2G-021 - AREAS - Remain BAI as AI
-- Author: FlightControl
-- Date Created: 20 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS!
-- Jump into the su-25T. The AI Helicopter Attack will fly to the detected blue targets. They won't fire at the helicopters.
-- The su-34 will detect the blue targets, but will report a BAI task, even if the AI helicopters is near the targets.
-- This is a very important aspect of BAI.
-- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
-- Name: TAD-A2G-021 - AREAS - Remain BAI as AI
-- Author: FlightControl
-- Date Created: 20 Dec 2017
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS!
-- Jump into the su-25T. The AI Helicopter Attack will fly to the detected blue targets. They won't fire at the helicopters.
-- The su-34 will detect the blue targets, but will report a BAI task, even if the AI helicopters is near the targets.
-- This is a very important aspect of BAI.
-- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High",
"This mission demonstrates the dynamic task dispatching for Air to Ground operations. " ..
"This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " ..
"While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " ..
"This is only applicable for AREA detections. Other detection methods won't have this dynamic.",
coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,34 +1,34 @@
-- Name: TAD-A2G-090 - AREAS - WWII - Reference Points
-- Author: FlightControl
-- Date Created: 17 Mar 2017
--
-- Test if the Command Center is working in WWII mode, and that it selects the closest Reference points for each target...
-- Join both tasks sequentially (abort when done), and see if the reference points are selected correctly, following the closest ref point logic.
--
-- 1. Join the Attack group of RED.
-- 2. Wait until the blue tank is detected.
-- 3. Three tasks will de defined, CAS and BAI tasks.
-- 4. Join each task using the radio menus.
-- 5. Observe that the correct WWII compatible reference points are shown.
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" )
CommandCenter:SetModeWWII()
CommandCenter:SetReferenceZones( "Village" )
local Mission = MISSION
:New( CommandCenter,
"Overlord",
"Primary",
"Join each task as a result of the detected targets reported. " ..
"Observe that the correct Targets are reported from the correct reference points! " ..
"\n1. Target #001 -> Village#Dziguri" ..
"\n2. Target #002 -> Village#Horshi" ..
"\n3. Target #003 -> Village#Machkhvareti"
, coalition.side.RED )
local RecceSet = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterCoalitions( "red" ):FilterStart()
local DetectionAreas = DETECTION_AREAS:New( RecceSet, 500 )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionAreas )
-- Name: TAD-A2G-090 - AREAS - WWII - Reference Points
-- Author: FlightControl
-- Date Created: 17 Mar 2017
--
-- Test if the Command Center is working in WWII mode, and that it selects the closest Reference points for each target...
-- Join both tasks sequentially (abort when done), and see if the reference points are selected correctly, following the closest ref point logic.
--
-- 1. Join the Attack group of RED.
-- 2. Wait until the blue tank is detected.
-- 3. Three tasks will de defined, CAS and BAI tasks.
-- 4. Join each task using the radio menus.
-- 5. Observe that the correct WWII compatible reference points are shown.
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" )
CommandCenter:SetModeWWII()
CommandCenter:SetReferenceZones( "Village" )
local Mission = MISSION
:New( CommandCenter,
"Overlord",
"Primary",
"Join each task as a result of the detected targets reported. " ..
"Observe that the correct Targets are reported from the correct reference points! " ..
"\n1. Target #001 -> Village#Dziguri" ..
"\n2. Target #002 -> Village#Horshi" ..
"\n3. Target #003 -> Village#Machkhvareti"
, coalition.side.RED )
local RecceSet = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterCoalitions( "red" ):FilterStart()
local DetectionAreas = DETECTION_AREAS:New( RecceSet, 500 )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionAreas )
@@ -0,0 +1,51 @@
---
-- Name: TAD-A2G-100 - TYPES - Detection Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_TYPES method, which groups detected targets into Unit Types that were detected.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_TYPES
:New( RecceSet ) -- The RecceSet will detect the enemies, and group them into unit types that were detected.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,35 +1,35 @@
---
-- Name: TAD-100 - A2G Task Dispatching DETECTION_AREAS
-- Author: FlightControl
-- Date Created: 06 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- FACA's and FAC's are patrolling around the battle zone, while detecting targets.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into zones.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- For test, each zone will have a circle of tyres, that are visible on the map too.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_TYPES:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
---
-- Name: TAD-100 - A2G Task Dispatching DETECTION_AREAS
-- Author: FlightControl
-- Date Created: 06 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- FACA's and FAC's are patrolling around the battle zone, while detecting targets.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into zones.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- For test, each zone will have a circle of tyres, that are visible on the map too.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_TYPES:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
@@ -1,64 +1,64 @@
---
-- Name: TAD-220 - A2G Task Dispatching per TYPE and SCORING
-- Author: FlightControl
-- Date Created: 20 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local DetectionTypes = DETECTION_TYPES:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionTypes )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
self:E( "I am in assigned ... " )
Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 50, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetScoreOnFail( "The task has failed completion!", 100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
---
-- Name: TAD-220 - A2G Task Dispatching per TYPE and SCORING
-- Author: FlightControl
-- Date Created: 20 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local DetectionTypes = DETECTION_TYPES:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionTypes )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
self:E( "I am in assigned ... " )
Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 50, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetScoreOnFail( "The task has failed completion!", 100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
end
@@ -1,51 +1,51 @@
---
-- Name: TAD-A2G-200 - UNITS - Detection Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_UNITS
:New( RecceSet ) -- The RecceSet will detect the enemies, and group them per detected unit.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
---
-- Name: TAD-A2G-200 - UNITS - Detection Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_UNITS
:New( RecceSet ) -- The RecceSet will detect the enemies, and group them per detected unit.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,50 +1,50 @@
---
-- Name: TAD-120 - A2G Task Dispatching DETECTION_UNITS
-- Author: FlightControl
-- Date Created: 13 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- FACA's and FAC's are patrolling around the battle field, while detecting targets.
-- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_UNITS:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
---
-- Name: TAD-120 - A2G Task Dispatching DETECTION_UNITS
-- Author: FlightControl
-- Date Created: 13 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- FACA's and FAC's are patrolling around the battle field, while detecting targets.
-- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_UNITS:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
end
@@ -1,64 +1,64 @@
---
-- Name: TAD-200 - A2G Task Dispatching with SCORING
-- Author: FlightControl
-- Date Created: 19 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_UNITS:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
---
-- Name: TAD-200 - A2G Task Dispatching with SCORING
-- Author: FlightControl
-- Date Created: 19 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_UNITS:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
end
@@ -1,65 +1,65 @@
---
-- Name: TAD-210 - A2G Task Dispatching #1 for AREAS and SCORING
-- Author: FlightControl
-- Date Created: 19 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_AREAS:New( FACSet, 400 )
FACAreas:BoundDetectedZones()
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
Task:SetScoreOnDestroy( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetPenaltyOnFailed( "The task has failed completion!", -100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
---
-- Name: TAD-210 - A2G Task Dispatching #1 for AREAS and SCORING
-- Author: FlightControl
-- Date Created: 19 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_AREAS:New( FACSet, 400 )
FACAreas:BoundDetectedZones()
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
Task:SetScoreOnDestroy( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetPenaltyOnFailed( "The task has failed completion!", -100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
end
@@ -1,65 +1,65 @@
---
-- Name: TAD-210 - A2G Task Dispatching for AREAS and SCORING
-- Author: FlightControl
-- Date Created: 19 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_AREAS:New( FACSet, 400 )
FACAreas:BoundDetectedZones()
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
---
-- Name: TAD-210 - A2G Task Dispatching for AREAS and SCORING
-- Author: FlightControl
-- Date Created: 19 Mar 2017
--
-- # Situation:
--
-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations.
--
-- # Test cases:
--
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
-- 3. Engage on a task and destroy a target. Check if scoring is given for that target.
-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given.
-- 5. Restart the mission, and crash into the ground, check if you can get penalties.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_AREAS:New( FACSet, 400 )
FACAreas:BoundDetectedZones()
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
--- @param #TaskDispatcher self
-- @param From
-- @param Event
-- @param To
-- @param Tasking.Task_A2G#TASK_A2G Task
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param #string PlayerName
function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit )
Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit )
Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit )
end
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission.
-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion
-- too early!
function Mission:OnBeforeComplete( From, Event, To )
local Group004 = GROUP:FindByName( "Target #004" )
if Group004:IsAlive() == false then
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
return true
end
return false
end
@@ -1,52 +1,52 @@
---
-- Name: TAD-A2G-001 - AREAS - Destroy Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
---
-- Name: TAD-A2G-001 - AREAS - Destroy Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Define the RecceSet that will detect the enemy.
local RecceSet = SET_GROUP
:New() -- Create the RecceSet, which is the set of groups detecting the enemy locations.
:FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce".
:FilterCoalitions("red") -- only the red coalition.
:FilterStart() -- Start the dynamic building of the set.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionAreas = DETECTION_AREAS
:New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius.
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
@@ -1,47 +1,47 @@
---
-- Name: TAD-A2G-001 - AREAS - Destroy Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionSetZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone Blue" } ):FilterOnce()
local DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.BLUE )
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionZones ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )
---
-- Name: TAD-A2G-001 - AREAS - Destroy Test
-- Author: FlightControl
-- Date Created: 15 Mar 2018
--
-- This mission demonstrates the dynamic task dispatching for Air to Ground operations.
-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations.
-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas.
-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players.
-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce.
-- Observe that A2G Tasks are being dispatched to the player.
-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets.
-- Join the A2G Task that was dispatched to you.
-- Once the AI in your group destroys the target, you should see that the A2G task got success.
-- Declare the Command Center
local HQ = GROUP
:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" ) -- Create the CommandCenter.
-- Declare the Mission for the Command Center.
local Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission.
-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies.
local DetectionSetZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone Blue" } ):FilterOnce()
local DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.BLUE )
-- Setup the AttackSet, which is a SET_GROUP.
-- The SET_GROUP is a dynamic collection of GROUP objects.
local AttackSet = SET_GROUP
:New() -- Create the SET_GROUP object.
:FilterCoalitions( "red" ) -- Only incorporate the RED coalitions.
:FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack.
:FilterStart() -- Start the dynamic building of the set.
-- Now we have everything to setup the main A2G TaskDispatcher.
TaskDispatcher = TASK_A2G_DISPATCHER
:New( Mission, AttackSet, DetectionZones ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher.
-- We use the MISSILETRAINER for demonstration purposes.
MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." )