mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2025-08-15 10:37:46 +00:00
Next step of folder restructure
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
Clean = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Batumi )
|
||||
Clean:SetCleanMissiles( false )
|
||||
|
||||
|
||||
SpawnRU = SPAWN:New( 'RU Attack Heli Batumi'):InitLimit( 2, 120 ):SpawnScheduled( 10, 0 )
|
||||
|
||||
SpawnUS = SPAWN:New( 'US Attack Heli Batumi'):InitLimit( 2, 120 ):SpawnScheduled( 10, 0 )
|
||||
|
||||
SpawnTransport = SPAWN:New( "US Transport"):SpawnScheduled( 90, 0 )
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,43 @@
|
||||
---
|
||||
-- Name: DES-010 - Designation of AREAS - Threat Level Prioritization
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped in AREAs.
|
||||
--
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
-- This test is about the prioritization. First the SAMs should be designated, then the rest.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- - Check if the SAMs are designated first.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 )
|
||||
|
||||
-- Create a Attack Set, which contains the human player client slots and CA vehicles.
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- This sets the threat level prioritization on
|
||||
RecceDesignation:SetThreatLevelPrioritization( true )
|
||||
|
||||
-- Set the possible laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase with %d for Su-25T" )
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase with %d for A-10A" )
|
||||
|
||||
-- Start the detection process in 5 seconds.
|
||||
RecceDesignation:__Detect( -5 )
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
---
|
||||
-- Name: DES-011 - Designation of AREAS - Empty Set with Threat Levels
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 15 May 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped in AREAs.
|
||||
--
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
-- This test is about not failing the process when the Detected Set is empty, and the LaseOn is activated ...
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- - Check nothing is detected, and put lase on.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 )
|
||||
|
||||
-- Create a Attack Set, which contains the human player client slots and CA vehicles.
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- This sets the threat level prioritization on
|
||||
RecceDesignation:SetThreatLevelPrioritization( true )
|
||||
|
||||
-- Set the possible laser codes.
|
||||
RecceDesignation:SetLaserCodes({1113,1131,1256})
|
||||
|
||||
-- Start the detection process in 5 seconds.
|
||||
RecceDesignation:__Detect( -5 )
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
---
|
||||
-- Name: DES-010 - Designation of AREAS - Threat Level Prioritization
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped in AREAs.
|
||||
--
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
-- This test is about the prioritization. First the SAMs should be designated, then the rest.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- - Check if the SAMs are designated first.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 )
|
||||
|
||||
-- Create a Attack Set, which contains the human player client slots and CA vehicles.
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- This sets the threat level prioritization on
|
||||
RecceDesignation:SetThreatLevelPrioritization( true )
|
||||
|
||||
-- Set the possible laser codes.
|
||||
RecceDesignation:SetLaserCodes({1113,1131,1256})
|
||||
|
||||
-- Start the detection process in 5 seconds.
|
||||
RecceDesignation:__Detect( -5 )
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
-- Name: DES-020 - Designation of AREAS - Status Menu Flash Activate
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped in AREAs.
|
||||
--
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
-- This test is about the prioritization. First the SAMs should be designated, then the rest.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- - Check if the SAMs are designated first.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 )
|
||||
|
||||
-- Create a Attack Set, which contains the human player client slots and CA vehicles.
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- This sets the current status menu flashing on
|
||||
RecceDesignation:SetFlashStatusMenu( true )
|
||||
|
||||
-- Set the possible laser codes.
|
||||
RecceDesignation:SetLaserCodes({1113,1131,1256})
|
||||
|
||||
-- Start the detection process in 5 seconds.
|
||||
RecceDesignation:__Detect( -5 )
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
-- Name: DES-100 - UNITS - Night Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 23 Apr 2017
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped per detected UNIT.
|
||||
-- So each DetectedItem contains one detected unit only.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target.
|
||||
-- - Check that when you illuminate a target group, that the target area gets illuminated after a while.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
-- Name: DES-101 - UNITS - Day Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Mar 2018
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped per detected UNIT.
|
||||
-- So each DetectedItem contains one detected unit only.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target.
|
||||
-- - Check that when you smoke a target, that a smoke appears at the target.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
-- Name: DES-101 - UNITS - Day Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Mar 2018
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped per detected UNIT.
|
||||
-- So each DetectedItem contains one detected unit only.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target.
|
||||
-- - Check that when you smoke a target, that a smoke appears at the target.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
-- Name: DES-200 - AREAS - Night Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 23 Apr 2017
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped in AREAs.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target.
|
||||
-- - Check that when you illuminate a target group, that the target area gets illuminated after a while.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
-- Name: DES-201 - AREAS - Day Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 23 Apr 2017
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped in AREAs.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target.
|
||||
-- - Check that when you smoke a target, that a smoke appears at the target.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
-- Name: DES-300 - TYPES - Night Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 23 Apr 2017
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped per TYPES of the detected units.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target.
|
||||
-- - Check that when you illuminate a target group, that the target area gets illuminated after a while.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
-- Name: DES-301 - TYPES - Day Test
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Mar 2018
|
||||
--
|
||||
-- Demonstrates the designation of units, which are grouped per TYPES of the detected units.
|
||||
-- A Set of Recce are detecting a large group of units.
|
||||
--
|
||||
-- - Wait until all units are detected by the recce. A report should appear.
|
||||
-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation.
|
||||
-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu.
|
||||
-- - If a target group is not lased, it should start with "Designate".
|
||||
-- - If a target group is lased, the menu should start with "Lasing".
|
||||
-- - If a target group is smoked, the menu should start with "Smoking".
|
||||
-- - If a target group is illuminated, the menu should start with "Illuminating".
|
||||
-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key).
|
||||
-- - With FLIR activated in a ground vehicle, search for the laser beams.
|
||||
-- - Watch the laser beams alternate as targets are being detected or not detected...
|
||||
-- The Recce will try to lase as many targets as possible,
|
||||
-- but only for those targets to be lased,
|
||||
-- and until sufficient laser codes are available.
|
||||
-- - While the target group is lased, check if the available Recce are lasing the most possible targets.
|
||||
-- - Check if all laser codes are being used, but not twice.
|
||||
-- - Check if once a target has been destoyed, that after a while a Recce selects a new target.
|
||||
-- - Check that if all targets are destroyed, that the Recce reports that.
|
||||
-- - Check that while a Recce is lasing a target, that it is marking the target.
|
||||
-- - Check that when you deactive the lasing, that the Recce report the deactivation.
|
||||
-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target.
|
||||
-- - Check that when you smoke a target, that a smoke appears at the target.
|
||||
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters.
|
||||
RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
||||
|
||||
-- Create a
|
||||
AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart()
|
||||
|
||||
-- Setup Designation for the AttackSet.
|
||||
RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet )
|
||||
|
||||
-- Generate the random laser codes.
|
||||
RecceDesignation:GenerateLaserCodes()
|
||||
|
||||
-- The su-25T uses a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1113. A special menu option will be added that allows to lase with 1113.
|
||||
RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" )
|
||||
|
||||
-- The A-10A etc use a specific laser code to guide its laser guides rockets.
|
||||
-- The code is 1680. A special menu option will be added that allows to lase with 1680.
|
||||
RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
---
|
||||
-- Name: DET-001 - Detection Areas
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 04 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A small blue vehicle with laser detection methods is detecting targets.
|
||||
-- Targets are grouped within areas. A detection range and zone range is given to group the detected units.
|
||||
-- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the flaring of the areas formed
|
||||
-- 2. Observe the smoking of the units detected
|
||||
-- 3. Observe the areas being flexibly changed very detection run.
|
||||
-- 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.
|
||||
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
---
|
||||
-- Name: DET-001 - Detection Areas
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 04 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A small blue vehicle with laser detection methods is detecting targets.
|
||||
-- Targets are grouped within areas. A detection range and zone range is given to group the detected units.
|
||||
-- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the flaring of the areas formed
|
||||
-- 2. Observe the smoking of the units detected
|
||||
-- 3. Observe the areas being flexibly changed very detection run.
|
||||
-- 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.
|
||||
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
Binary file not shown.
@@ -0,0 +1,56 @@
|
||||
---
|
||||
-- Name: DET-100 - Detection Probability Distance
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 04 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the DistanceProbability factor during the detection of units.
|
||||
--
|
||||
-- Two JTAC are detecting 4 units, which are 10 km away.
|
||||
-- The first JTAC has no DistanceProbability set.
|
||||
-- The second JTAC has a DistanceProbability set.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 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.
|
||||
|
||||
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||
|
||||
RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
||||
|
||||
RecceDetection1:Start()
|
||||
RecceDetection2:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection1:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = RecceDetection1:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No distance Probability" )
|
||||
end
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection2:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = RecceDetection2:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" )
|
||||
end
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 )
|
||||
SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||
DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||
|
||||
FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection )
|
||||
Binary file not shown.
@@ -0,0 +1,62 @@
|
||||
---
|
||||
-- Name: DET-120 - Detection Probability Zones
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 04 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the DistanceProbability factor during the detection of units.
|
||||
--
|
||||
-- Two JTAC are detecting 4 units, which are 10 km away.
|
||||
-- The first JTAC has no DistanceProbability set.
|
||||
-- The second JTAC has a DistanceProbability set.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 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.
|
||||
|
||||
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||
|
||||
RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||
|
||||
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.
|
||||
|
||||
|
||||
RecceDetection1:Start()
|
||||
RecceDetection2:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection1:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No Zone Probability" )
|
||||
end
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection2:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Forest Zone Probability" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
---
|
||||
-- Name: DET-200 - Detection UNITS
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the detection of units.
|
||||
--
|
||||
-- A Set of Recce are detecting a large group of units, which are 5 km away.
|
||||
-- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve.
|
||||
-- The enemy is approaching.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the detection reporting of both the Recce.
|
||||
-- 2. Eventually all units should be detected by both Recce.
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
self:E("Detect")
|
||||
|
||||
local DetectionReport = RecceDetection:DetectedReportDetailed()
|
||||
|
||||
CC:MessageToAll( DetectionReport, 15, "" )
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,43 @@
|
||||
---
|
||||
-- Name: DET-201 - Detection UNITS - Air
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 03 May 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the detection of units.
|
||||
--
|
||||
-- A Set of Recce are detecting a approaching airplanes.
|
||||
-- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve.
|
||||
-- The enemy is approaching.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the detection reporting of both the Recce.
|
||||
-- 2. Eventually all units should be detected by both Recce.
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
RecceDetection:InitDetectRadar(true)
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
self:E("Detect")
|
||||
|
||||
local DetectionReport = RecceDetection:DetectedReportDetailed()
|
||||
|
||||
CC:MessageToAll( DetectionReport, 15, "" )
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
---
|
||||
-- Name: DET-210 - Detection TYPES
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the detection of units.
|
||||
--
|
||||
-- A Set of Recce are detecting a large group of units, which are 5 km away.
|
||||
-- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve.
|
||||
-- The enemy is approaching.
|
||||
--
|
||||
-- The blue Recce will report the detected units grouped per vehicle type!
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the detection reporting of both the Recce.
|
||||
-- 2. Eventually all units should be detected by both Recce.
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = RecceDetection:DetectedReportDetailed()
|
||||
|
||||
CC:MessageToAll( DetectionReport, 15, "" )
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
---
|
||||
-- Name: DET-100 - Detection Probability Distance
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 04 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the DistanceProbability factor during the detection of units.
|
||||
--
|
||||
-- Two JTAC are detecting 4 units, which are 10 km away.
|
||||
-- The first JTAC has no DistanceProbability set.
|
||||
-- The second JTAC has a DistanceProbability set.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 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.
|
||||
|
||||
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 )
|
||||
RecceDetection1:BoundDetectedZones()
|
||||
|
||||
RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 )
|
||||
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
||||
RecceDetection1:BoundDetectedZones()
|
||||
|
||||
RecceDetection1:Start()
|
||||
RecceDetection2:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection1:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = RecceDetection1:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No distance Probability" )
|
||||
end
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection2:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = RecceDetection2:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" )
|
||||
end
|
||||
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
---
|
||||
-- Name: DET-255 - Detection AEAS with Destroys
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 06 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A small blue vehicle with laser detection methods is detecting targets.
|
||||
-- Targets are grouped within areas. A detection range and zone range is given to group the detected units.
|
||||
-- This demo will group red vehicles in areas. One vehicle is diving from one group to the other.
|
||||
-- After 30 seconds, one vehicle is destroyed in a zone.
|
||||
-- After 60 seconds, a vehicle is destroyed that is a leader of a zone.
|
||||
-- After 90 seconds, all vehicles are destroyed in a zone.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the flaring of the areas formed
|
||||
-- 2. Observe the smoking of the units detected
|
||||
-- 3. Observe the areas being flexibly changed very detection run.
|
||||
-- 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.
|
||||
-- 6. Observe the correct removal or relocation of the ZONEs.
|
||||
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
|
||||
SCHEDULER:New( nil,function()
|
||||
local Target = UNIT:FindByName( "Target #004")
|
||||
Target:Destroy()
|
||||
end, {}, 30
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,function()
|
||||
local Target = UNIT:FindByName( "Target #006")
|
||||
Target:Destroy()
|
||||
end, {}, 60
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,function()
|
||||
local Target = UNIT:FindByName( "Target #007")
|
||||
Target:Destroy()
|
||||
end, {}, 90
|
||||
)
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
---
|
||||
-- Name: DET-300 - Dectection Filter AIRPLANE
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the filtering of detections.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the reporting only detecting the airplane, not the other units.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.AIRPLANE )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
---
|
||||
-- Name: DET-301 - Dectection Filter GROUND_UNIT
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the filtering of detections.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the reporting only detecting the ground unit, not the other units.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.GROUND_UNIT )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
---
|
||||
-- Name: DET-302 - Dectection Filter HELICOPTER
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the filtering of detections.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the reporting only detecting the helicopter, not the other units.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.HELICOPTER )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
---
|
||||
-- Name: DET-303 - Dectection Filter SHIP
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the filtering of detections.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the reporting only detecting the ship, not the other units.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.SHIP )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
---
|
||||
-- Name: DET-304 - Dectection Filter STRUCTURE
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the filtering of detections.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the reporting only detecting the structure, not the other units.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.STRUCTURE )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
collectgarbage()
|
||||
Binary file not shown.
@@ -0,0 +1,44 @@
|
||||
---
|
||||
-- Name: DET-305 - Dectection Filter ALL
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Apr 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the filtering of detections.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the reporting detecting all the units regardless of the type.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS
|
||||
:New( SetGroup )
|
||||
:FilterCategories( {
|
||||
Unit.Category.AIRPLANE,
|
||||
Unit.Category.GROUND_UNIT,
|
||||
Unit.Category.HELICOPTER,
|
||||
Unit.Category.SHIP,
|
||||
Unit.Category.STRUCTURE
|
||||
} )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
---
|
||||
-- Name: DET-310 - EWR - Line Of Sight
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Sep 2018
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the lost of line of sight using an airplane.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS
|
||||
:New( SetGroup )
|
||||
:FilterCategories( {
|
||||
Unit.Category.AIRPLANE,
|
||||
Unit.Category.GROUND_UNIT,
|
||||
Unit.Category.HELICOPTER,
|
||||
Unit.Category.SHIP,
|
||||
Unit.Category.STRUCTURE
|
||||
} )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
---
|
||||
-- Name: DET-310 - EWR - Line Of Sight
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Sep 2018
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the lost of line of sight using an airplane.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_AREAS
|
||||
:New( SetGroup, 1500 )
|
||||
:FilterCategories( { Unit.Category.AIRPLANE } )
|
||||
:InitDetectRWR(true)
|
||||
|
||||
local Zones = {
|
||||
ZONE:New( "Zone1" ),
|
||||
ZONE:New( "Zone2" )
|
||||
}
|
||||
|
||||
local Sams = {
|
||||
GROUP:FindByName( "SAM1" ),
|
||||
GROUP:FindByName( "SAM2" )
|
||||
}
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event DetectedItem.
|
||||
-- @param RecceDetection self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
|
||||
function RecceDetection:OnAfterDetectedItem(From,Event,To,DetectedItem)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
|
||||
if DetectedItem.IsDetected then
|
||||
local Coordinate = DetectedItem.Coordinate -- Core.Point#COORDINATE
|
||||
for ZoneID, ZoneData in pairs( Zones ) do
|
||||
local Zone = ZoneData -- Core.Zone#ZONE
|
||||
if Zone:IsCoordinateInZone(Coordinate) then
|
||||
Sams[ZoneID]:Activate()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,49 @@
|
||||
---
|
||||
-- Name: DET-310 - EWR - Line Of Sight
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Sep 2018
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the lost of line of sight using an airplane.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_AREAS
|
||||
:New( SetGroup, 1500 )
|
||||
:FilterCategories( { Unit.Category.AIRPLANE } )
|
||||
--:InitDetectVisual( true )
|
||||
:InitDetectIRST( true )
|
||||
:InitDetectRadar( true )
|
||||
:InitDetectRWR( true )
|
||||
:InitDetectOptical( true )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
_SETTINGS:SetA2A_BRAA()
|
||||
_SETTINGS:SetA2G_BR()
|
||||
|
||||
--- OnAfter Transition Handler for Event DetectedItem.
|
||||
-- @param Functional.Detection#DETECTION_AREAS RecceDetection self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
|
||||
function RecceDetection:OnAfterDetectedItem(From,Event,To,DetectedItem)
|
||||
|
||||
local DetectionReport = self:DetectedReportDetailed( SetGroup:GetFirst() )
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection" )
|
||||
|
||||
if DetectedItem.IsDetected then
|
||||
local Coordinate = DetectedItem.Coordinate -- Core.Point#COORDINATE
|
||||
HQ:MessageToAll( "Detected", 15, "Detection" )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
garbagecollect()
|
||||
Binary file not shown.
@@ -0,0 +1,70 @@
|
||||
---
|
||||
-- Name: DET-500 - Handle Detected Event - Govern Artillery Demo
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Demonstrates the detection of units.
|
||||
--
|
||||
-- A Set of Recces are detecting a large group of units, which are 5 km away.
|
||||
-- Once the Recces detect the enemy, the artilley units are controlled and will fire a missile to the target.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the detected reporting of the recces.
|
||||
-- 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.
|
||||
|
||||
RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart()
|
||||
ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart()
|
||||
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
RecceDetection:SetRefreshTimeInterval( 5 )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function RecceDetection:OnAfterDetect(From,Event,To)
|
||||
|
||||
local DetectionReport = RecceDetection:DetectedReportDetailed()
|
||||
|
||||
CC:GetPositionable():MessageToAll( DetectionReport, 15, "" )
|
||||
end
|
||||
|
||||
local ArtilleryTime = {}
|
||||
local ArtilleryAim = 180
|
||||
|
||||
--- OnAfter Transition Handler for Event Detect.
|
||||
-- @param Functional.Detection#DETECTION_UNITS self
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
-- @param Wrapper.Unit#UNIT DetectedUnits
|
||||
function RecceDetection:OnAfterDetected( From, Event, To, DetectedUnits )
|
||||
self:E( { From, Event, To, DetectedUnits } )
|
||||
|
||||
for DetectedUnitID, DetectedUnit in pairs( DetectedUnits ) do
|
||||
local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT
|
||||
local Artillery = ArtillerySetGroup:GetRandom() -- Wrapper.Group#GROUP
|
||||
|
||||
if ArtilleryTime[Artillery] and ArtilleryTime[Artillery] <= timer.getTime() - ArtilleryAim then
|
||||
ArtilleryTime[Artillery] = nil
|
||||
end
|
||||
|
||||
if not ArtilleryTime[Artillery] then
|
||||
local Task = Artillery:TaskFireAtPoint( DetectedUnit:GetVec2(), 500, 4 ) -- Fire 2 rockets to the target point.
|
||||
Artillery:SetTask( Task, 0.5 )
|
||||
ArtilleryTime[Artillery] = timer.getTime()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
---
|
||||
-- Name: DET-600 - Detection Zones
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 15 Mar 2019
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- 2 trigger zones are defined using the mission editor.
|
||||
-- The detection algorithm will detect the units within the zones and report them.
|
||||
|
||||
|
||||
DetectionSetZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone" } ):FilterOnce()
|
||||
|
||||
DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.RED ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
DetectionZones:__Start( 5 )
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
---
|
||||
-- Name: DET-600 - Detection Zones
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 15 Mar 2019
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- 2 trigger zones are defined using the mission editor.
|
||||
-- The detection algorithm will detect the units within the zones and report them.
|
||||
|
||||
|
||||
DetectionSetZones = SET_ZONE_GOAL:New():FilterPrefixes( { "Detection Zone" } ):FilterStart()
|
||||
|
||||
DetectionZone1 = ZONE_CAPTURE_COALITION:New( ZONE:New( "Detection Zone 1" ), coalition.side.RED )
|
||||
|
||||
DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.RED ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
DetectionZones:__Start( 5 )
|
||||
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
---
|
||||
-- Name: DET-900 - Detection Test with RED FACA
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 06 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A red FACA is detecting targets while airborne.
|
||||
-- Targets are grouped within areas. A detection range and zone range is given to group the detected units.
|
||||
-- This demo will group blue vehicles in areas.
|
||||
-- Upon the detection capabilities of the red FACA, the blue vehicles will be grouped when detected.
|
||||
-- All blue vehicles have ROE on hold.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the tyres put around the detected areas formed
|
||||
-- 2. Observe the smoking of the units detected
|
||||
-- 3. Observe the areas being flexibly changed very detection run.
|
||||
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart()
|
||||
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
Binary file not shown.
@@ -0,0 +1,89 @@
|
||||
---
|
||||
-- Name: ESC-001 - Escorting Helicopters
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Your client helicopter is flying in the battle field.
|
||||
-- It is escorted by an MI-28N, which you can command...
|
||||
-- Use the menu options to:
|
||||
-- - Make the escort follow you.
|
||||
-- - Report detected targets.
|
||||
-- - Attack targets
|
||||
-- - Flare
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. When executing the commands, observe the MI-28N reactions.
|
||||
|
||||
do
|
||||
local function EventAliveHelicopter( Client )
|
||||
local EscortGroupHeli1 = SpawnEscortHeli:ReSpawn(1)
|
||||
local EscortHeli1 = ESCORT
|
||||
:New( Client, EscortGroupHeli1, "Escort Helicopter" )
|
||||
:MenuFollowAt( 100 )
|
||||
:MenuFollowAt( 200 )
|
||||
:MenuHoldAtEscortPosition( 20, 10, "Hold at %d meters for %d seconds" )
|
||||
:MenuHoldAtLeaderPosition( 120 )
|
||||
:MenuFlare( "Disperse Flares" )
|
||||
:MenuSmoke()
|
||||
:MenuReportTargets( 60, 20 )
|
||||
:MenuResumeMission()
|
||||
:MenuROE()
|
||||
:MenuAssistedAttack()
|
||||
|
||||
EscortHeli1:SetDetection( EscortHeliDetection )
|
||||
|
||||
local EscortGroupArtillery = SpawnEscortArtillery:ReSpawn(1)
|
||||
local EscortArtillery = ESCORT
|
||||
:New( Client, EscortGroupArtillery, "Escort Artillery" )
|
||||
:Menus()
|
||||
end
|
||||
|
||||
local function EventAlivePlane( Client )
|
||||
local EscortGroupPlane2 = SpawnEscortPlane:ReSpawn(1)
|
||||
local EscortPlane2 = ESCORT
|
||||
:New( Client, EscortGroupPlane2, "Escort Test Plane" )
|
||||
:MenuFollowAt( 100 )
|
||||
:MenuFollowAt( 200 )
|
||||
:MenuHoldAtEscortPosition( 20, 10, "Hold at %d meters for %d seconds" )
|
||||
:MenuHoldAtLeaderPosition( 120 )
|
||||
:MenuFlare( "Disperse Flares" )
|
||||
:MenuSmoke()
|
||||
:MenuReportTargets( 60, 20 )
|
||||
:MenuResumeMission()
|
||||
:MenuAssistedAttack()
|
||||
:MenuROE()
|
||||
:MenuEvasion()
|
||||
|
||||
local EscortGroupGround2 = SpawnEscortGround:ReSpawn(1)
|
||||
local EscortGround2 = ESCORT
|
||||
:New( Client, EscortGroupGround2, "Test Ground" )
|
||||
:Menus()
|
||||
|
||||
local EscortGroupShip2 = SpawnEscortShip:ReSpawn(1)
|
||||
local EscortShip2 = ESCORT
|
||||
:New( Client, EscortGroupShip2, "Test Ship" )
|
||||
:Menus()
|
||||
end
|
||||
|
||||
SpawnEscortHeli = SPAWN:New( "Escort Helicopter" )
|
||||
SpawnEscortPlane = SPAWN:New( "Escort Plane" )
|
||||
SpawnEscortGround = SPAWN:New( "Escort Ground" )
|
||||
SpawnEscortShip = SPAWN:New( "Escort Ship" )
|
||||
SpawnEscortArtillery = SPAWN:New( "Ground Attack Assistance" )
|
||||
|
||||
EscortHeliSetGroup = SET_GROUP:New():FilterPrefixes("Escort Helicopter"):FilterStart()
|
||||
EscortHeliDetection = DETECTION_AREAS:New( EscortHeliSetGroup, 1000, 500 )
|
||||
|
||||
EscortHeliDetection:BoundDetectedZones()
|
||||
EscortHeliDetection:SetRefreshTimeInterval( 15 )
|
||||
|
||||
EscortClientHeli = CLIENT:FindByName( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter )
|
||||
EscortClientPlane = CLIENT:FindByName( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." )
|
||||
:Alive( EventAlivePlane )
|
||||
|
||||
end
|
||||
|
||||
env.info( "Test Mission loaded" )
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
--
|
||||
-- #MANTIS
|
||||
-- Moose derived Modular, Automatic and Network capable Targeting and Interception System.
|
||||
-- Controls a network of SAM sites. Use detection to switch on the AA site closest to the enemy.
|
||||
-- Leverage evasiveness from @{Functional.Sead#SEAD}.
|
||||
-- Leverage attack range setup added by DCS in 11/20.
|
||||
-- @usage
|
||||
-- Set up your SAM sites in the mission editor. Name the groups with common prefix like "Red SAM".
|
||||
-- Set up your EWR system in the mission editor. Name the groups with common prefix like "Red EWR". Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc.
|
||||
-- [optional] Set up your HQ. Can be any group, e.g. a command vehicle.
|
||||
--
|
||||
-- Start up your MANTIS
|
||||
--
|
||||
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR",nil,"red",false)
|
||||
|
||||
myredmantis:Start()
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- MTS-100 - MANTIS - Autorelocate HQ and EWR
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
|
||||
--
|
||||
-- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 16 Dec 20
|
||||
-- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available
|
||||
-- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html
|
||||
-------------------------------------------------------------------------
|
||||
-- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters.
|
||||
-- HQ and EWR will randomly relocate between 30 and 60 mins
|
||||
-- The SA 11 Radar will only relocate if not detected units are in range
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: 17 Dec 2020
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",false)
|
||||
myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS!
|
||||
myredmantis:Debug(true)
|
||||
myredmantis.verbose = true
|
||||
myredmantis:Start()
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- MTS-100 - MANTIS - Autorelocate HQ and EWR
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
|
||||
--
|
||||
-- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 16 Dec 20
|
||||
-- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available
|
||||
-- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html
|
||||
-------------------------------------------------------------------------
|
||||
-- Observe a set of Blue SAM sites being attacked by Red SEAD and Helicopters
|
||||
-- HQ and EWR will randomly relocate between 30 and 60 mins
|
||||
-- The Radar will only relocate if not detected units are in range
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: 26 Dec 2020
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
myredmantis = MANTIS:New("mybluemantis","Blue SAM","Blue EWR","Blue HQ","blue",false)
|
||||
myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS!
|
||||
myredmantis:Debug(false)
|
||||
myredmantis.verbose = true
|
||||
myredmantis:Start()
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- MTS-110 - Mantis Link to A2A-Dispatcher
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
|
||||
--
|
||||
-------------------------------------------------------------------------
|
||||
-- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters.
|
||||
-- HQ and EWR will randomly relocate between 30 and 60 mins
|
||||
-- SU-27 GCICAP Flights will start from Pashkovsky to help the SAMs
|
||||
--
|
||||
-- NOTE - This demo requires the Master version of Moose and will not work with the Develop version!
|
||||
--
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: 17 Dec 2020
|
||||
-- Last Update: Feb 2023
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",false)
|
||||
myredmantis:Debug(false)
|
||||
myredmantis:Start()
|
||||
|
||||
-- link in AI_A2A_Dispatcher
|
||||
|
||||
Red_GCI = AI_A2A_DISPATCHER:New(myredmantis.Detection) -- use existing detection object
|
||||
|
||||
Red_GCI:SetTacticalDisplay(true)
|
||||
Red_GCI:SetDefaultLandingAtRunway()
|
||||
Red_GCI:SetDefaultTakeoffInAir()
|
||||
Red_GCI:SetDisengageRadius(125000)
|
||||
Red_GCI:SetDefaultOverhead(0.4)
|
||||
Red_GCI:SetDefaultGrouping(2)
|
||||
Red_GCI:SetGciRadius(125000)
|
||||
Red_GCI:SetSquadron("Russian Tigers Sq1",AIRBASE.Caucasus.Krasnodar_Pashkovsky,"Red Interceptor",10)
|
||||
Red_GCI:SetSquadronGci("Russian Tigers Sq1",900,1800)
|
||||
Red_GCI:Start() -- never forget to use Start()!!
|
||||
Binary file not shown.
@@ -0,0 +1,71 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- MTS-200 - MANTIS - Advanced Mode
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
|
||||
--
|
||||
-- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 17 Dec 20
|
||||
-- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available
|
||||
-- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html
|
||||
-------------------------------------------------------------------------
|
||||
-- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters.
|
||||
-- HQ and EWR will be destroyed after 10 and 15 mins, respectively
|
||||
-- Detection will slow down accordingly, if both units are dead, all SAM sites go to RED state
|
||||
-- Set up of a new HQ and EWR will recover MANTIS
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: 21 Dec 2020
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",true)
|
||||
--myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS!
|
||||
myredmantis:SetAdvancedMode(true, 100) -- switch on advanced mode - detection will slow down or die if HQ and EWR die
|
||||
myredmantis:Debug(false)
|
||||
myredmantis.verbose = true -- watch DCS.log
|
||||
myredmantis:Start()
|
||||
|
||||
function destroy(objectname)
|
||||
local text = "Destroying "..objectname
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
local grp = GROUP:FindByName(objectname)
|
||||
grp:Destroy()
|
||||
end
|
||||
|
||||
function createhq()
|
||||
newhq = SPAWN
|
||||
:New("Red HQ-1")
|
||||
:InitDelayOff()
|
||||
:OnSpawnGroup(
|
||||
function (group)
|
||||
myredmantis:SetCommandCenter(group)
|
||||
end
|
||||
)
|
||||
:Spawn()
|
||||
local text = "Creating new HQ!"
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
end
|
||||
|
||||
function createewr()
|
||||
newewr = SPAWN
|
||||
:New("Red EWR-1")
|
||||
:InitDelayOff()
|
||||
:Spawn()
|
||||
local text = "Creating new EWR!"
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
end
|
||||
|
||||
hqtimer = TIMER:New(destroy,"Red HQ")
|
||||
ewrtimer = TIMER:New(destroy,"Red EWR")
|
||||
awacstimer = TIMER:New(destroy,"Red EWR Awacs")
|
||||
|
||||
nhqtimer = TIMER:New(createhq)
|
||||
newrtimer = TIMER:New(createewr)
|
||||
|
||||
-- slow down
|
||||
hqtimer:Start(300) -- 5 min
|
||||
ewrtimer:Start(360) -- 6 min
|
||||
awacstimer:Start(420) -- 7 min
|
||||
|
||||
--speed up
|
||||
nhqtimer:Start(600) -- 10 min
|
||||
newrtimer:Start(660) -- 11 min
|
||||
Binary file not shown.
@@ -0,0 +1,90 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- MTS-210 - MANTIS - Advanced Mode plus AWACS
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
|
||||
--
|
||||
-- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 20 Dec 20
|
||||
-- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available
|
||||
-- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html
|
||||
-------------------------------------------------------------------------
|
||||
-- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters.
|
||||
-- HQ, Awacs and EWR will be destroyed after 5, 6, 7 mins, respectively
|
||||
-- Detection will slow down accordingly, if both units are dead, all SAM sites go to RED state
|
||||
-- Set up of a new HQ and EWR will recover MANTIS from min 10 onwards
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: 27 Dec 2020
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",true,"Red Awacs")
|
||||
myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS!
|
||||
myredmantis:SetAdvancedMode(true, 100) -- switch on advanced mode - detection will slow down or die if HQ and EWR die
|
||||
myredmantis:SetSAMRange(85)
|
||||
myredmantis:SetSAMRadius(30000)
|
||||
myredmantis:Debug(false)
|
||||
myredmantis.verbose = true -- watch DCS.log
|
||||
myredmantis:Start()
|
||||
|
||||
|
||||
function destroy(objectname)
|
||||
local text = "Destroying "..objectname
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
local grp = GROUP:FindByName(objectname)
|
||||
grp:Destroy()
|
||||
end
|
||||
|
||||
function createhq()
|
||||
newhq = SPAWN
|
||||
:New("Red HQ-1")
|
||||
:InitDelayOff()
|
||||
:OnSpawnGroup(
|
||||
function (group)
|
||||
myredmantis:SetCommandCenter(group)
|
||||
end
|
||||
)
|
||||
:Spawn()
|
||||
local text = "Creating new HQ!"
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
end
|
||||
|
||||
function createewr()
|
||||
newewr = SPAWN
|
||||
:New("Red EWR-1")
|
||||
:InitDelayOff()
|
||||
:Spawn()
|
||||
local text = "Creating new EWR!"
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
end
|
||||
|
||||
function createawacs()
|
||||
newewr = SPAWN
|
||||
:New("Red Awacs 1")
|
||||
:InitDelayOff()
|
||||
:OnSpawnGroup(
|
||||
function (grp)
|
||||
local name = grp:GetName()
|
||||
myredmantis:SetAwacs(name)
|
||||
end
|
||||
)
|
||||
:Spawn()
|
||||
local text = "Creating new AWACS!"
|
||||
m=MESSAGE:New(text,30,"Info"):ToAll()
|
||||
end
|
||||
|
||||
hqtimer = TIMER:New(destroy,"Red HQ")
|
||||
ewrtimer = TIMER:New(destroy,"Red EWR")
|
||||
awacstimer = TIMER:New(destroy,"Red Awacs")
|
||||
|
||||
nhqtimer = TIMER:New(createhq)
|
||||
newrtimer = TIMER:New(createewr)
|
||||
newAtimer = TIMER:New(createawacs)
|
||||
-- slow down
|
||||
hqtimer:Start(300) -- 5 min
|
||||
ewrtimer:Start(360) -- 6 min
|
||||
awacstimer:Start(420) -- 7 min
|
||||
|
||||
--speed up
|
||||
nhqtimer:Start(600) -- 10 min
|
||||
newrtimer:Start(660) -- 11 min
|
||||
newAtimer:Start(720) -- 12 min
|
||||
Binary file not shown.
@@ -0,0 +1,71 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- MTS-300 - MANTIS - Advanced Mode Complex Example
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
|
||||
--
|
||||
-------------------------------------------------------------------------
|
||||
-- Observe a set of SAM sites being attacked by F18 SEAD and A10Cs.
|
||||
-- HQ will be destroyed after 10 mins.
|
||||
-- Watch the long an short range MANTIS in action, with the SA10 also using SHORAD for defense.
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: 14 July 2021
|
||||
|
||||
-- Set up SHORAD
|
||||
local redsamset = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes({"Red AAA","Red SA11","Red EWR"}):FilterStart()
|
||||
local myredshorad = SHORAD:New("Gudata Shorad","Red Shorad",redsamset,12000,600,"red",false) -- Functional.Shorad#SHORAD
|
||||
myredshorad:SetDefenseLimits(80,95)
|
||||
|
||||
-- Short/Mid-Range SAM sites
|
||||
local myredmantis = MANTIS:New("Gudauta AAA","Red AAA","Red EWR",nil,"red",true,"Red AWACS",false)
|
||||
myredmantis:SetSAMRadius(25000)
|
||||
myredmantis:SetSAMRange(85)
|
||||
myredmantis:SetDetectInterval(20)
|
||||
myredmantis:Start()
|
||||
|
||||
-- Long-range SAM site, also linked to SHORAD
|
||||
local myredsa10 = MANTIS:New("Gudauta SA10","Red SA11","Red EWR","Red HQ","red",true,"Red AWACS",false)
|
||||
myredsa10:SetSAMRadius(UTILS.NMToMeters(40))
|
||||
myredsa10:SetSAMRange(90)
|
||||
myredsa10:SetDetectInterval(20)
|
||||
myredsa10:AddShorad(myredshorad,720)
|
||||
myredsa10:SetAdvancedMode(true,90)
|
||||
myredsa10:SetAutoRelocate(true,false)
|
||||
--myredsa10:Debug(true)
|
||||
myredsa10:Start()
|
||||
|
||||
-- Using some "OnAfter..." events to shape the mission
|
||||
function myredsa10:OnAfterShoradActivated(From, Event, To, Name, Radius, Ontime)
|
||||
-- show some info
|
||||
local m = MESSAGE:New(string.format("Mantis switched on Shorad for %s | Radius %d | OnTime %d", Name, Radius, Ontime),10,"Info"):ToAll()
|
||||
end
|
||||
|
||||
function myredsa10:OnAfterAdvStateChange(From, Event, To, Oldstate, Newstate, Interval)
|
||||
-- show some info
|
||||
local state = { [1] = "GREEN", [2] = "AMBER", [3] = "RED" }
|
||||
local oldstate = state[Oldstate+1]
|
||||
local newstate = state[Newstate+1]
|
||||
local m = MESSAGE:New(string.format("Mantis switched Advanced from from %s to %s interval %dsec", oldstate, newstate, Interval),10,"Info"):ToAll()
|
||||
end
|
||||
|
||||
function myredsa10:OnAfterRedState(From, Event, To, Group)
|
||||
-- show some info
|
||||
local SamName = Group:GetName()
|
||||
local m = MESSAGE:New(string.format("Mantis switched %s to RED state!", SamName),10,"Info"):ToAll()
|
||||
end
|
||||
|
||||
function myredsa10:OnAfterGreenState(From, Event, To, Group)
|
||||
-- show some info
|
||||
local SamName = Group:GetName()
|
||||
local m = MESSAGE:New(string.format("Mantis switched %s to GREEN state!", SamName),10,"Info"):ToAll()
|
||||
end
|
||||
|
||||
-- Destroy HQ after 5 mins
|
||||
function TerminateHQ()
|
||||
local group = GROUP:FindByName("Red HQ")
|
||||
group:Destroy()
|
||||
end
|
||||
|
||||
local desthqtimer = TIMER:New(TerminateHQ)
|
||||
desthqtimer:Start(600)
|
||||
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
|
||||
-- Only use Include.File when developing new MOOSE classes.
|
||||
-- When using Moose.lua in the DO SCIPTS FILE initialization box,
|
||||
-- these Include.File statements are not needed, because all classes within Moose will be loaded.
|
||||
|
||||
|
||||
-- This is an example of a global
|
||||
local Trainer = MISSILETRAINER
|
||||
:New( 200, "Trainer: Welcome to the missile training, trainee! Missiles will be fired at you. Try to evade them. Good luck!" )
|
||||
:InitMessagesOnOff(true)
|
||||
:InitAlertsToAll(true)
|
||||
:InitAlertsHitsOnOff(true)
|
||||
:InitAlertsLaunchesOnOff(false) -- I'll put it on below ...
|
||||
:InitBearingOnOff(true)
|
||||
:InitRangeOnOff(true)
|
||||
:InitTrackingOnOff(true)
|
||||
:InitTrackingToAll(true)
|
||||
:InitMenusOnOff(false)
|
||||
|
||||
Trainer:InitAlertsToAll(true) -- Now alerts are also on
|
||||
Binary file not shown.
@@ -0,0 +1,110 @@
|
||||
---
|
||||
-- Name: CAZ-001 - Capture Zone
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 January 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
|
||||
do -- Setup the Command Centers
|
||||
|
||||
RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" )
|
||||
US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" )
|
||||
|
||||
end
|
||||
|
||||
do -- Missions
|
||||
|
||||
US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary",
|
||||
"Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" ..
|
||||
"There are five random capture zones located at the airbase.\n" ..
|
||||
"Move to one of the capture zones, destroy the fuel tanks in the capture zone, " ..
|
||||
"and occupy each capture zone with a platoon.\n " ..
|
||||
"Your orders are to hold position until all capture zones are taken.\n" ..
|
||||
"Use the map (F10) for a clear indication of the location of each capture zone.\n" ..
|
||||
"Note that heavy resistance can be expected at the airbase!\n" ..
|
||||
"Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!"
|
||||
, coalition.side.RED)
|
||||
|
||||
US_Score = SCORING:New( "CAZ-001 - Capture Zone" )
|
||||
|
||||
US_Mission_EchoBay:AddScoring( US_Score )
|
||||
|
||||
US_Mission_EchoBay:Start()
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CaptureZone = ZONE:New( "CaptureZone" )
|
||||
|
||||
ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED )
|
||||
|
||||
|
||||
--- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
|
||||
if From ~= To then
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E( { Coalition = Coalition } )
|
||||
if Coalition == coalition.side.BLUE then
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterEmpty()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterAttacked()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.White )
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterCaptured()
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
||||
|
||||
self:__Guard( 30 )
|
||||
end
|
||||
|
||||
ZoneCaptureCoalition:__Guard( 1 )
|
||||
|
||||
ZoneCaptureCoalition:Start( 30, 30 )
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,110 @@
|
||||
---
|
||||
-- Name: CAZ-001 - Capture Zone
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 January 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
|
||||
do -- Setup the Command Centers
|
||||
|
||||
RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" )
|
||||
US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" )
|
||||
|
||||
end
|
||||
|
||||
do -- Missions
|
||||
|
||||
US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary",
|
||||
"Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" ..
|
||||
"There are five random capture zones located at the airbase.\n" ..
|
||||
"Move to one of the capture zones, destroy the fuel tanks in the capture zone, " ..
|
||||
"and occupy each capture zone with a platoon.\n " ..
|
||||
"Your orders are to hold position until all capture zones are taken.\n" ..
|
||||
"Use the map (F10) for a clear indication of the location of each capture zone.\n" ..
|
||||
"Note that heavy resistance can be expected at the airbase!\n" ..
|
||||
"Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!"
|
||||
, coalition.side.RED)
|
||||
|
||||
US_Score = SCORING:New( "CAZ-001 - Capture Zone" )
|
||||
|
||||
US_Mission_EchoBay:AddScoring( US_Score )
|
||||
|
||||
US_Mission_EchoBay:Start()
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CaptureZone = ZONE:New( "CaptureZone" )
|
||||
|
||||
ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED )
|
||||
|
||||
|
||||
--- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
|
||||
if From ~= To then
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E( { Coalition = Coalition } )
|
||||
if Coalition == coalition.side.BLUE then
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterEmpty()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterAttacked()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.White )
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterCaptured()
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
||||
|
||||
self:__Guard( 30 )
|
||||
end
|
||||
|
||||
ZoneCaptureCoalition:__Guard( 1 )
|
||||
|
||||
ZoneCaptureCoalition:Start( 30, 30 )
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,114 @@
|
||||
---
|
||||
-- Name: CAZ-003 - Capture Zone, Zone as ZONE_POLYGON
|
||||
-- Author: Applevangelist
|
||||
-- Date Created: Sept 2022
|
||||
--
|
||||
-- # Situation: Capture the zone around the Ammo Storage, jump into one of the tanks (requires Combined Arms)
|
||||
--
|
||||
-- # Test cases: Watch the state changes as you shoot, destroy the storage and enter the zone with the tank.
|
||||
--
|
||||
|
||||
do -- Setup the Command Centers
|
||||
|
||||
RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" )
|
||||
US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" )
|
||||
|
||||
end
|
||||
|
||||
do -- Missions
|
||||
|
||||
US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary",
|
||||
"Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" ..
|
||||
"There are five random capture zones located at the airbase.\n" ..
|
||||
"Move to one of the capture zones, destroy the fuel tanks in the capture zone, " ..
|
||||
"and occupy each capture zone with a platoon.\n " ..
|
||||
"Your orders are to hold position until all capture zones are taken.\n" ..
|
||||
"Use the map (F10) for a clear indication of the location of each capture zone.\n" ..
|
||||
"Note that heavy resistance can be expected at the airbase!\n" ..
|
||||
"Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!"
|
||||
, coalition.side.RED)
|
||||
|
||||
US_Score = SCORING:New( "CAZ-001 - Capture Zone" )
|
||||
|
||||
US_Mission_EchoBay:AddScoring( US_Score )
|
||||
|
||||
US_Mission_EchoBay:Start()
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
BASE:TraceOn()
|
||||
BASE:TraceClass("ZONE_CAPTURE_COALITION")
|
||||
|
||||
-- Draw Zone on Map
|
||||
CaptureZone = ZONE_POLYGON:NewFromGroupName("CapZone")
|
||||
CaptureZone:DrawZone(-1,{0,1,0},nil,nil,nil,1,true)
|
||||
|
||||
-- Start ZONE_CAPTURE_COALITION
|
||||
ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( "CapZone", coalition.side.RED )
|
||||
ZoneCaptureCoalition:SetSmokeZone(true)
|
||||
ZoneCaptureCoalition:SetMonitorHits(true,60)
|
||||
|
||||
--- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
|
||||
if From ~= To then
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E( { Coalition = Coalition } )
|
||||
if Coalition == coalition.side.BLUE then
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterEmpty()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterAttacked()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.White )
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterCaptured()
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
||||
|
||||
self:__Guard( 30 )
|
||||
end
|
||||
|
||||
ZoneCaptureCoalition:__Guard( 1 )
|
||||
|
||||
ZoneCaptureCoalition:Start( 30, 30 )
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,114 @@
|
||||
---
|
||||
-- Name: CAZ-500 - Task Capture Zone
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 January 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
|
||||
do -- Setup the Command Centers
|
||||
|
||||
RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" )
|
||||
US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" )
|
||||
|
||||
end
|
||||
|
||||
do -- Missions
|
||||
|
||||
US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary",
|
||||
"Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" ..
|
||||
"There are five random capture zones located at the airbase.\n" ..
|
||||
"Move to one of the capture zones, destroy the fuel tanks in the capture zone, " ..
|
||||
"and occupy each capture zone with a platoon.\n " ..
|
||||
"Your orders are to hold position until all capture zones are taken.\n" ..
|
||||
"Use the map (F10) for a clear indication of the location of each capture zone.\n" ..
|
||||
"Note that heavy resistance can be expected at the airbase!\n" ..
|
||||
"Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!"
|
||||
, coalition.side.RED)
|
||||
|
||||
US_Score = SCORING:New( "CAZ-001 - Capture Zone" )
|
||||
|
||||
US_Mission_EchoBay:AddScoring( US_Score )
|
||||
|
||||
US_Mission_EchoBay:Start()
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CaptureZone = ZONE:New( "Alpha-001" )
|
||||
|
||||
ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED )
|
||||
|
||||
|
||||
--- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
|
||||
if From ~= To then
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E( { Coalition = Coalition } )
|
||||
if Coalition == coalition.side.BLUE then
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterEmpty()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green )
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterAttacked()
|
||||
ZoneCaptureCoalition:Smoke( SMOKECOLOR.White )
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
end
|
||||
|
||||
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
||||
function ZoneCaptureCoalition:OnEnterCaptured()
|
||||
local Coalition = self:GetCoalition()
|
||||
self:E({Coalition = Coalition})
|
||||
if Coalition == coalition.side.BLUE then
|
||||
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
else
|
||||
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
||||
|
||||
self:__Guard( 30 )
|
||||
end
|
||||
|
||||
ZoneCaptureCoalition:MonitorDestroyedUnits()
|
||||
ZoneCaptureCoalition:__Guard( 1 )
|
||||
|
||||
-- Create the tasks under the mission
|
||||
|
||||
local ZoneCaptureGroupSet = SET_GROUP:New():FilterCoalitions("blue"):FilterStart()
|
||||
|
||||
local US_Task_Zone_Capture = TASK_ZONE_CAPTURE:New( US_Mission_EchoBay, ZoneCaptureGroupSet, ZoneCaptureCoalition:GetZoneName(), ZoneCaptureCoalition )
|
||||
|
||||
US_CC:SetMenu()
|
||||
Binary file not shown.
Reference in New Issue
Block a user