From 286d2ed571c9303cb6ad7fe85dab5ef757db61dc Mon Sep 17 00:00:00 2001 From: kaltokri Date: Mon, 1 Jan 2024 22:41:16 +0100 Subject: [PATCH] Next step of folder restructure --- .../ESC-001 - Escort A2G Test.lua | 18 +- .../ESC-001 - Escort A2G Test.miz | Bin .../ESC-002 - Escort A2G Large Formation.lua | 16 +- .../ESC-002 - Escort A2G Large Formation.miz | Bin .../ESC-003 - Escort A2G Airbase Takeoff.lua | 18 +- .../ESC-003 - Escort A2G Airbase Takeoff.miz | Bin .../ESC-004 - Escort A2G Formation.lua | 18 +- .../ESC-004 - Escort A2G Formation.miz | Bin .../ESC-005 - Escort A2G Helicopters.lua | 18 +- .../ESC-005 - Escort A2G Helicopters.miz | Bin .../ESC-006 - Escort ROE ROT.lua | 22 +- .../ESC-006 - Escort ROE ROT.miz | Bin .../ESC-100 - Escort Request Menu - kopie.miz | Bin .../ESC-100 - Escort Request Menu.lua | 26 +- .../ESC-100 - Escort Request Menu.lua | 26 +- .../ESC-100 - Escort Request Menu.miz | Bin .../ESC-200 - Escort Mission.lua | 28 +- .../ESC-200 - Escort Mission.miz | Bin .../ESC-201 - Escort Mission.lua | 102 +- .../ESC-201 - Escort Mission.miz | Bin .../FOR-001 - Bomber Speed and Route Test.lua | 16 +- .../FOR-001 - Bomber Speed and Route Test.miz | Bin .../FOR-100 - Bomber Left Line Formation.lua | 16 +- .../FOR-100 - Bomber Left Line Formation.miz | Bin .../FOR-101 - Bomber Right Line Formation.lua | 16 +- .../FOR-101 - Bomber Right Line Formation.miz | Bin .../FOR-102 - Bomber Left Wing Formation.lua | 16 +- .../FOR-102 - Bomber Left Wing Formation.miz | Bin .../FOR-103 - Bomber Right Wing Formation.lua | 16 +- .../FOR-103 - Bomber Right Wing Formation.miz | Bin ...FOR-104 - Bomber Center Wing Formation.lua | 16 +- ...FOR-104 - Bomber Center Wing Formation.miz | Bin .../FOR-105 - Bomber Trail Formation.lua | 16 +- .../FOR-105 - Bomber Trail Formation.miz | Bin .../FOR-106 - Bomber Box Formation.lua | 20 +- .../FOR-106 - Bomber Box Formation.miz | Bin .../CGO-001 - Unit Boarding.lua | 22 +- .../CGO-001 - Unit Boarding.miz | Bin .../CGO-002 - Unit Unboarding.lua | 20 +- .../CGO-002 - Unit Unboarding.miz | Bin .../CGO-003 - Unit Transferring.lua | 50 +- .../CGO-003 - Unit Transferring.miz | Bin .../CGO-101 - Group Boarding.lua | 50 +- .../CGO-101 - Group Boarding.miz | Bin .../CGO-102 - Group Unboarding.lua | 48 +- .../CGO-102 - Group Unboarding.miz | Bin .../CGO-103 - Group Transferring.lua | 80 +- .../CGO-103 - Group Transferring.miz | Bin .../CGO-110 - Group Respawn.lua | 56 +- .../CGO-110 - Group Respawn.miz | Bin .../CGO-201 - Package Boarding.lua | 22 +- .../CGO-201 - Package Boarding.miz | Bin .../CGO-202 - Package Unboarding.lua | 24 +- .../CGO-202 - Package Unboarding.miz | Bin .../CGO-300 - Crate Boarding.lua | 22 +- .../CGO-300 - Crate Boarding.miz | Bin .../CGO-900 - Cargo sets.lua | 6 +- .../CGO-900 - Cargo sets.miz | Bin .../EVT-001 - API Demo 1.lua | 80 +- .../EVT-001 - API Demo 1.miz | Bin ...-001 - UNIT OnEventShot Stability Test.lua | 148 +-- ...-001 - UNIT OnEventShot Stability Test.miz | Bin ...VT-002 - UNIT OnEventLand ReSpawn Test.lua | 80 +- ...-001 - UNIT OnEventShot Stability Test.lua | 148 +-- ...VT-002 - UNIT OnEventLand ReSpawn Test.lua | 80 +- ...VT-002 - UNIT OnEventLand ReSpawn Test.miz | Bin .../EVT-100 - UNIT OnEventShot Example.lua | 50 +- .../EVT-100 - UNIT OnEventShot Example.miz | Bin .../EVT-101 - UNIT OnEventHit Example.lua | 64 +- .../EVT-101 - UNIT OnEventHit Example.miz | Bin .../EVT-102 - UNIT OnEventTakeoff Example.lua | 66 +- .../EVT-102 - UNIT OnEventTakeoff Example.miz | Bin .../EVT-103 - UNIT OnEventLand Example.lua | 76 +- .../EVT-103 - UNIT OnEventLand Example.miz | Bin .../EVT-104 - UNIT OnEventCrash Example.lua | 70 +- .../EVT-104 - UNIT OnEventCrash Example.miz | Bin ... - UNIT OnEventPlayerEnterUnit Example.lua | 214 ++-- ... - UNIT OnEventPlayerEnterUnit Example.miz | Bin .../EVT-200 - GROUP OnEventShot Example.lua | 56 +- .../EVT-200 - GROUP OnEventShot Example.miz | Bin .../EVT-201 - GROUP OnEventHit Example.lua | 56 +- .../EVT-201 - GROUP OnEventHit Example.miz | Bin .../EVT-201 - GROUP OnEventHit Example.lua | 56 +- .../EVT-204 - GROUP OnEventCrash Example.lua | 68 +- .../EVT-204 - GROUP OnEventCrash Example.miz | Bin .../EVT-205 - GROUP OnEventDead Example.lua | 56 +- .../EVT-205 - GROUP OnEventDead Example.miz | Bin .../EVT-401 - Generic OnEventHit Example.lua | 68 +- .../EVT-401 - Generic OnEventHit Example.miz | Bin ...02 - Generic OnEventMissionEnd Example.lua | 52 +- ...02 - Generic OnEventMissionEnd Example.miz | Bin ...EVT-403 - Generic OnEventBirth Example.lua | 64 +- ...EVT-403 - Generic OnEventBirth Example.miz | Bin ...- OnEventLand Example LandingChallenge.lua | 124 +- ...EVT-500 - OnEventLand LandingChallenge.lua | 124 +- ...EVT-500 - OnEventLand LandingChallenge.miz | Bin ... - OnEventLand LandingChallengeComplex.lua | 300 ++--- ... - OnEventLand LandingChallengeComplex.miz | Bin ...OnEventHit Example with a Set of Units.lua | 58 +- ...OnEventHit Example with a Set of Units.miz | Bin .../FSM-100 - Transition Explanation.lua | 244 ++-- .../FSM-100 - Transition Explanation.miz | Bin .../MOP-100 - MARKEROPS_BASE - Basic Demo.lua | 0 .../MOP-100 - MARKEROPS_BASE.miz | Bin .../MarkerOps_Base_Demo.lua | 172 +-- .../MEN-102 - Menu Coalition Multi Player.lua | 86 +- .../MEN-102 - Menu Coalition Multi Player.miz | Bin .../MEN-001 - Menu Client.lua | 112 +- .../MEN-001 - Menu Client.miz | Bin .../MEN-002 - Menu Coalition.lua | 86 +- .../MEN-002 - Menu Coalition.miz | Bin .../MEN-003 - Menu Group.lua | 112 +- .../MEN-003 - Menu Group.miz | Bin .../MEN-102 - Menu Coalition Multi Player.lua | 86 +- .../MEN-102 - Menu Coalition Multi Player.miz | Bin .../MEN-200 - Menu Stress Test 1.lua | 112 +- .../MEN-200 - Menu Stress Test 1.miz | Bin .../CLA-001 - CleanUp Airbase.lua | 28 +- .../CLA-001 - CleanUp Airbase.miz | Bin ...of AREAS - Threat Level Prioritization.lua | 86 +- ...of AREAS - Threat Level Prioritization.miz | Bin ...f AREAS - Empty Set with Threat Levels.lua | 80 +- ...f AREAS - Empty Set with Threat Levels.miz | Bin ...of AREAS - Threat Level Prioritization.lua | 80 +- ... of AREAS - Status Menu Flash Activate.lua | 80 +- ... of AREAS - Status Menu Flash Activate.miz | Bin .../DES-100 - UNITS - Night Test.lua | 116 +- .../DES-100 - UNITS - Night Test.miz | Bin .../DES-101 - UNITS - Day Test.lua | 116 +- .../DES-101 - UNITS - Day Test.miz | Bin .../DES-110 - UNITS - Stress Test.lua | 116 +- .../DES-110 - UNITS - Stress Test.miz | Bin .../DES-200 - AREAS - Night Test.lua | 114 +- .../DES-200 - AREAS - Night Test.miz | Bin .../DES-201 - AREAS - Day Test.lua | 114 +- .../DES-201 - AREAS - Day Test.miz | Bin .../DES-300 - TYPES - Night Test.lua | 114 +- .../DES-300 - TYPES - Night Test.miz | Bin .../DES-301 - TYPES - Day Test.lua | 114 +- .../DES-301 - TYPES - Day Test.miz | Bin .../DET-001 - Detection Areas.lua | 46 +- .../DET-001 - Detection Areas.miz | Bin ...DET-002 - Detection only Visible Units.lua | 46 +- ...DET-002 - Detection only Visible Units.miz | Bin ...T-100 - Detection Probability Distance.lua | 112 +- ...T-100 - Detection Probability Distance.miz | Bin .../DET-101 - Detection Reporting.lua | 18 +- .../DET-101 - Detection Reporting.miz | Bin .../DET-120 - Detection Probability Zones.lua | 124 +- .../DET-120 - Detection Probability Zones.miz | Bin .../DET-200 - Detection UNITS.lua | 84 +- .../DET-200 - Detection UNITS.miz | Bin .../DET-201 - Detection UNITS - Air.lua | 86 +- .../DET-201 - Detection UNITS - Air.miz | Bin .../DET-210 - Detection TYPES.lua | 84 +- .../DET-210 - Detection TYPES.miz | Bin .../DET-250 - Detection AREAS.lua | 114 +- .../DET-250 - Detection AREAS.miz | Bin ...DET-255 - Detection AEAS with Destroys.lua | 90 +- ...DET-255 - Detection AEAS with Destroys.miz | Bin .../DET-300 - Dectection Filter AIRPLANE.lua | 72 +- .../DET-300 - Dectection Filter AIRPLANE.miz | Bin ...ET-301 - Dectection Filter GROUND_UNIT.lua | 72 +- ...ET-301 - Dectection Filter GROUND_UNIT.miz | Bin ...DET-302 - Dectection Filter HELICOPTER.lua | 72 +- ...DET-302 - Dectection Filter HELICOPTER.miz | Bin .../DET-303 - Dectection Filter SHIP.lua | 72 +- .../DET-303 - Dectection Filter SHIP.miz | Bin .../DET-304 - Dectection Filter STRUCTURE.lua | 72 +- .../DET-304 - Dectection Filter STRUCTURE.miz | Bin .../DET-305 - Dectection Filter ALL.lua | 88 +- .../DET-305 - Dectection Filter ALL.miz | Bin .../DET-310 - EWR - Line Of Sight.lua | 80 +- .../DET-310 - EWR - Line Of Sight.miz | Bin .../DET-320 - EWR - Line Of Sight.lua | 114 +- .../DET-320 - EWR - Line Of Sight.miz | Bin .../DET-400 - A2A - Detection methods.lua | 98 +- .../DET-400 - A2A - Detection methods.miz | Bin ...Detected Event - Govern Artillery Demo.lua | 138 +- ...Detected Event - Govern Artillery Demo.miz | Bin .../DET-600 - Detection Zones.lua | 30 +- .../DET-600 - Detection Zones.miz | Bin ...01 - Detection Zones_Capture_Coalition.lua | 34 +- ...01 - Detection Zones_Capture_Coalition.miz | Bin ...DET-900 - Detection Test with RED FACA.lua | 50 +- ...DET-900 - Detection Test with RED FACA.miz | Bin .../ESC-001 - Escorting Helicopters.lua | 178 +-- .../ESC-001 - Escorting Helicopters.miz | Bin .../MTS-010 - Basic Mantis Demo.lua | 0 .../MTS-010 - Basic Mantis Demo.miz | Bin .../MTS-100 - Autorelocate HQ and EWR.lua | 44 +- .../MTS-100 - Autorelocate HQ and EWR.miz | Bin ...MTS-100 - Blue Autorelocate HQ and EWR.lua | 44 +- ...MTS-100 - Blue Autorelocate HQ and EWR.miz | Bin ...TS-110 - Mantis Link to A2A-Dispatcher.lua | 74 +- ...TS-110 - Mantis Link to A2A-Dispatcher.miz | Bin .../MTS-200 - MANTIS - Advanced Mode.lua | 142 +-- .../MTS-200 - MANTIS - Advanced Mode.miz | Bin ...10 - MANTIS - Advanced Mode plus AWACS.lua | 178 +-- ...10 - MANTIS - Advanced Mode plus AWACS.miz | Bin ...MANTIS - Advanced Mode Complex Example.lua | 142 +-- ...MANTIS - Advanced Mode Complex Example.miz | Bin .../MIT-001 - Missile Trainer.lua | 40 +- .../MIT-001 - Missile Trainer.miz | Bin .../CAZ-001 - Capture Zone.lua | 220 ++-- .../CAZ-001 - Capture Zone.miz | Bin .../CAZ-002 - Attack Zone.lua | 220 ++-- .../CAZ-002 - Attack Zone.miz | Bin .../CAZ-003 - Attack Zone Polygon.lua | 228 ++-- .../CAZ-003 - Attack Zone Polygon.miz | Bin .../CAZ-500 - Task Capture Zone.lua | 226 ++-- .../CAZ-500 - Task Capture Zone.miz | Bin .../ATIS - 100 - Caucasus Batumi.lua | 36 +- .../ATIS - 100 - Caucasus Batumi.miz | Bin .../ATIS - 200 - Nevada Nellis.lua | 74 +- .../ATIS - 200 - Nevada Nellis.miz | Bin .../ATIS - 300 - Persian Gulf Dubai.lua | 50 +- .../ATIS - 300 - Persian Gulf Dubai.miz | Bin .../ATIS - 500 - Syria/ATIS - 500 - Syria.lua | 86 +- .../ATIS - 500 - Syria/ATIS - 500 - Syria.miz | Bin .../ATIS - 510 - Syria SRS.lua | 58 +- .../ATIS - 510 - Syria SRS.miz | Bin .../BOS-100 - Stennis Hornet and Tomcat.lua | 300 ++--- .../BOS-100 - Stennis Hornet and Tomcat.miz | Bin ...-110 - Airboss launch tanker from ramp.lua | 0 ...-110 - Airboss launch tanker from ramp.miz | Bin ...RecoveryTanker - 030 - Uncontrolled_AI.lua | 104 +- .../BOS-200 - Tarawa Harrier.lua | 248 ++-- .../BOS-200 - Tarawa Harrier.miz | Bin .../BOS-200 - FA-18C Fortress Cherbourg.lua | 0 ...00 - Fortress Cherbourg Stennig FA-18C.lua | 166 +-- .../BOS-200 - Fortress Cherbourg.miz | Bin .../RecoveryTanker - 010 - Simple.lua | 32 +- .../RecoveryTanker - 010 - Simple.miz | Bin .../RecoveryTanker - 020 - Custom.lua | 44 +- .../RecoveryTanker - 020 - Custom.miz | Bin .../GRP-100 - IsAlive/GRP-100 - IsAlive.lua | 64 +- .../GRP-100 - IsAlive/GRP-100 - IsAlive.miz | Bin .../GRP-100 - TaskAttackUnit.lua | 58 +- .../GRP-100 - TaskAttackUnit.miz | Bin .../GRP-200 - Follow Group.lua | 48 +- .../GRP-200 - Follow Group.miz | Bin .../GRP-300 - Switch WayPoints.lua | 24 +- .../GRP-300 - Switch WayPoints.miz | Bin .../GRP-310 - Command StopRoute.lua | 78 +- .../GRP-310 - Command StopRoute.miz | Bin .../GRP-400 - RouteReturnToAirbase.lua | 90 +- .../GRP-400 - RouteReturnToAirbase.miz | Bin .../GRP-500 - Ground TaskRoute.lua | 40 +- .../GRP-500 - Ground TaskRoute.miz | Bin .../GRP-501 - Ground TaskRouteToVec2.lua | 30 +- .../GRP-501 - Ground TaskRouteToVec2.miz | Bin ...02 - Route at waypoint to random point.lua | 92 +- ...02 - Route at waypoint to random point.miz | Bin ...NTTR Route at waypoint to random point.lua | 90 +- ...NTTR Route at waypoint to random point.miz | Bin .../GRP-550 - Patrol a route.lua | 34 +- .../GRP-550 - Patrol a route.miz | Bin ...1 - Patrol to random points of a route.lua | 34 +- ...1 - Patrol to random points of a route.miz | Bin .../GRP-552 - Patrol in a zone.lua | 32 +- .../GRP-552 - Patrol in a zone.miz | Bin .../GRP-553 - Patrol in a list of zones.lua | 32 +- .../GRP-553 - Patrol in a list of zones.miz | Bin .../Group}/GRP-600 - Respawn.miz | Bin .../GRP-601 - Respawn hidden.lua | 20 +- .../GRP-601 - Respawn hidden.miz | Bin .../GRP-610 - Respawn in Zone.lua | 30 +- .../GRP-610 - Respawn in Zone.miz | Bin ...P-611 - Respawn multiple units in Zone.lua | 34 +- ...P-611 - Respawn multiple units in Zone.miz | Bin ...pawn multiple units in Zone randomized.lua | 36 +- ...pawn multiple units in Zone randomized.miz | Bin .../GRP-615 - Respawn in Zone hidden.lua | 32 +- .../GRP-615 - Respawn in Zone hidden.miz | Bin ... Respawn multiple units in Zone hidden.lua | 36 +- ... Respawn multiple units in Zone hidden.miz | Bin ...ltiple units in Zone randomized hidden.lua | 38 +- ...ltiple units in Zone randomized hidden.miz | Bin ... Respawn multiple units when destroyed.lua | 56 +- ... Respawn multiple units when destroyed.miz | Bin .../GRP-900 - Option Green and Red State.lua | 54 +- .../GRP-900 - Option Green and Red State.miz | Bin .../GOV - Gori Valley/GOV - Gori Valley.lua | 1136 ++++++++--------- .../GOV - Gori Valley/GOV - Gori Valley.miz | Bin .../GOV - Gori Valley/GOV - Gori Valley.pptx | Bin .../MED - Medical Transport.lua | 0 .../MED - Medical Transport.miz | Bin 288 files changed, 6049 insertions(+), 6049 deletions(-) rename {ESC - AI Escort => AI/AI_Escort}/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz (100%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua (97%) rename {ESC - AI Escort => AI/AI_Escort}/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua (98%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua (97%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua (97%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua (97%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua (98%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua (98%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua (97%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz (100%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua (97%) rename {FOR - AI Group Formation => AI/AI_Formation}/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua (96%) rename {CGO - Cargo => Cargo/Cargo}/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua (96%) rename {CGO - Cargo => Cargo/Cargo}/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua (96%) rename {CGO - Cargo => Cargo/Cargo}/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua (98%) rename {CGO - Cargo => Cargo/Cargo}/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz (100%) rename {CGO - Cargo => Cargo/Cargo}/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua (97%) rename {CGO - Cargo => Cargo/Cargo}/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua (95%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz (100%) rename {EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test => Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test}/EVT-001 - UNIT OnEventShot Stability Test.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua (96%) rename {EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test => Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test}/EVT-001 - UNIT OnEventShot Stability Test.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua (95%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua (95%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua (97%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua (98%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz (100%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua (96%) rename {EVT - Event Handling => Core/Base/Event-Handling}/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz (100%) rename {FSM - Finite State Machine => Core/FSM}/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua (96%) rename {FSM - Finite State Machine => Core/FSM}/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz (100%) rename {MOP-100 - MARKEROPS_BASE => Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE}/MOP-100 - MARKEROPS_BASE - Basic Demo.lua (100%) rename {MOP-100 - MARKEROPS_BASE => Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE}/MOP-100 - MARKEROPS_BASE.miz (100%) rename {MOP-100 - MARKEROPS_BASE => Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE}/MarkerOps_Base_Demo.lua (97%) rename {MEN - Menu Options => Core/Menu}/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua (97%) rename {MEN - Menu Options => Core/Menu}/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz (100%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua (97%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz (100%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua (97%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz (100%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua (97%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz (100%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua (97%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz (100%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua (97%) rename {MEN - Menu Options => Core/Menu}/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz (100%) rename {CLA - CleanUp Airbase => Functional/CleanUp}/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua (96%) rename {CLA - CleanUp Airbase => Functional/CleanUp}/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz (100%) rename {DES - Designation => Functional/Designate}/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua (96%) rename {DES - Designation => Functional/Designate}/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz (100%) rename {DES - Designation => Functional/Designate}/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua (96%) rename {DES - Designation => Functional/Designate}/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz (100%) rename {DES - Designation => Functional/Designate}/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua (96%) rename {DES - Designation => Functional/Designate}/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua (96%) rename {DES - Designation => Functional/Designate}/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz (100%) rename {DES - Designation => Functional/Designate}/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz (100%) rename {DES - Designation => Functional/Designate}/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz (100%) rename {DES - Designation => Functional/Designate}/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz (100%) rename {DES - Designation => Functional/Designate}/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz (100%) rename {DES - Designation => Functional/Designate}/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz (100%) rename {DES - Designation => Functional/Designate}/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz (100%) rename {DES - Designation => Functional/Designate}/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua (98%) rename {DES - Designation => Functional/Designate}/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz (100%) rename {DET - Detection => Functional/Detection}/DET-001 - Detection Areas/DET-001 - Detection Areas.lua (97%) rename {DET - Detection => Functional/Detection}/DET-001 - Detection Areas/DET-001 - Detection Areas.miz (100%) rename {DET - Detection => Functional/Detection}/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua (97%) rename {DET - Detection => Functional/Detection}/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz (100%) rename {DET - Detection => Functional/Detection}/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua (97%) rename {DET - Detection => Functional/Detection}/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz (100%) rename {DET - Detection => Functional/Detection}/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua (97%) rename {DET - Detection => Functional/Detection}/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz (100%) rename {DET - Detection => Functional/Detection}/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua (97%) rename {DET - Detection => Functional/Detection}/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz (100%) rename {DET - Detection => Functional/Detection}/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua (96%) rename {DET - Detection => Functional/Detection}/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz (100%) rename {DET - Detection => Functional/Detection}/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua (96%) rename {DET - Detection => Functional/Detection}/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz (100%) rename {DET - Detection => Functional/Detection}/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua (96%) rename {DET - Detection => Functional/Detection}/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz (100%) rename {DET - Detection => Functional/Detection}/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua (97%) rename {DET - Detection => Functional/Detection}/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz (100%) rename {DET - Detection => Functional/Detection}/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua (97%) rename {DET - Detection => Functional/Detection}/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz (100%) rename {DET - Detection => Functional/Detection}/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua (96%) rename {DET - Detection => Functional/Detection}/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz (100%) rename {DET - Detection => Functional/Detection}/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua (96%) rename {DET - Detection => Functional/Detection}/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz (100%) rename {DET - Detection => Functional/Detection}/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua (96%) rename {DET - Detection => Functional/Detection}/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz (100%) rename {DET - Detection => Functional/Detection}/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua (96%) rename {DET - Detection => Functional/Detection}/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz (100%) rename {DET - Detection => Functional/Detection}/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua (96%) rename {DET - Detection => Functional/Detection}/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz (100%) rename {DET - Detection => Functional/Detection}/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua (96%) rename {DET - Detection => Functional/Detection}/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz (100%) rename {DET - Detection => Functional/Detection}/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua (96%) rename {DET - Detection => Functional/Detection}/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz (100%) rename {DET - Detection => Functional/Detection}/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua (96%) rename {DET - Detection => Functional/Detection}/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz (100%) rename {DET - Detection => Functional/Detection}/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua (96%) rename {DET - Detection => Functional/Detection}/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz (100%) rename {DET - Detection => Functional/Detection}/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua (97%) rename {DET - Detection => Functional/Detection}/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz (100%) rename {DET - Detection => Functional/Detection}/DET-600 - Detection Zones/DET-600 - Detection Zones.lua (97%) rename {DET - Detection => Functional/Detection}/DET-600 - Detection Zones/DET-600 - Detection Zones.miz (100%) rename {DET - Detection => Functional/Detection}/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua (97%) rename {DET - Detection => Functional/Detection}/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz (100%) rename {DET - Detection => Functional/Detection}/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua (97%) rename {DET - Detection => Functional/Detection}/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz (100%) rename {ESC - Escorting => Functional/Escort}/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua (97%) rename {ESC - Escorting => Functional/Escort}/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua (98%) rename {MTS - Mantis => Functional/Mantis}/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua (98%) rename {MTS - Mantis => Functional/Mantis}/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua (97%) rename {MTS - Mantis => Functional/Mantis}/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua (97%) rename {MTS - Mantis => Functional/Mantis}/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua (97%) rename {MTS - Mantis => Functional/Mantis}/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz (100%) rename {MTS - Mantis => Functional/Mantis}/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua (97%) rename {MTS - Mantis => Functional/Mantis}/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz (100%) rename {MIT - Missile Trainer => Functional/MissileTrainer}/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua (97%) rename {MIT - Missile Trainer => Functional/MissileTrainer}/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz (100%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua (97%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz (100%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua (97%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz (100%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua (97%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.miz (100%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua (97%) rename {CAZ - Capture Zones => Functional/ZoneCaptureCoalition}/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz (100%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua (97%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz (100%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua (96%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz (100%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua (97%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz (100%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 500 - Syria/ATIS - 500 - Syria.lua (97%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 500 - Syria/ATIS - 500 - Syria.miz (100%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua (97%) rename {OPS - ATIS => Ops/ATIS}/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz (100%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua (97%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz (100%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua (100%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz (100%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua (97%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua (97%) rename {OPS - Airboss => Ops/Airboss}/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz (100%) rename OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua => Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua (100%) rename OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua => Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua (96%) rename {OPS - Airboss => Ops/Airboss}/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz (100%) rename {OPS - Recovery Tanker => Ops/RecoveryTanker}/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua (97%) rename {OPS - Recovery Tanker => Ops/RecoveryTanker}/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz (100%) rename {OPS - Recovery Tanker => Ops/RecoveryTanker}/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua (97%) rename {OPS - Recovery Tanker => Ops/RecoveryTanker}/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-100 - IsAlive/GRP-100 - IsAlive.lua (96%) rename {GRP - Group Commands => Wrapper/Group}/GRP-100 - IsAlive/GRP-100 - IsAlive.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua (95%) rename {GRP - Group Commands => Wrapper/Group}/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-200 - Follow Group/GRP-200 - Follow Group.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-200 - Follow Group/GRP-200 - Follow Group.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua (95%) rename {GRP - Group Commands => Wrapper/Group}/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua (96%) rename {GRP - Group Commands => Wrapper/Group}/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua (95%) rename {GRP - Group Commands => Wrapper/Group}/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua (96%) rename {GRP - Group Commands => Wrapper/Group}/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua (98%) rename {GRP - Group Commands => Wrapper/Group}/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-600 - Respawn.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua (96%) rename {GRP - Group Commands => Wrapper/Group}/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua (97%) rename {GRP - Group Commands => Wrapper/Group}/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz (100%) rename {GRP - Group Commands => Wrapper/Group}/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua (96%) rename {GRP - Group Commands => Wrapper/Group}/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz (100%) rename {DEM - Demo Missions => other/DEM - Demo Missions}/GOV - Gori Valley/GOV - Gori Valley.lua (97%) rename {DEM - Demo Missions => other/DEM - Demo Missions}/GOV - Gori Valley/GOV - Gori Valley.miz (100%) rename {DEM - Demo Missions => other/DEM - Demo Missions}/GOV - Gori Valley/GOV - Gori Valley.pptx (100%) rename {DEM - Demo Missions => other/DEM - Demo Missions}/MED - Medical Transport/MED - Medical Transport.lua (100%) rename {DEM - Demo Missions => other/DEM - Demo Missions}/MED - Medical Transport/MED - Medical Transport.miz (100%) diff --git a/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua b/AI/AI_Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua similarity index 97% rename from ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua rename to AI/AI_Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua index 18ec7d6402..fc0f23292a 100644 --- a/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua +++ b/AI/AI_Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua @@ -1,9 +1,9 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane", "ship" } ):FilterCoalitions( "red" ):FilterPrefixes( { "Escort", "Ship Defense" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 750, 750 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane", "ship" } ):FilterCoalitions( "red" ):FilterPrefixes( { "Escort", "Ship Defense" } ):FilterStart() + +local LeaderUnit = UNIT:FindByName( "Leader" ) +local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) +Escort:FormationTrail( 750, 750 , 0 ) +Escort:MenusAirplanes() +Escort:__Start( 1 ) + diff --git a/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz b/AI/AI_Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz similarity index 100% rename from ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz rename to AI/AI_Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz diff --git a/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua b/AI/AI_Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua similarity index 97% rename from ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua rename to AI/AI_Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua index 658d736e2d..874867cb14 100644 --- a/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua +++ b/AI/AI_Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua @@ -1,8 +1,8 @@ -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane", "ship" } ):FilterCoalitions( "red" ):FilterPrefixes( { "Escort", "Ship Defense" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 750, 750 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 5 ) - +local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane", "ship" } ):FilterCoalitions( "red" ):FilterPrefixes( { "Escort", "Ship Defense" } ):FilterStart() + +local LeaderUnit = UNIT:FindByName( "Leader" ) +local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) +Escort:FormationTrail( 750, 750 , 0 ) +Escort:MenusAirplanes() +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz b/AI/AI_Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz similarity index 100% rename from ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz rename to AI/AI_Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz diff --git a/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua b/AI/AI_Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua similarity index 97% rename from ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua rename to AI/AI_Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua index 4e83ea9280..3e4033c204 100644 --- a/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua +++ b/AI/AI_Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua @@ -1,9 +1,9 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 100, 100 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 5 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() + +local LeaderUnit = UNIT:FindByName( "Leader" ) +local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) +Escort:FormationTrail( 100, 100 , 0 ) +Escort:MenusAirplanes() +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz b/AI/AI_Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz similarity index 100% rename from ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz rename to AI/AI_Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz diff --git a/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua b/AI/AI_Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua similarity index 97% rename from ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua rename to AI/AI_Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua index 4e83ea9280..3e4033c204 100644 --- a/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua +++ b/AI/AI_Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua @@ -1,9 +1,9 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 100, 100 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 5 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() + +local LeaderUnit = UNIT:FindByName( "Leader" ) +local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) +Escort:FormationTrail( 100, 100 , 0 ) +Escort:MenusAirplanes() +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz b/AI/AI_Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz similarity index 100% rename from ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz rename to AI/AI_Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz diff --git a/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua b/AI/AI_Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua similarity index 97% rename from ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua rename to AI/AI_Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua index 70cae94aa2..24588f503d 100644 --- a/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua +++ b/AI/AI_Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua @@ -1,9 +1,9 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "helicopter" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 100, 100 , 0 ) -Escort:MenusHelicopters() -Escort:__Start( 5 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories( { "helicopter" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() + +local LeaderUnit = UNIT:FindByName( "Leader" ) +local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) +Escort:FormationTrail( 100, 100 , 0 ) +Escort:MenusHelicopters() +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz b/AI/AI_Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz similarity index 100% rename from ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz rename to AI/AI_Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz diff --git a/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua b/AI/AI_Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua similarity index 97% rename from ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua rename to AI/AI_Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua index feb9997c4e..fd1a38c339 100644 --- a/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua +++ b/AI/AI_Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua @@ -1,11 +1,11 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "helicopter" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Test", "Use the ROE and ROT menus to test if the behaviour is working." ) - -Escort:SetFlightModeMission() - -Escort:MenusHelicopters() -Escort:__Start( 5 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories( { "helicopter" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() + +local LeaderUnit = UNIT:FindByName( "Leader" ) +local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Test", "Use the ROE and ROT menus to test if the behaviour is working." ) + +Escort:SetFlightModeMission() + +Escort:MenusHelicopters() +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz b/AI/AI_Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz similarity index 100% rename from ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz rename to AI/AI_Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz diff --git a/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz b/AI/AI_Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz similarity index 100% rename from ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz rename to AI/AI_Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz diff --git a/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua b/AI/AI_Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua similarity index 97% rename from ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua rename to AI/AI_Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua index e93482903d..1d936a59dc 100644 --- a/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua +++ b/AI/AI_Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu.lua @@ -1,13 +1,13 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) - - -local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) -Escort:FormationTrail( 50, 100, 100 ) -Escort:Menus( 50, 50, 0, 0, 50, 50, 6 ) -Escort:__Start( 5 ) - +-- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. + +EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) +EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) + + +local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) + +Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) +Escort:FormationTrail( 50, 100, 100 ) +Escort:Menus( 50, 50, 0, 0, 50, 50, 6 ) +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua b/AI/AI_Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua similarity index 97% rename from ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua rename to AI/AI_Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua index 43871452a7..f659ad35be 100644 --- a/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua +++ b/AI/AI_Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua @@ -1,13 +1,13 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) - - -local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) -Escort:FormationTrail( 50, 100, 100 ) -Escort:MenusAirplanes( 50, 50, 0, 0, 50, 50, 6 ) -Escort:__Start( 5 ) - +-- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. + +EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) +EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) + + +local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) + +Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) +Escort:FormationTrail( 50, 100, 100 ) +Escort:MenusAirplanes( 50, 50, 0, 0, 50, 50, 6 ) +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz b/AI/AI_Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz similarity index 100% rename from ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz rename to AI/AI_Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz diff --git a/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua b/AI/AI_Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua similarity index 97% rename from ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua rename to AI/AI_Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua index 18d94e8e9d..355a154e2c 100644 --- a/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua +++ b/AI/AI_Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua @@ -1,14 +1,14 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) - - -local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) -Escort:FormationTrail( 50, 100, 100 ) -Escort:MenusAirplanes( 50, 50, 0, 0, 50, 50, 6 ) -Escort:SetEscortSpawnMission() -Escort:__Start( 5 ) - +-- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. + +EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) +EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) + + +local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) + +Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) +Escort:FormationTrail( 50, 100, 100 ) +Escort:MenusAirplanes( 50, 50, 0, 0, 50, 50, 6 ) +Escort:SetEscortSpawnMission() +Escort:__Start( 5 ) + diff --git a/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz b/AI/AI_Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz similarity index 100% rename from ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz rename to AI/AI_Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz diff --git a/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua b/AI/AI_Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua similarity index 97% rename from ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua rename to AI/AI_Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua index 90fb82bfa1..a4ce5a3457 100644 --- a/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua +++ b/AI/AI_Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua @@ -1,51 +1,51 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "HQ" ) - -Mission = MISSION - :New( CommandCenter, "Rescue Operation", "Tactical", "Transport General Mc. Connor!", coalition.side.BLUE ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "HeadQuarter" ) ) - -local CargoSet = SET_CARGO:New():FilterTypes( "General" ):FilterStart() -WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Rescue the general and transport him to the HeadQuarter (near the airbase Gudauta)." ) - -EscortSpawn = SPAWN:NewWithAlias( "Blue A2G Escort Template" ):InitLimit( 6, 6 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Gudauta ), AIRBASE.TerminalType.OpenMedOrBig ) - - - -local EscortUnit = UNIT:FindByName( "Transport" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Gudauta), "A2G", "Rescue the engineer from the village Lesselide near the station. Beware of enemy air defenses. Use the escorts wisely." ) -Escort:FormationTrail( 50, 100, 100 ) - -Escort:SetEscortSpawnMission() - -Escort:MenuJoinUp() - -Escort:MenuFormationTrail( 50, 50, 0 ) -Escort:MenuFormationLeftLine( 0, 0, 50, 50 ) -Escort:MenuFormationRightLine( 0, 0, 50, 50 ) - - -Escort:MenuHoldAtEscortPosition( 30, 0 ) -Escort:MenuHoldAtEscortPosition( 100, 0 ) -Escort:MenuHoldAtLeaderPosition( 30, 0 ) -Escort:MenuHoldAtLeaderPosition( 100, 0 ) - -Escort:MenuFlare() -Escort:MenuSmoke() - -Escort:MenuTargets( 60 ) -Escort:MenuROE() -Escort:MenuROT() - -Escort:__Start( 5 ) - - +-- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "HQ" ) + +Mission = MISSION + :New( CommandCenter, "Rescue Operation", "Tactical", "Transport General Mc. Connor!", coalition.side.BLUE ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "HeadQuarter" ) ) + +local CargoSet = SET_CARGO:New():FilterTypes( "General" ):FilterStart() +WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Rescue the general and transport him to the HeadQuarter (near the airbase Gudauta)." ) + +EscortSpawn = SPAWN:NewWithAlias( "Blue A2G Escort Template" ):InitLimit( 6, 6 ) +EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Gudauta ), AIRBASE.TerminalType.OpenMedOrBig ) + + + +local EscortUnit = UNIT:FindByName( "Transport" ) + +Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Gudauta), "A2G", "Rescue the engineer from the village Lesselide near the station. Beware of enemy air defenses. Use the escorts wisely." ) +Escort:FormationTrail( 50, 100, 100 ) + +Escort:SetEscortSpawnMission() + +Escort:MenuJoinUp() + +Escort:MenuFormationTrail( 50, 50, 0 ) +Escort:MenuFormationLeftLine( 0, 0, 50, 50 ) +Escort:MenuFormationRightLine( 0, 0, 50, 50 ) + + +Escort:MenuHoldAtEscortPosition( 30, 0 ) +Escort:MenuHoldAtEscortPosition( 100, 0 ) +Escort:MenuHoldAtLeaderPosition( 30, 0 ) +Escort:MenuHoldAtLeaderPosition( 100, 0 ) + +Escort:MenuFlare() +Escort:MenuSmoke() + +Escort:MenuTargets( 60 ) +Escort:MenuROE() +Escort:MenuROT() + +Escort:__Start( 5 ) + + diff --git a/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz b/AI/AI_Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz similarity index 100% rename from ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz rename to AI/AI_Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz diff --git a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua b/AI/AI_Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua similarity index 98% rename from FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua rename to AI/AI_Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua index 9a87b788e2..7bb1852a55 100644 --- a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua +++ b/AI/AI_Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ):TestSmokeDirectionVector(true) -LargeFormation:FormationLeftLine( 500, 0, 250, 0 ) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ):TestSmokeDirectionVector(true) +LargeFormation:FormationLeftLine( 500, 0, 250, 0 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz b/AI/AI_Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz similarity index 100% rename from FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz rename to AI/AI_Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz diff --git a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua b/AI/AI_Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua similarity index 97% rename from FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua rename to AI/AI_Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua index 9fd2e661ee..b6c474add3 100644 --- a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua +++ b/AI/AI_Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ) -LargeFormation:FormationLeftLine( 0, 0, 250, 250 ) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ) +LargeFormation:FormationLeftLine( 0, 0, 250, 250 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz b/AI/AI_Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz rename to AI/AI_Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz diff --git a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua b/AI/AI_Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua similarity index 97% rename from FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua rename to AI/AI_Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua index 4d8d532349..1ae1013f78 100644 --- a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua +++ b/AI/AI_Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Line Formation", "Briefing" ) -LargeFormation:FormationRightLine(500,0,250,250) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Line Formation", "Briefing" ) +LargeFormation:FormationRightLine(500,0,250,250) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz b/AI/AI_Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz rename to AI/AI_Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz diff --git a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua b/AI/AI_Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua similarity index 97% rename from FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua rename to AI/AI_Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua index 8367fc8c98..d5971c2c81 100644 --- a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua +++ b/AI/AI_Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Wing Formation", "Briefing" ) -LargeFormation:FormationLeftWing( 500, 50, 0, 250, 250 ) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Wing Formation", "Briefing" ) +LargeFormation:FormationLeftWing( 500, 50, 0, 250, 250 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz b/AI/AI_Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz rename to AI/AI_Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz diff --git a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua b/AI/AI_Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua similarity index 98% rename from FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua rename to AI/AI_Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua index 543fb90f63..65f7663d9f 100644 --- a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua +++ b/AI/AI_Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Wing Formation", "Briefing" ) -LargeFormation:FormationRightWing( 100, 50, 0, 500, 500 ) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Wing Formation", "Briefing" ) +LargeFormation:FormationRightWing( 100, 50, 0, 500, 500 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz b/AI/AI_Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz rename to AI/AI_Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz diff --git a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua b/AI/AI_Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua similarity index 98% rename from FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua rename to AI/AI_Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua index 55dc30c280..e9e81ce8df 100644 --- a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua +++ b/AI/AI_Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" ) -LargeFormation:FormationCenterWing( 500, 50, 0, 0, 250, 250 ) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" ) +LargeFormation:FormationCenterWing( 500, 50, 0, 0, 250, 250 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz b/AI/AI_Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz rename to AI/AI_Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz diff --git a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua b/AI/AI_Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua similarity index 97% rename from FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua rename to AI/AI_Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua index 7e42d02086..c17743225d 100644 --- a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua +++ b/AI/AI_Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua @@ -1,8 +1,8 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) -LargeFormation:FormationTrail( 250, 750 , 0 ) -LargeFormation:__Start( 1 ) - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) +LargeFormation:FormationTrail( 250, 750 , 0 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz b/AI/AI_Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz rename to AI/AI_Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz diff --git a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua b/AI/AI_Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua similarity index 97% rename from FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua rename to AI/AI_Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua index 3b66832f05..83f3cfbd95 100644 --- a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua +++ b/AI/AI_Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua @@ -1,10 +1,10 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) -LargeFormation:FormationBox(150,120,0,-5,0,60,8) -LargeFormation:__Start( 1 ) - -collectgarbage() - + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) +LargeFormation:FormationBox(150,120,0,-5,0,60,8) +LargeFormation:__Start( 1 ) + +collectgarbage() + diff --git a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz b/AI/AI_Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz similarity index 100% rename from FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz rename to AI/AI_Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz diff --git a/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua b/Cargo/Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua similarity index 97% rename from CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua rename to Cargo/Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua index d1f6e4350c..4df5cc8d0f 100644 --- a/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua +++ b/Cargo/Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua @@ -1,11 +1,11 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrier ) - + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrier ) + diff --git a/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz b/Cargo/Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz similarity index 100% rename from CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz rename to Cargo/Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz diff --git a/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua b/Cargo/Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua similarity index 97% rename from CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua rename to Cargo/Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua index 451ba67388..bbc6edc586 100644 --- a/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua +++ b/Cargo/Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua @@ -1,11 +1,11 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. -InfantryCargo:Load( CargoCarrier ) - --- This will Unboard the Cargo from the Carrier. + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. +InfantryCargo:Load( CargoCarrier ) + +-- This will Unboard the Cargo from the Carrier. InfantryCargo:UnBoard() \ No newline at end of file diff --git a/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz b/Cargo/Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz similarity index 100% rename from CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz rename to Cargo/Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz diff --git a/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua b/Cargo/Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua similarity index 97% rename from CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua rename to Cargo/Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua index 9bb3e6ec97..6cf1b1f696 100644 --- a/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua +++ b/Cargo/Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua @@ -1,25 +1,25 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) - -CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrierFrom ) - --- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. -function InfantryCargo:OnEnterLoaded() - self:__UnBoard( 1 ) - self.OnEnterLoaded = nil -end - --- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. -function InfantryCargo:OnEnterUnLoaded() - self:__Board( 1, CargoCarrierTo ) - self.OnEnterUnLoaded = nil -end - + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) + +CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrierFrom ) + +-- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. +function InfantryCargo:OnEnterLoaded() + self:__UnBoard( 1 ) + self.OnEnterLoaded = nil +end + +-- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. +function InfantryCargo:OnEnterUnLoaded() + self:__Board( 1, CargoCarrierTo ) + self.OnEnterUnLoaded = nil +end + diff --git a/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz b/Cargo/Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz similarity index 100% rename from CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz rename to Cargo/Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz diff --git a/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua b/Cargo/Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua similarity index 96% rename from CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua rename to Cargo/Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua index e4364054f4..041dcb92e7 100644 --- a/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua +++ b/Cargo/Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua @@ -1,25 +1,25 @@ ---- --- Name: CGO-101 - Group Boarding --- Author: FlightControl --- Date Created: 13 Apr 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is boarding the Carrier "Carrier". --- --- # Test cases: --- --- 1. Observe that the cargo is boarding. --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrier, 25 ) - +--- +-- Name: CGO-101 - Group Boarding +-- Author: FlightControl +-- Date Created: 13 Apr 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is boarding the Carrier "Carrier". +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is boarding. +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrier, 25 ) + diff --git a/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz b/Cargo/Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz similarity index 100% rename from CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz rename to Cargo/Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz diff --git a/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua b/Cargo/Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua similarity index 96% rename from CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua rename to Cargo/Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua index 24ba927e4b..562338d8d8 100644 --- a/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua +++ b/Cargo/Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua @@ -1,25 +1,25 @@ ---- --- Name: CGO-102 - Group Unboarding --- Author: FlightControl --- Date Created: 13 Apr 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is unboarding the Carrier "Carrier". --- --- # Test cases: --- --- 1. Observe that the cargo is unboarding. --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. -InfantryCargo:Load( CargoCarrier ) - --- This will Unboard the Cargo from the Carrier. +--- +-- Name: CGO-102 - Group Unboarding +-- Author: FlightControl +-- Date Created: 13 Apr 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is unboarding the Carrier "Carrier". +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is unboarding. +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. +InfantryCargo:Load( CargoCarrier ) + +-- This will Unboard the Cargo from the Carrier. InfantryCargo:UnBoard() \ No newline at end of file diff --git a/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz b/Cargo/Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz similarity index 100% rename from CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz rename to Cargo/Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz diff --git a/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua b/Cargo/Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua similarity index 97% rename from CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua rename to Cargo/Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua index 9500e28fd0..61176ff873 100644 --- a/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua +++ b/Cargo/Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua @@ -1,40 +1,40 @@ ---- --- Name: CGO-103 - Group Tranferring --- Author: FlightControl --- Date Created: 13 Apr 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is tranferring from the APC "CarrierFrom" to the APC "CarrierTo". --- --- # Test cases: --- --- 1. Observe that the cargo is boarding the APC "CarrierFrom". --- 2. Observe that the cargo is unboarding the APC "CarrierFrom". --- 3. Observe that the cargo is boarding the APC "CarrierTo". --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) - -local CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrierFrom, 20 ) - --- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. -function InfantryCargo:OnEnterLoaded() - self:__UnBoard( 1 ) - self.OnEnterLoaded = nil -end - --- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. -function InfantryCargo:OnEnterUnLoaded() - self:__Board( 1, CargoCarrierTo, 20 ) - self.OnEnterUnLoaded = nil -end +--- +-- Name: CGO-103 - Group Tranferring +-- Author: FlightControl +-- Date Created: 13 Apr 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is tranferring from the APC "CarrierFrom" to the APC "CarrierTo". +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is boarding the APC "CarrierFrom". +-- 2. Observe that the cargo is unboarding the APC "CarrierFrom". +-- 3. Observe that the cargo is boarding the APC "CarrierTo". +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) + +local CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrierFrom, 20 ) + +-- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. +function InfantryCargo:OnEnterLoaded() + self:__UnBoard( 1 ) + self.OnEnterLoaded = nil +end + +-- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. +function InfantryCargo:OnEnterUnLoaded() + self:__Board( 1, CargoCarrierTo, 20 ) + self.OnEnterUnLoaded = nil +end diff --git a/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz b/Cargo/Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz similarity index 100% rename from CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz rename to Cargo/Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz diff --git a/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua b/Cargo/Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua similarity index 96% rename from CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua rename to Cargo/Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua index acb6b45b01..a7f0a688d6 100644 --- a/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua +++ b/Cargo/Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua @@ -1,29 +1,29 @@ ---- --- Name: CGO-110 - Group Respawn --- Author: FlightControl --- Date Created: 07 Jul 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is Respawned after boarding the carrier. --- --- # Test cases: --- --- 1. Observe that the cargo is Respawned after boarding the Carrier. --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrier, 25 ) - -function InfantryCargo:OnEnterLoaded() - InfantryCargo:Respawn() - InfantryCargo:Board( CargoCarrier, 25 ) +--- +-- Name: CGO-110 - Group Respawn +-- Author: FlightControl +-- Date Created: 07 Jul 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is Respawned after boarding the carrier. +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is Respawned after boarding the Carrier. +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrier, 25 ) + +function InfantryCargo:OnEnterLoaded() + InfantryCargo:Respawn() + InfantryCargo:Board( CargoCarrier, 25 ) end \ No newline at end of file diff --git a/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz b/Cargo/Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz similarity index 100% rename from CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz rename to Cargo/Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz diff --git a/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua b/Cargo/Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua similarity index 97% rename from CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua rename to Cargo/Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua index 5449922014..c26fa24fa1 100644 --- a/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua +++ b/Cargo/Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua @@ -1,11 +1,11 @@ - -DeliveryUnit = UNIT:FindByName( "Delivery" ) -Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -Letter:Board( CargoCarrier, 40, 3, 25, 90 ) - + +DeliveryUnit = UNIT:FindByName( "Delivery" ) +Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +Letter:Board( CargoCarrier, 40, 3, 25, 90 ) + diff --git a/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz b/Cargo/Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz similarity index 100% rename from CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz rename to Cargo/Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz diff --git a/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua b/Cargo/Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua similarity index 98% rename from CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua rename to Cargo/Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua index bf6a623482..716b6186cc 100644 --- a/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua +++ b/Cargo/Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua @@ -1,13 +1,13 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This will Load the Cargo into the Carrier, regardless where the Cargo is. -InfantryCargo:Load( CargoCarrier ) - --- This will Unboard the Cargo from the Carrier. --- The Cargo will run from the Carrier to a point in the NearRadius around the Carrier. --- Unboard the Cargo with a speed of 10 km/h, go to 200 meters 180 degrees from the Carrier, iin a zone of 25 meters (NearRadius). + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This will Load the Cargo into the Carrier, regardless where the Cargo is. +InfantryCargo:Load( CargoCarrier ) + +-- This will Unboard the Cargo from the Carrier. +-- The Cargo will run from the Carrier to a point in the NearRadius around the Carrier. +-- Unboard the Cargo with a speed of 10 km/h, go to 200 meters 180 degrees from the Carrier, iin a zone of 25 meters (NearRadius). InfantryCargo:UnBoard( 10, 2, 20, 10, 180 ) \ No newline at end of file diff --git a/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz b/Cargo/Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz similarity index 100% rename from CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz rename to Cargo/Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz diff --git a/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua b/Cargo/Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua similarity index 97% rename from CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua rename to Cargo/Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua index eb16333be9..9bedd3b72a 100644 --- a/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua +++ b/Cargo/Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua @@ -1,11 +1,11 @@ - -Barrels = STATIC:FindByName( "Barrels" ) -CargoBarrels = CARGO_CRATE:New( Barrels, "EAQ-234-432" ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -CargoBarrels:Load( CargoCarrier ) - + +Barrels = STATIC:FindByName( "Barrels" ) +CargoBarrels = CARGO_CRATE:New( Barrels, "EAQ-234-432" ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +CargoBarrels:Load( CargoCarrier ) + diff --git a/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz b/Cargo/Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz similarity index 100% rename from CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz rename to Cargo/Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz diff --git a/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua b/Cargo/Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua similarity index 97% rename from CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua rename to Cargo/Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua index 52b5eaff70..0db80b2cbe 100644 --- a/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua +++ b/Cargo/Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua @@ -1,3 +1,3 @@ -InfantryUnitSet = SET_UNIT:New():FilterCategories("ground"):FilterPrefixes("Infantry"):FilterOnce() -InfantryUnitSet:Flush() - +InfantryUnitSet = SET_UNIT:New():FilterCategories("ground"):FilterPrefixes("Infantry"):FilterOnce() +InfantryUnitSet:Flush() + diff --git a/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz b/Cargo/Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz similarity index 100% rename from CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz rename to Cargo/Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz diff --git a/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua b/Core/Base/Event-Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua similarity index 95% rename from EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua rename to Core/Base/Event-Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua index 5823bbe670..b2257c66ae 100644 --- a/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua +++ b/Core/Base/Event-Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua @@ -1,40 +1,40 @@ ---- --- Name: EVT-001 - API Demo 1 --- Author: FlightControl --- Date Created: 7 February 2017 --- --- # Situation: --- --- A task shoots another tank. If one of the is dead, the event will be catched. --- --- # Test cases: --- --- 1. Observe the tanks shooting each other. --- 2. If one of the tanks die, an event will be catched. --- 3. Observe the surviving unit smoking. - - -local Tank1 = UNIT:FindByName( "Tank A" ) -local Tank2 = UNIT:FindByName( "Tank B" ) - -Tank1:HandleEvent( EVENTS.Dead ) - -Tank2:HandleEvent( EVENTS.Dead ) - ---- @param Wrapper.Unit#UNIT self -function Tank1:OnEventDead( EventData ) - - self:SmokeGreen() -end - ---- @param Wrapper.Unit#UNIT self -function Tank2:OnEventDead( EventData ) - - self:SmokeBlue() -end - -function Tank2:OnEventCrash(EventData) - -end - - +--- +-- Name: EVT-001 - API Demo 1 +-- Author: FlightControl +-- Date Created: 7 February 2017 +-- +-- # Situation: +-- +-- A task shoots another tank. If one of the is dead, the event will be catched. +-- +-- # Test cases: +-- +-- 1. Observe the tanks shooting each other. +-- 2. If one of the tanks die, an event will be catched. +-- 3. Observe the surviving unit smoking. + + +local Tank1 = UNIT:FindByName( "Tank A" ) +local Tank2 = UNIT:FindByName( "Tank B" ) + +Tank1:HandleEvent( EVENTS.Dead ) + +Tank2:HandleEvent( EVENTS.Dead ) + +--- @param Wrapper.Unit#UNIT self +function Tank1:OnEventDead( EventData ) + + self:SmokeGreen() +end + +--- @param Wrapper.Unit#UNIT self +function Tank2:OnEventDead( EventData ) + + self:SmokeBlue() +end + +function Tank2:OnEventCrash(EventData) + +end + + diff --git a/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz b/Core/Base/Event-Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz similarity index 100% rename from EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz rename to Core/Base/Event-Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-001 - UNIT OnEventShot Stability Test.lua b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua similarity index 96% rename from EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-001 - UNIT OnEventShot Stability Test.lua rename to Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua index 45b712876b..01d65f45ca 100644 --- a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-001 - UNIT OnEventShot Stability Test.lua +++ b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua @@ -1,74 +1,74 @@ ---- --- Name: EVT-001 - UNIT OnEventShot Stability Test --- Author: FlightControl --- Date Created: 9 Apr 2017 --- --- # Situation: --- --- A couple of planes are firing to each other. Monitor the shot events. --- I am doing a collectgarbage to test the stability of the event handling. --- Also when the planes are destroyed, the event handling should stop etc. --- The tests are on GROUP level. --- --- # Test cases: --- --- 1. Observe the planes shooting the missiles. --- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the stability of the event handlings. - -PlaneGroupsBlue = {} - -PlaneGroupsRed = {} - -PlaneSpawnBlue = SPAWN - :New( "Planes Blue" ) - :InitLimit( 2, 0 ) - :SpawnScheduled( 10,0 ) - :OnSpawnGroup( - function( SpawnGroup ) - SpawnGroupName = SpawnGroup:GetName() - PlaneGroupsBlue[SpawnGroupName] = SpawnGroup - PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Shot ) - PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Hit ) - collectgarbage() - PlaneGroupsBlue[SpawnGroupName].OnEventShot = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) - end - PlaneGroupsBlue[SpawnGroupName].OnEventHit = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just got hit!", 15, "Alert!" ) - end - end - ) - -PlaneSpawnRed = SPAWN - :New( "Planes Red" ) - :InitLimit( 2, 0 ) - :SpawnScheduled(10,0) - :OnSpawnGroup( - function( SpawnGroup ) - SpawnGroupName = SpawnGroup:GetName() - PlaneGroupsRed[SpawnGroupName] = SpawnGroup - PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Shot ) - PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Hit ) - collectgarbage() - --- @param self - -- @param Core.Event#EVENTDATA EventData - PlaneGroupsRed[SpawnGroupName].OnEventShot = function ( self, EventData ) - self:F( EventData ) - - self:MessageToAll( "I just got hit!", 15, "Alert!" ) - end - PlaneGroupsRed[SpawnGroupName].OnEventHit = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) - end - end - ) - -collectgarbage() -BASE:E( "Collected garbage" ) - - - +--- +-- Name: EVT-001 - UNIT OnEventShot Stability Test +-- Author: FlightControl +-- Date Created: 9 Apr 2017 +-- +-- # Situation: +-- +-- A couple of planes are firing to each other. Monitor the shot events. +-- I am doing a collectgarbage to test the stability of the event handling. +-- Also when the planes are destroyed, the event handling should stop etc. +-- The tests are on GROUP level. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missiles. +-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the stability of the event handlings. + +PlaneGroupsBlue = {} + +PlaneGroupsRed = {} + +PlaneSpawnBlue = SPAWN + :New( "Planes Blue" ) + :InitLimit( 2, 0 ) + :SpawnScheduled( 10,0 ) + :OnSpawnGroup( + function( SpawnGroup ) + SpawnGroupName = SpawnGroup:GetName() + PlaneGroupsBlue[SpawnGroupName] = SpawnGroup + PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Shot ) + PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Hit ) + collectgarbage() + PlaneGroupsBlue[SpawnGroupName].OnEventShot = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) + end + PlaneGroupsBlue[SpawnGroupName].OnEventHit = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just got hit!", 15, "Alert!" ) + end + end + ) + +PlaneSpawnRed = SPAWN + :New( "Planes Red" ) + :InitLimit( 2, 0 ) + :SpawnScheduled(10,0) + :OnSpawnGroup( + function( SpawnGroup ) + SpawnGroupName = SpawnGroup:GetName() + PlaneGroupsRed[SpawnGroupName] = SpawnGroup + PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Shot ) + PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Hit ) + collectgarbage() + --- @param self + -- @param Core.Event#EVENTDATA EventData + PlaneGroupsRed[SpawnGroupName].OnEventShot = function ( self, EventData ) + self:F( EventData ) + + self:MessageToAll( "I just got hit!", 15, "Alert!" ) + end + PlaneGroupsRed[SpawnGroupName].OnEventHit = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) + end + end + ) + +collectgarbage() +BASE:E( "Collected garbage" ) + + + diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz similarity index 100% rename from EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz rename to Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua similarity index 96% rename from EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua rename to Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua index 99c4edd3bf..40a6378026 100644 --- a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua +++ b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua @@ -1,40 +1,40 @@ ---- --- Name: EVT-002 - UNIT OnEventLand ReSpawn Test --- Author: FlightControl --- Date Created: 9 Apr 2017 --- --- # Situation: --- --- A couple of planes are taking off from an airbase. --- When they land, they send out a message that they landed. --- But! They are automatically respawned upon landing. --- The 2nd time the same plane lands, they should send the message again!!! --- --- # Test cases: --- --- 1. Observe in the logging, that the event subscriptions are reset when the respawn happens! --- 2. Observe the 2nd time the same plane lands, they should send the message again!!! --- 3. Check the stability of the event handlings. - -PlaneBlueSpawn = SPAWN - :New( "PlaneBlue" ) - :InitLimit(2,0) - :InitRepeatOnEngineShutDown() - :SpawnScheduled(60,0) - :OnSpawnGroup( - --- @param Wrapper.Group#GROUP SpawnGroup - function( SpawnGroup ) - SpawnGroup:HandleEvent( EVENTS.Land ) - --- @param self - -- @param Core.Event#EVENTDATA EventData - function SpawnGroup:OnEventLand(EventData) - EventData.IniGroup:MessageToAll("Landed",15,"Land Event") - end - end - ) - -collectgarbage() -BASE:E( "Collected garbage" ) - - - +--- +-- Name: EVT-002 - UNIT OnEventLand ReSpawn Test +-- Author: FlightControl +-- Date Created: 9 Apr 2017 +-- +-- # Situation: +-- +-- A couple of planes are taking off from an airbase. +-- When they land, they send out a message that they landed. +-- But! They are automatically respawned upon landing. +-- The 2nd time the same plane lands, they should send the message again!!! +-- +-- # Test cases: +-- +-- 1. Observe in the logging, that the event subscriptions are reset when the respawn happens! +-- 2. Observe the 2nd time the same plane lands, they should send the message again!!! +-- 3. Check the stability of the event handlings. + +PlaneBlueSpawn = SPAWN + :New( "PlaneBlue" ) + :InitLimit(2,0) + :InitRepeatOnEngineShutDown() + :SpawnScheduled(60,0) + :OnSpawnGroup( + --- @param Wrapper.Group#GROUP SpawnGroup + function( SpawnGroup ) + SpawnGroup:HandleEvent( EVENTS.Land ) + --- @param self + -- @param Core.Event#EVENTDATA EventData + function SpawnGroup:OnEventLand(EventData) + EventData.IniGroup:MessageToAll("Landed",15,"Land Event") + end + end + ) + +collectgarbage() +BASE:E( "Collected garbage" ) + + + diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-001 - UNIT OnEventShot Stability Test.lua similarity index 96% rename from EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua rename to Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-001 - UNIT OnEventShot Stability Test.lua index 45b712876b..01d65f45ca 100644 --- a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua +++ b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-001 - UNIT OnEventShot Stability Test.lua @@ -1,74 +1,74 @@ ---- --- Name: EVT-001 - UNIT OnEventShot Stability Test --- Author: FlightControl --- Date Created: 9 Apr 2017 --- --- # Situation: --- --- A couple of planes are firing to each other. Monitor the shot events. --- I am doing a collectgarbage to test the stability of the event handling. --- Also when the planes are destroyed, the event handling should stop etc. --- The tests are on GROUP level. --- --- # Test cases: --- --- 1. Observe the planes shooting the missiles. --- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the stability of the event handlings. - -PlaneGroupsBlue = {} - -PlaneGroupsRed = {} - -PlaneSpawnBlue = SPAWN - :New( "Planes Blue" ) - :InitLimit( 2, 0 ) - :SpawnScheduled( 10,0 ) - :OnSpawnGroup( - function( SpawnGroup ) - SpawnGroupName = SpawnGroup:GetName() - PlaneGroupsBlue[SpawnGroupName] = SpawnGroup - PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Shot ) - PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Hit ) - collectgarbage() - PlaneGroupsBlue[SpawnGroupName].OnEventShot = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) - end - PlaneGroupsBlue[SpawnGroupName].OnEventHit = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just got hit!", 15, "Alert!" ) - end - end - ) - -PlaneSpawnRed = SPAWN - :New( "Planes Red" ) - :InitLimit( 2, 0 ) - :SpawnScheduled(10,0) - :OnSpawnGroup( - function( SpawnGroup ) - SpawnGroupName = SpawnGroup:GetName() - PlaneGroupsRed[SpawnGroupName] = SpawnGroup - PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Shot ) - PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Hit ) - collectgarbage() - --- @param self - -- @param Core.Event#EVENTDATA EventData - PlaneGroupsRed[SpawnGroupName].OnEventShot = function ( self, EventData ) - self:F( EventData ) - - self:MessageToAll( "I just got hit!", 15, "Alert!" ) - end - PlaneGroupsRed[SpawnGroupName].OnEventHit = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) - end - end - ) - -collectgarbage() -BASE:E( "Collected garbage" ) - - - +--- +-- Name: EVT-001 - UNIT OnEventShot Stability Test +-- Author: FlightControl +-- Date Created: 9 Apr 2017 +-- +-- # Situation: +-- +-- A couple of planes are firing to each other. Monitor the shot events. +-- I am doing a collectgarbage to test the stability of the event handling. +-- Also when the planes are destroyed, the event handling should stop etc. +-- The tests are on GROUP level. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missiles. +-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the stability of the event handlings. + +PlaneGroupsBlue = {} + +PlaneGroupsRed = {} + +PlaneSpawnBlue = SPAWN + :New( "Planes Blue" ) + :InitLimit( 2, 0 ) + :SpawnScheduled( 10,0 ) + :OnSpawnGroup( + function( SpawnGroup ) + SpawnGroupName = SpawnGroup:GetName() + PlaneGroupsBlue[SpawnGroupName] = SpawnGroup + PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Shot ) + PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Hit ) + collectgarbage() + PlaneGroupsBlue[SpawnGroupName].OnEventShot = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) + end + PlaneGroupsBlue[SpawnGroupName].OnEventHit = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just got hit!", 15, "Alert!" ) + end + end + ) + +PlaneSpawnRed = SPAWN + :New( "Planes Red" ) + :InitLimit( 2, 0 ) + :SpawnScheduled(10,0) + :OnSpawnGroup( + function( SpawnGroup ) + SpawnGroupName = SpawnGroup:GetName() + PlaneGroupsRed[SpawnGroupName] = SpawnGroup + PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Shot ) + PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Hit ) + collectgarbage() + --- @param self + -- @param Core.Event#EVENTDATA EventData + PlaneGroupsRed[SpawnGroupName].OnEventShot = function ( self, EventData ) + self:F( EventData ) + + self:MessageToAll( "I just got hit!", 15, "Alert!" ) + end + PlaneGroupsRed[SpawnGroupName].OnEventHit = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) + end + end + ) + +collectgarbage() +BASE:E( "Collected garbage" ) + + + diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua similarity index 96% rename from EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua rename to Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua index 21a228cd8d..5056baa534 100644 --- a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua +++ b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua @@ -1,40 +1,40 @@ ---- --- Name: EVT-002 - UNIT OnEventLand ReSpawn Test --- Author: FlightControl --- Date Created: 9 Apr 2017 --- --- # Situation: --- --- A couple of planes are taking off from an airbase. --- When they land, they send out a message that they landed. --- But! They are automatically respawned upon landing. --- The 2nd time the same plane lands, they should send the message again!!! --- --- # Test cases: --- --- 1. Observe in the logging, that the event subscriptions are reset when the respawn happens! --- 2. Observe the 2nd time the same plane lands, they should send the message again!!! --- 3. Check the stability of the event handlings. - -PlaneBlueSpawn = SPAWN - :New( "PlaneBlue" ) - :InitLimit(2,0) - :InitRepeatOnEngineShutDown() - :SpawnScheduled(60,0) - :OnSpawnGroup( - --- @param Wrapper.Group#GROUP SpawnGroup - function( SpawnGroup ) - SpawnGroup:HandleEvent( EVENTS.Land ) - --- @param self - -- @param Core.Event#EVENTDATA EventData - function SpawnGroup:OnEventLand(EventData) - EventData.IniGroup:MessageToAll("Landed",15,"Land Event") - end - end - ) - -collectgarbage() -BASE:E( "Collected garbage" ) - - - +--- +-- Name: EVT-002 - UNIT OnEventLand ReSpawn Test +-- Author: FlightControl +-- Date Created: 9 Apr 2017 +-- +-- # Situation: +-- +-- A couple of planes are taking off from an airbase. +-- When they land, they send out a message that they landed. +-- But! They are automatically respawned upon landing. +-- The 2nd time the same plane lands, they should send the message again!!! +-- +-- # Test cases: +-- +-- 1. Observe in the logging, that the event subscriptions are reset when the respawn happens! +-- 2. Observe the 2nd time the same plane lands, they should send the message again!!! +-- 3. Check the stability of the event handlings. + +PlaneBlueSpawn = SPAWN + :New( "PlaneBlue" ) + :InitLimit(2,0) + :InitRepeatOnEngineShutDown() + :SpawnScheduled(60,0) + :OnSpawnGroup( + --- @param Wrapper.Group#GROUP SpawnGroup + function( SpawnGroup ) + SpawnGroup:HandleEvent( EVENTS.Land ) + --- @param self + -- @param Core.Event#EVENTDATA EventData + function SpawnGroup:OnEventLand(EventData) + EventData.IniGroup:MessageToAll("Landed",15,"Land Event") + end + end + ) + +collectgarbage() +BASE:E( "Collected garbage" ) + + + diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz similarity index 100% rename from EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz rename to Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz diff --git a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua b/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua similarity index 96% rename from EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua rename to Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua index ecb969b15a..2f84ad795d 100644 --- a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua +++ b/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua @@ -1,25 +1,25 @@ ---- --- Name: EVT-100 - UNIT OnEventShot Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A plane is flying in the air and shoots an missile to a ground target. --- --- # Test cases: --- --- 1. Observe the plane shooting the missile. --- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_SHOT entry. - -Plane = UNIT:FindByName( "Plane" ) - -Plane:HandleEvent( EVENTS.Shot ) - -function Plane:OnEventShot( EventData ) - - Plane:MessageToAll( "I just fired a missile!", 15, "Alert!" ) -end - - +--- +-- Name: EVT-100 - UNIT OnEventShot Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_SHOT entry. + +Plane = UNIT:FindByName( "Plane" ) + +Plane:HandleEvent( EVENTS.Shot ) + +function Plane:OnEventShot( EventData ) + + Plane:MessageToAll( "I just fired a missile!", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz b/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz similarity index 100% rename from EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz rename to Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz diff --git a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua b/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua similarity index 95% rename from EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua rename to Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua index 5eef52c4f5..03c8435ab3 100644 --- a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua +++ b/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua @@ -1,32 +1,32 @@ ---- --- Name: EVT-101 - UNIT OnEventHit Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A plane is flying in the air and shoots an missile to a ground target. --- --- # Test cases: --- --- 1. Observe the plane shooting the missile. --- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. - -Plane = UNIT:FindByName( "Plane" ) - -Tank = UNIT:FindByName( "Tank" ) - -Plane:HandleEvent( EVENTS.Hit ) -Tank:HandleEvent( EVENTS.Hit ) - -function Plane:OnEventHit( EventData ) - - Plane:MessageToAll( "I just got hit!", 15, "Alert!" ) -end - -function Tank:OnEventHit( EventData ) - Tank:MessageToAll( "I just got hit!", 15, "Alert!" ) -end - - +--- +-- Name: EVT-101 - UNIT OnEventHit Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. + +Plane = UNIT:FindByName( "Plane" ) + +Tank = UNIT:FindByName( "Tank" ) + +Plane:HandleEvent( EVENTS.Hit ) +Tank:HandleEvent( EVENTS.Hit ) + +function Plane:OnEventHit( EventData ) + + Plane:MessageToAll( "I just got hit!", 15, "Alert!" ) +end + +function Tank:OnEventHit( EventData ) + Tank:MessageToAll( "I just got hit!", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz b/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz similarity index 100% rename from EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz rename to Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz diff --git a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua b/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua similarity index 96% rename from EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua rename to Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua index 8f6fa59ddc..203d946db3 100644 --- a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua +++ b/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua @@ -1,33 +1,33 @@ ---- --- Name: EVT-102 - UNIT OnEventTakeoff Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A human plane and an AI plane are taking off from an airfield. --- --- # Test cases: --- --- 1. Take-Off the planes from the runway. --- 2. When the planes take-off, observe the message being sent. --- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file. - -PlaneAI = UNIT:FindByName( "PlaneAI" ) - -PlaneHuman = UNIT:FindByName( "PlaneHuman" ) - -PlaneAI:HandleEvent( EVENTS.Takeoff ) -PlaneHuman:HandleEvent( EVENTS.Takeoff ) - -function PlaneAI:OnEventTakeoff( EventData ) - - PlaneHuman:MessageToAll( "AI Taking Off", 15, "Alert!" ) -end - -function PlaneHuman:OnEventTakeoff( EventData ) - - PlaneHuman:MessageToAll( "Player " .. PlaneHuman:GetPlayerName() .. " is Taking Off", 15, "Alert!" ) -end - - +--- +-- Name: EVT-102 - UNIT OnEventTakeoff Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A human plane and an AI plane are taking off from an airfield. +-- +-- # Test cases: +-- +-- 1. Take-Off the planes from the runway. +-- 2. When the planes take-off, observe the message being sent. +-- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file. + +PlaneAI = UNIT:FindByName( "PlaneAI" ) + +PlaneHuman = UNIT:FindByName( "PlaneHuman" ) + +PlaneAI:HandleEvent( EVENTS.Takeoff ) +PlaneHuman:HandleEvent( EVENTS.Takeoff ) + +function PlaneAI:OnEventTakeoff( EventData ) + + PlaneHuman:MessageToAll( "AI Taking Off", 15, "Alert!" ) +end + +function PlaneHuman:OnEventTakeoff( EventData ) + + PlaneHuman:MessageToAll( "Player " .. PlaneHuman:GetPlayerName() .. " is Taking Off", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz b/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz similarity index 100% rename from EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz rename to Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz diff --git a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua b/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua similarity index 97% rename from EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua rename to Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua index abd53b386f..ba4e7608c6 100644 --- a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua +++ b/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua @@ -1,38 +1,38 @@ ---- --- Name: EVT-103 - UNIT OnEventLand Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- An AI plane is landing on an airfield. --- When the plane landed, a new plane is spawned. --- --- # Test cases: --- --- 1. Observe the plane landing. --- 2. When the AI plane lands, observe the new plane being spawned. --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI". -PlaneAI = UNIT:FindByName( "PlaneAI" ) - --- Create a SPAWN object to spawn a new plane once the hold one lands. -SpawnPlane = SPAWN:New( "SpawnPlaneAI" ) - --- Declare a new variable that will hold the new spawned SpawnPlaneAI -local NewPlane - - --- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. -PlaneAI:HandleEvent( EVENTS.Land ) - --- Because the PlaneAI object is subscribed to the Land event, the following method will be automatically --- called when the land event is happening FOR THE PlaneAI UNIT only! -function PlaneAI:OnEventLand( EventData ) - - -- Okay, the PlaneAI has landed, now spawn the new plane ( a predator ) - NewPlane = SpawnPlane:Spawn() -end - - +--- +-- Name: EVT-103 - UNIT OnEventLand Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- An AI plane is landing on an airfield. +-- When the plane landed, a new plane is spawned. +-- +-- # Test cases: +-- +-- 1. Observe the plane landing. +-- 2. When the AI plane lands, observe the new plane being spawned. +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI". +PlaneAI = UNIT:FindByName( "PlaneAI" ) + +-- Create a SPAWN object to spawn a new plane once the hold one lands. +SpawnPlane = SPAWN:New( "SpawnPlaneAI" ) + +-- Declare a new variable that will hold the new spawned SpawnPlaneAI +local NewPlane + + +-- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. +PlaneAI:HandleEvent( EVENTS.Land ) + +-- Because the PlaneAI object is subscribed to the Land event, the following method will be automatically +-- called when the land event is happening FOR THE PlaneAI UNIT only! +function PlaneAI:OnEventLand( EventData ) + + -- Okay, the PlaneAI has landed, now spawn the new plane ( a predator ) + NewPlane = SpawnPlane:Spawn() +end + + diff --git a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz b/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz similarity index 100% rename from EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz rename to Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz diff --git a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua b/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua similarity index 97% rename from EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua rename to Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua index c738bc0a61..9a66753157 100644 --- a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua +++ b/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua @@ -1,35 +1,35 @@ ---- --- Name: EVT-104 - UNIT OnEventCrash Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A human plane is fyling in the air. Crash it into the ground. --- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... --- --- # Test cases: --- --- 1. Fly the plane into the ground. --- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. --- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. - --- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". -PlaneHuman = UNIT:FindByName( "PlaneHuman" ) - --- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). -PlaneHuman:HandleEvent( EVENTS.Crash ) - --- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically --- called when the Crash event is happening FOR THE PlaneHuman UNIT only! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function PlaneHuman:OnEventCrash( EventData ) - - -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. - self:E( "Smoking at the position" ) - EventData.IniUnit:SmokeOrange() -end - - +--- +-- Name: EVT-104 - UNIT OnEventCrash Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A human plane is fyling in the air. Crash it into the ground. +-- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... +-- +-- # Test cases: +-- +-- 1. Fly the plane into the ground. +-- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. +-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. + +-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". +PlaneHuman = UNIT:FindByName( "PlaneHuman" ) + +-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). +PlaneHuman:HandleEvent( EVENTS.Crash ) + +-- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically +-- called when the Crash event is happening FOR THE PlaneHuman UNIT only! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function PlaneHuman:OnEventCrash( EventData ) + + -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. + self:E( "Smoking at the position" ) + EventData.IniUnit:SmokeOrange() +end + + diff --git a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz b/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz similarity index 100% rename from EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz rename to Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz diff --git a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua b/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua similarity index 97% rename from EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua rename to Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua index d32e50516a..a65d319057 100644 --- a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua +++ b/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua @@ -1,107 +1,107 @@ ---- --- Name: EVT-105 - UNIT OnEventPlayerEnterUnit Example --- Author: FlightControl --- Date Created: 15 Dec 2017 --- --- 2 planes and 2 tanks are located on and near the airport. --- The test is about checking if S_EVENT_PLAYER_ENTER_UNIT is correctly working in DCS single player and multi player. --- The test requires you to jump into the 2 planes and into the 2 tanks using CA. --- Please execute the following scenarios in Single and Multi-Player: --- --- 1. Test in Single Player: --- --- First we need to get the mission running... To do this, do the following actions: --- - At mission startup, once you get the slots, press the ESC key... The slot selection window will disappear. --- - Then press the ESC key again, and in the window, select the menu option "Select Slot". --- --- Next, we select the 2 planes... --- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. --- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. --- --- Next, we select the 2 tanks... Select the MAP view using F10, and: --- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. --- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. --- --- --- 2. Test in Multi Player: --- --- Run the mission on a server, and connect to the mission with a client... --- --- On the client machine, we select the 2 planes... --- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. --- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. --- --- On the client machine, we select the 2 tanks... Select the MAP view using F10, and: --- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. --- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. --- --- --- If all of this is working correctly, then the fix is correctly patched! - - - --- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "Plane x". -Plane1 = CLIENT:FindByName( "Plane 1" ) -Plane2 = CLIENT:FindByName( "Plane 2" ) - --- Subscribe to the event. The event occurs when a player enters a slot. -Plane1:HandleEvent( EVENTS.PlayerEnterUnit ) -Plane2:HandleEvent( EVENTS.PlayerEnterUnit ) - --- Because the Plane object is subscribed to the PlayerEnterUnit event, the following method will be automatically --- called when the event is happening! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Plane1:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeOrange() - MESSAGE:NewType( "A human has entered Plane 1", MESSAGE.Type.Information ):ToAll() -end - - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Plane2:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeRed() - MESSAGE:NewType( "A human has entered Plane 2", MESSAGE.Type.Information ):ToAll() -end - - - - - ---- Now for the ground units -Tank1 = UNIT:FindByName( "Tank 1" ) -Tank2 = UNIT:FindByName( "Tank 2" ) - --- Subscribe to the event. The event occurs when a player enters a slot. -Tank1:HandleEvent( EVENTS.PlayerEnterUnit ) -Tank2:HandleEvent( EVENTS.PlayerEnterUnit ) - - --- Because the Tank object is subscribed to the PlayerEnterUnit event, the following method will be automatically --- called when the event is happening! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Tank1:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeBlue() - MESSAGE:NewType( "A human has entered Tank 1", MESSAGE.Type.Information ):ToAll() -end - - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Tank2:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeGreen() - MESSAGE:NewType( "A human has entered Tank 2", MESSAGE.Type.Information ):ToAll() -end - +--- +-- Name: EVT-105 - UNIT OnEventPlayerEnterUnit Example +-- Author: FlightControl +-- Date Created: 15 Dec 2017 +-- +-- 2 planes and 2 tanks are located on and near the airport. +-- The test is about checking if S_EVENT_PLAYER_ENTER_UNIT is correctly working in DCS single player and multi player. +-- The test requires you to jump into the 2 planes and into the 2 tanks using CA. +-- Please execute the following scenarios in Single and Multi-Player: +-- +-- 1. Test in Single Player: +-- +-- First we need to get the mission running... To do this, do the following actions: +-- - At mission startup, once you get the slots, press the ESC key... The slot selection window will disappear. +-- - Then press the ESC key again, and in the window, select the menu option "Select Slot". +-- +-- Next, we select the 2 planes... +-- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. +-- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. +-- +-- Next, we select the 2 tanks... Select the MAP view using F10, and: +-- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. +-- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. +-- +-- +-- 2. Test in Multi Player: +-- +-- Run the mission on a server, and connect to the mission with a client... +-- +-- On the client machine, we select the 2 planes... +-- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. +-- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. +-- +-- On the client machine, we select the 2 tanks... Select the MAP view using F10, and: +-- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. +-- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. +-- +-- +-- If all of this is working correctly, then the fix is correctly patched! + + + +-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "Plane x". +Plane1 = CLIENT:FindByName( "Plane 1" ) +Plane2 = CLIENT:FindByName( "Plane 2" ) + +-- Subscribe to the event. The event occurs when a player enters a slot. +Plane1:HandleEvent( EVENTS.PlayerEnterUnit ) +Plane2:HandleEvent( EVENTS.PlayerEnterUnit ) + +-- Because the Plane object is subscribed to the PlayerEnterUnit event, the following method will be automatically +-- called when the event is happening! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Plane1:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeOrange() + MESSAGE:NewType( "A human has entered Plane 1", MESSAGE.Type.Information ):ToAll() +end + + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Plane2:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeRed() + MESSAGE:NewType( "A human has entered Plane 2", MESSAGE.Type.Information ):ToAll() +end + + + + + +--- Now for the ground units +Tank1 = UNIT:FindByName( "Tank 1" ) +Tank2 = UNIT:FindByName( "Tank 2" ) + +-- Subscribe to the event. The event occurs when a player enters a slot. +Tank1:HandleEvent( EVENTS.PlayerEnterUnit ) +Tank2:HandleEvent( EVENTS.PlayerEnterUnit ) + + +-- Because the Tank object is subscribed to the PlayerEnterUnit event, the following method will be automatically +-- called when the event is happening! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Tank1:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeBlue() + MESSAGE:NewType( "A human has entered Tank 1", MESSAGE.Type.Information ):ToAll() +end + + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Tank2:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeGreen() + MESSAGE:NewType( "A human has entered Tank 2", MESSAGE.Type.Information ):ToAll() +end + diff --git a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz b/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz similarity index 100% rename from EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz rename to Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz diff --git a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua b/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua similarity index 97% rename from EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua rename to Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua index c4784ffef5..7afed4b7d0 100644 --- a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua +++ b/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua @@ -1,28 +1,28 @@ ---- --- Name: EVT-200 - GROUP OnEventShot Example --- Author: FlightControl --- Date Created: 07 Mar 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_SHOT entry. --- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile. --- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile. - -PlaneGroup = GROUP:FindByName( "Group Plane A" ) - -PlaneGroup:HandleEvent( EVENTS.Shot ) - -function PlaneGroup:OnEventShot( EventData ) - - self:E( "I just fired a missile and I am part of " .. EventData.IniGroupName ) - EventData.IniUnit:MessageToAll( "I just fired a missile and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) -end - - +--- +-- Name: EVT-200 - GROUP OnEventShot Example +-- Author: FlightControl +-- Date Created: 07 Mar 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_SHOT entry. +-- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile. +-- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile. + +PlaneGroup = GROUP:FindByName( "Group Plane A" ) + +PlaneGroup:HandleEvent( EVENTS.Shot ) + +function PlaneGroup:OnEventShot( EventData ) + + self:E( "I just fired a missile and I am part of " .. EventData.IniGroupName ) + EventData.IniUnit:MessageToAll( "I just fired a missile and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz b/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz similarity index 100% rename from EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz rename to Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz diff --git a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua b/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua similarity index 97% rename from EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua rename to Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua index 228b24814a..765419409f 100644 --- a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua +++ b/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua @@ -1,28 +1,28 @@ ---- --- Name: EVT-201 - GROUP OnEventHit Example --- Author: FlightControl --- Date Created: 08 Mar 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. --- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. --- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. - -TanksGroup = GROUP:FindByName( "Group Tanks A" ) - -TanksGroup:HandleEvent( EVENTS.Hit ) - -function TanksGroup:OnEventHit( EventData ) - - self:E( "I just got hit and I am part of " .. EventData.TgtGroupName ) - EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" ) -end - - +--- +-- Name: EVT-201 - GROUP OnEventHit Example +-- Author: FlightControl +-- Date Created: 08 Mar 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. +-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. +-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. + +TanksGroup = GROUP:FindByName( "Group Tanks A" ) + +TanksGroup:HandleEvent( EVENTS.Hit ) + +function TanksGroup:OnEventHit( EventData ) + + self:E( "I just got hit and I am part of " .. EventData.TgtGroupName ) + EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz b/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz similarity index 100% rename from EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz rename to Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua similarity index 97% rename from EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua rename to Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua index 228b24814a..765419409f 100644 --- a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua +++ b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-201 - GROUP OnEventHit Example.lua @@ -1,28 +1,28 @@ ---- --- Name: EVT-201 - GROUP OnEventHit Example --- Author: FlightControl --- Date Created: 08 Mar 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. --- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. --- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. - -TanksGroup = GROUP:FindByName( "Group Tanks A" ) - -TanksGroup:HandleEvent( EVENTS.Hit ) - -function TanksGroup:OnEventHit( EventData ) - - self:E( "I just got hit and I am part of " .. EventData.TgtGroupName ) - EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" ) -end - - +--- +-- Name: EVT-201 - GROUP OnEventHit Example +-- Author: FlightControl +-- Date Created: 08 Mar 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. +-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. +-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. + +TanksGroup = GROUP:FindByName( "Group Tanks A" ) + +TanksGroup:HandleEvent( EVENTS.Hit ) + +function TanksGroup:OnEventHit( EventData ) + + self:E( "I just got hit and I am part of " .. EventData.TgtGroupName ) + EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua similarity index 97% rename from EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua rename to Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua index ca8fc6eee7..70aef8e2b6 100644 --- a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua +++ b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua @@ -1,34 +1,34 @@ ---- --- Name: EVT-204 - GROUP OnEventCrash Example --- Author: FlightControl --- Date Created: 29 May 2017 --- --- # Situation: --- --- A human plane is fyling in the air. Crash it into the ground. --- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... --- --- # Test cases: --- --- 1. Fly the plane into the ground. --- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. --- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. - - --- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". -PlaneHumanGroup = GROUP:FindByName( "PlaneGroup" ) - --- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). -PlaneHumanGroup:HandleEvent( EVENTS.Crash ) - --- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically --- called when the Crash event is happening FOR THE PlaneHuman UNIT only! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function PlaneHumanGroup:OnEventCrash( EventData ) - - -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. - self:E( "Smoking at the position" ) - EventData.IniUnit:SmokeOrange() -end +--- +-- Name: EVT-204 - GROUP OnEventCrash Example +-- Author: FlightControl +-- Date Created: 29 May 2017 +-- +-- # Situation: +-- +-- A human plane is fyling in the air. Crash it into the ground. +-- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... +-- +-- # Test cases: +-- +-- 1. Fly the plane into the ground. +-- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. +-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. + + +-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". +PlaneHumanGroup = GROUP:FindByName( "PlaneGroup" ) + +-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). +PlaneHumanGroup:HandleEvent( EVENTS.Crash ) + +-- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically +-- called when the Crash event is happening FOR THE PlaneHuman UNIT only! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function PlaneHumanGroup:OnEventCrash( EventData ) + + -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. + self:E( "Smoking at the position" ) + EventData.IniUnit:SmokeOrange() +end diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz similarity index 100% rename from EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz rename to Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz diff --git a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua b/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua similarity index 97% rename from EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua rename to Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua index eec47c6658..0552161ee1 100644 --- a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua +++ b/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua @@ -1,28 +1,28 @@ ---- --- Name: EVT-205 - GROUP OnEventDead Example --- Author: FlightControl --- Date Created: 29 May 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. --- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. --- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. - -TanksGroup = GROUP:FindByName( "Group Tanks A" ) - -TanksGroup:HandleEvent( EVENTS.Dead ) - -function TanksGroup:OnEventDead( EventData ) - - self:E( "I just got dead and I am part of " .. EventData.IniGroupName ) - EventData.IniUnit:MessageToAll( "I just got dead and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) -end - - +--- +-- Name: EVT-205 - GROUP OnEventDead Example +-- Author: FlightControl +-- Date Created: 29 May 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. +-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. +-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. + +TanksGroup = GROUP:FindByName( "Group Tanks A" ) + +TanksGroup:HandleEvent( EVENTS.Dead ) + +function TanksGroup:OnEventDead( EventData ) + + self:E( "I just got dead and I am part of " .. EventData.IniGroupName ) + EventData.IniUnit:MessageToAll( "I just got dead and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz b/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz similarity index 100% rename from EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz rename to Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz diff --git a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua b/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua similarity index 96% rename from EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua rename to Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua index e6e04d9122..9847ce5008 100644 --- a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua +++ b/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua @@ -1,34 +1,34 @@ ---- --- Name: EVT-401 - Generic OnEventHit Example --- Author: FlightControl --- Date Created: 15 February 2017 --- --- # Situation: --- --- Ground targets are shooting each other. --- --- # Test cases: --- --- 1. Observe the ground forces shooting each other. --- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. --- 3. The generic EventHandler objects should receive the hit events. - -CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) - -EventHandler1 = EVENTHANDLER:New() -EventHandler2 = EVENTHANDLER:New() - -EventHandler1:HandleEvent( EVENTS.Hit ) -EventHandler2:HandleEvent( EVENTS.Hit ) - -function EventHandler1:OnEventHit( EventData ) - self:E("hello 1") - CC:GetPositionable():MessageToAll( "I just got hit!", 15 , "Alert!" ) -end - -function EventHandler2:OnEventHit( EventData ) - self:E("hello 2") - CC:GetPositionable():MessageToAll( "I just got hit!", 15, "Alert!" ) -end - - +--- +-- Name: EVT-401 - Generic OnEventHit Example +-- Author: FlightControl +-- Date Created: 15 February 2017 +-- +-- # Situation: +-- +-- Ground targets are shooting each other. +-- +-- # Test cases: +-- +-- 1. Observe the ground forces shooting each other. +-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. +-- 3. The generic EventHandler objects should receive the hit events. + +CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) + +EventHandler1 = EVENTHANDLER:New() +EventHandler2 = EVENTHANDLER:New() + +EventHandler1:HandleEvent( EVENTS.Hit ) +EventHandler2:HandleEvent( EVENTS.Hit ) + +function EventHandler1:OnEventHit( EventData ) + self:E("hello 1") + CC:GetPositionable():MessageToAll( "I just got hit!", 15 , "Alert!" ) +end + +function EventHandler2:OnEventHit( EventData ) + self:E("hello 2") + CC:GetPositionable():MessageToAll( "I just got hit!", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz b/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz similarity index 100% rename from EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz rename to Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz diff --git a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua b/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua similarity index 95% rename from EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua rename to Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua index d5017b5a32..f4e6d2519d 100644 --- a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua +++ b/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua @@ -1,26 +1,26 @@ ---- --- Name: EVT-402 - Generic OnEventMissionEnd Example --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Test mission end event handler. --- --- # Test cases: --- --- 1. Observe when the mission ends, a dcs.log entry is written in the logging. --- 2. The generic EventHandler objects should be called, and a log entry in dcs.log should be written. - -CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) - -EventHandler = EVENTHANDLER:New() - -EventHandler:HandleEvent( EVENTS.MissionEnd ) - -function EventHandler:OnEventMissionEnd( EventData ) - self:E("Mission End") -end - - - +--- +-- Name: EVT-402 - Generic OnEventMissionEnd Example +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Test mission end event handler. +-- +-- # Test cases: +-- +-- 1. Observe when the mission ends, a dcs.log entry is written in the logging. +-- 2. The generic EventHandler objects should be called, and a log entry in dcs.log should be written. + +CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) + +EventHandler = EVENTHANDLER:New() + +EventHandler:HandleEvent( EVENTS.MissionEnd ) + +function EventHandler:OnEventMissionEnd( EventData ) + self:E("Mission End") +end + + + diff --git a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz b/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz similarity index 100% rename from EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz rename to Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz diff --git a/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua b/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua similarity index 96% rename from EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua rename to Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua index 2cd1c45eac..d7e7c10020 100644 --- a/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua +++ b/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua @@ -1,32 +1,32 @@ ---- --- Name: EVT-401 - Generic OnEventHit Example --- Author: FlightControl --- Date Created: 15 February 2017 --- --- # Situation: --- --- Ground targets are shooting each other. --- --- # Test cases: --- --- 1. Observe the ground forces shooting each other. --- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. --- 3. The generic EventHandler objects should receive the hit events. - -CC = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "HQ" ) - -EventHandler1 = EVENTHANDLER:New() - - -EventHandler1:HandleEvent( EVENTS.Birth ) - ---- @param Core.Event#EVENT self --- @param Core.Event#EVENTDATA EventData -function EventHandler1:OnEventBirth( EventData ) - self:E("hello 1") - self:E( EventData.IniUnit:GetName() ) - CC:GetPositionable():MessageToAll( "I just got born!", 15 , "Alert!" ) -end - - - +--- +-- Name: EVT-401 - Generic OnEventHit Example +-- Author: FlightControl +-- Date Created: 15 February 2017 +-- +-- # Situation: +-- +-- Ground targets are shooting each other. +-- +-- # Test cases: +-- +-- 1. Observe the ground forces shooting each other. +-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. +-- 3. The generic EventHandler objects should receive the hit events. + +CC = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "HQ" ) + +EventHandler1 = EVENTHANDLER:New() + + +EventHandler1:HandleEvent( EVENTS.Birth ) + +--- @param Core.Event#EVENT self +-- @param Core.Event#EVENTDATA EventData +function EventHandler1:OnEventBirth( EventData ) + self:E("hello 1") + self:E( EventData.IniUnit:GetName() ) + CC:GetPositionable():MessageToAll( "I just got born!", 15 , "Alert!" ) +end + + + diff --git a/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz b/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz similarity index 100% rename from EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz rename to Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua similarity index 97% rename from EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua rename to Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua index a8adb118f7..2d81929e26 100644 --- a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua +++ b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-103 - OnEventLand Example LandingChallenge.lua @@ -1,63 +1,63 @@ ---- --- Name: EVT-103 - OnEventLand Example --- Author: CraigOwen --- Date Created: 12 February 2017 --- --- # Situation: --- --- A client plane is landing on an airfield, trying to pick a rope in the landing zones. --- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. --- --- # Test cases: --- --- 1. Land the plane. --- 2. When the plane landed, observe your message and the signal. --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- Create a unit which signalizes if the client landed good. -signal = UNIT:FindByName("LandingZoneChallenge - Signal") - --- Create the zones used for the landing check --- Init Zone -InitZone = ZONE:New("LandingChallange - InitZone") - --- Ropes -zonegroup1 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 1" ) -zonegroup2 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 2" ) -zonegroup3 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 3" ) -LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) -LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) -LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) - --- Create a variable Plane that holds a reference to CLIENT object (created by moose at the beginning of the mission) with the name "Plane". -Plane = CLIENT:FindByName( "Plane" ) --- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. -Plane:HandleEvent( EVENTS.Land ) - --- This function will be called whenever the Plane-Object (client) lands! -function Plane:OnEventLand( EventData ) - - -- check wether the client landet at the right airport, where the challenge is located - if not Plane:IsInZone(InitZone) then - return - end - - -- check if the touchdown took place inside of one of the zones - if Plane:IsInZone(LandZoneRope1) then - MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareGreen() - elseif Plane:IsInZone(LandZoneRope2) then - MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareYellow() - elseif Plane:IsInZone(LandZoneRope3) then - MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareRed() - else - MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( Plane ) - end - - -end - - +--- +-- Name: EVT-103 - OnEventLand Example +-- Author: CraigOwen +-- Date Created: 12 February 2017 +-- +-- # Situation: +-- +-- A client plane is landing on an airfield, trying to pick a rope in the landing zones. +-- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. +-- +-- # Test cases: +-- +-- 1. Land the plane. +-- 2. When the plane landed, observe your message and the signal. +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- Create a unit which signalizes if the client landed good. +signal = UNIT:FindByName("LandingZoneChallenge - Signal") + +-- Create the zones used for the landing check +-- Init Zone +InitZone = ZONE:New("LandingChallange - InitZone") + +-- Ropes +zonegroup1 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 1" ) +zonegroup2 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 2" ) +zonegroup3 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 3" ) +LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) +LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) +LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) + +-- Create a variable Plane that holds a reference to CLIENT object (created by moose at the beginning of the mission) with the name "Plane". +Plane = CLIENT:FindByName( "Plane" ) +-- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. +Plane:HandleEvent( EVENTS.Land ) + +-- This function will be called whenever the Plane-Object (client) lands! +function Plane:OnEventLand( EventData ) + + -- check wether the client landet at the right airport, where the challenge is located + if not Plane:IsInZone(InitZone) then + return + end + + -- check if the touchdown took place inside of one of the zones + if Plane:IsInZone(LandZoneRope1) then + MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareGreen() + elseif Plane:IsInZone(LandZoneRope2) then + MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareYellow() + elseif Plane:IsInZone(LandZoneRope3) then + MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareRed() + else + MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( Plane ) + end + + +end + + MESSAGE:New("Try to land on the runway in between the red trucks.", 15, "Landing challenge"):ToClient(Plane) \ No newline at end of file diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua similarity index 97% rename from EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua rename to Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua index a8adb118f7..2d81929e26 100644 --- a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua +++ b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua @@ -1,63 +1,63 @@ ---- --- Name: EVT-103 - OnEventLand Example --- Author: CraigOwen --- Date Created: 12 February 2017 --- --- # Situation: --- --- A client plane is landing on an airfield, trying to pick a rope in the landing zones. --- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. --- --- # Test cases: --- --- 1. Land the plane. --- 2. When the plane landed, observe your message and the signal. --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- Create a unit which signalizes if the client landed good. -signal = UNIT:FindByName("LandingZoneChallenge - Signal") - --- Create the zones used for the landing check --- Init Zone -InitZone = ZONE:New("LandingChallange - InitZone") - --- Ropes -zonegroup1 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 1" ) -zonegroup2 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 2" ) -zonegroup3 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 3" ) -LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) -LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) -LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) - --- Create a variable Plane that holds a reference to CLIENT object (created by moose at the beginning of the mission) with the name "Plane". -Plane = CLIENT:FindByName( "Plane" ) --- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. -Plane:HandleEvent( EVENTS.Land ) - --- This function will be called whenever the Plane-Object (client) lands! -function Plane:OnEventLand( EventData ) - - -- check wether the client landet at the right airport, where the challenge is located - if not Plane:IsInZone(InitZone) then - return - end - - -- check if the touchdown took place inside of one of the zones - if Plane:IsInZone(LandZoneRope1) then - MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareGreen() - elseif Plane:IsInZone(LandZoneRope2) then - MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareYellow() - elseif Plane:IsInZone(LandZoneRope3) then - MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareRed() - else - MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( Plane ) - end - - -end - - +--- +-- Name: EVT-103 - OnEventLand Example +-- Author: CraigOwen +-- Date Created: 12 February 2017 +-- +-- # Situation: +-- +-- A client plane is landing on an airfield, trying to pick a rope in the landing zones. +-- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. +-- +-- # Test cases: +-- +-- 1. Land the plane. +-- 2. When the plane landed, observe your message and the signal. +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- Create a unit which signalizes if the client landed good. +signal = UNIT:FindByName("LandingZoneChallenge - Signal") + +-- Create the zones used for the landing check +-- Init Zone +InitZone = ZONE:New("LandingChallange - InitZone") + +-- Ropes +zonegroup1 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 1" ) +zonegroup2 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 2" ) +zonegroup3 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 3" ) +LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) +LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) +LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) + +-- Create a variable Plane that holds a reference to CLIENT object (created by moose at the beginning of the mission) with the name "Plane". +Plane = CLIENT:FindByName( "Plane" ) +-- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. +Plane:HandleEvent( EVENTS.Land ) + +-- This function will be called whenever the Plane-Object (client) lands! +function Plane:OnEventLand( EventData ) + + -- check wether the client landet at the right airport, where the challenge is located + if not Plane:IsInZone(InitZone) then + return + end + + -- check if the touchdown took place inside of one of the zones + if Plane:IsInZone(LandZoneRope1) then + MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareGreen() + elseif Plane:IsInZone(LandZoneRope2) then + MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareYellow() + elseif Plane:IsInZone(LandZoneRope3) then + MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareRed() + else + MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( Plane ) + end + + +end + + MESSAGE:New("Try to land on the runway in between the red trucks.", 15, "Landing challenge"):ToClient(Plane) \ No newline at end of file diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz similarity index 100% rename from EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz rename to Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz diff --git a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua b/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua similarity index 98% rename from EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua rename to Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua index 200c8083fc..469122ac97 100644 --- a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua +++ b/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua @@ -1,151 +1,151 @@ ---- --- Name: EVT-103 - OnEventLand LandingChallengeComplex --- Author: CraigOwen --- Date Created: 12 February 2017 --- --- # Situation: --- --- Approaching the airfield the client gets a message and can try to land inside the landing zones. --- Here we want all clients to participate in the challenge, not only one. --- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. --- --- # Test cases: --- --- 1. Land one of the planes. --- 2. While landing the plane, observe your message and the signal (flare). --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- In this advanced challenge we want to make sure all the following. --- 1. The challenge takes place at a certain airfield. --- 2. All clients can repeat the challange at any time, try after try. --- 3. All clients approaching the airport get a message indicating the challenge. --- 4. There is no useraction needet to participate in this, providing full focus on the task. - --- So lets go then... in five steps --- 1. Create a unit to signalize (flare) whenever a client landed correctly --- 2. Create Zones --- 3. Create a set of clients --- 4. Handle the EVENT.Land for all clients in the set using the signal unit --- 5. Create a scheduler checking for clients in zones - --- 1. Create a unit which signalizes if the client landed good. -signal = UNIT:FindByName("LandingZoneChallenge - Signal") - --- 2. Create Zones --- Init Zone - This is the global Zone for the LandingChallenge -InitZone = ZONE:New("LandingChallange - InitZone") - ---Ingress Zone - This Zone tries to asure the client approaches the runway from the right side -IngressZoneTemplate = GROUP:FindByName( "LandingZoneChallenge - IngressZone" ) -IngressZone = ZONE_POLYGON:New( "IngressZone", IngressZoneTemplate ) - --- Ropes - theese zones will simulate the ropes on a carrier. -zonegroup1 = GROUP:FindByName("LandingZoneChallenge - Rope 1" ) -zonegroup2 = GROUP:FindByName("LandingZoneChallenge - Rope 2" ) -zonegroup3 = GROUP:FindByName("LandingZoneChallenge - Rope 3" ) -LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) -LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) -LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) - - --- 3. Create a set of clients --- In this example we do not want to handle the event for one specific client, but rather for all red plane clients. --- To achieve this, we start with filtering the clients and saving those into the "BlueClients" variable -RedClients = SET_CLIENT:New():FilterCoalitions("red"):FilterStart() - - --- 4. We want to let every client subscribe to the event EVENT.Land. This event occurs when a plane lands. Be aware that this could be any airfield at this point. --- To do so, we run the ForEachClient method on our set of clients and call a function taking the client as parameter -RedClients:ForEachClient( - --- This function will be called for every single client in the set - -- @param MooseClient#CLIENT ClientInSet - function( ClientInSet ) - - -- Inside here we want to do two things. - -- 1. Write down the local function doing all the magic. - -- 2. Call this function for each ClientInSet - - -- 1. The magic - local function ResetClientForZone( MooseClient ) - --At first we set this client to a state, in wich she/he is not participating in this event - MooseClient:SetState( MooseClient, "ZoneStep", "0" ) - - --Now we subscribe to the event just like we did in the first example. - MooseClient:HandleEvent(EVENTS.Land) - - - --- Finally we set up the so called handler FOR the event. This is a function wich will determine what happens, whenever a client lands. - -- Note here, that the function has the MooseClient in front. So this function will literaly get a part of the client itself. - -- Therefore we can refere to "self" inside the function whenever meaning the MooseClient - -- The param EventData is a parameter given to all event handlers and providing several data about this particular event. - -- @param Core.Event#EVENTDATA EventData - function MooseClient:OnEventLand( EventData ) - - -- Ok now the client "MooseClient" definetly has landed. And beeing here means being the client. MooseClient <-> self - -- So now i want to know 2 things, to verify that i have done everything right. - -- 1. I want to know if my(self) landed in the challengeZone, so landing in other places will not react to this challenge - -- 2. Furthermore i want to know if my(self) came from the right side. - -- In all other cases nothing shell happen, so we reset the client state here and return doin nothing else. - if not self:IsInZone(InitZone) or self:GetState( self, "ZoneStep" ) ~= "2" then - self:SetState( self, "ZoneStep", "0" ) - return - end - - -- Here we check wich rope was picked and set the signal and message according to it. - if self:IsInZone(LandZoneRope1) then - MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( self ) - signal:FlareGreen() - elseif self:IsInZone(LandZoneRope2) then - MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( self ) - signal:FlareYellow() - elseif self:IsInZone(LandZoneRope3) then - MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( self ) - signal:FlareRed() - else - MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( self ) - end - - -- Finally we set the client back to step 1, allowing a new message for landing - self:SetState( self, "ZoneStep", "1" ) - - end - end - - -- 2. As we're now all set, we can finally call our function for every ClientInSet - ClientInSet:Alive( ResetClientForZone ) - - end - ) - --- 5. Finally we use a scheduler checking wether clients are inside or outside these zones. -LandingChallangeActionsScheduler, LandingChallangeActionsSchedulerID = SCHEDULER:New( nil, - function () - - -- Flying by the airport there will be a message showing that the landing challange is currently in place. - -- This will make the ClientState shift from 0 -> 1 - RedClients:ForEachClientInZone( InitZone, - function( MooseClient ) - BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) - if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "0" then - MooseClient:SetState( MooseClient, "ZoneStep", "1" ) - MESSAGE:New("Welcome to the Landing challenge. If you want to participate, get yourself a landing clearance by ATC and navigate to the landing corridor.", 20, "Landing challenge" ):ToClient( MooseClient ) - end - end - ) - - -- The client is approaching the runway from the correct side? - -- If yes, then shift state from 1 to 2 - RedClients:ForEachClientInZone( IngressZone, - function( MooseClient ) - BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) - if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "1" then - MooseClient:SetState( MooseClient, "ZoneStep", "2" ) - MESSAGE:New("Ok, now its your turn. Land your airframe and try to get one of the ropes. Good luck!", 15, "Landing challenge" ):ToClient( MooseClient ) - end - end - ) - - end, {}, 5, 5 - ) - +--- +-- Name: EVT-103 - OnEventLand LandingChallengeComplex +-- Author: CraigOwen +-- Date Created: 12 February 2017 +-- +-- # Situation: +-- +-- Approaching the airfield the client gets a message and can try to land inside the landing zones. +-- Here we want all clients to participate in the challenge, not only one. +-- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. +-- +-- # Test cases: +-- +-- 1. Land one of the planes. +-- 2. While landing the plane, observe your message and the signal (flare). +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- In this advanced challenge we want to make sure all the following. +-- 1. The challenge takes place at a certain airfield. +-- 2. All clients can repeat the challange at any time, try after try. +-- 3. All clients approaching the airport get a message indicating the challenge. +-- 4. There is no useraction needet to participate in this, providing full focus on the task. + +-- So lets go then... in five steps +-- 1. Create a unit to signalize (flare) whenever a client landed correctly +-- 2. Create Zones +-- 3. Create a set of clients +-- 4. Handle the EVENT.Land for all clients in the set using the signal unit +-- 5. Create a scheduler checking for clients in zones + +-- 1. Create a unit which signalizes if the client landed good. +signal = UNIT:FindByName("LandingZoneChallenge - Signal") + +-- 2. Create Zones +-- Init Zone - This is the global Zone for the LandingChallenge +InitZone = ZONE:New("LandingChallange - InitZone") + +--Ingress Zone - This Zone tries to asure the client approaches the runway from the right side +IngressZoneTemplate = GROUP:FindByName( "LandingZoneChallenge - IngressZone" ) +IngressZone = ZONE_POLYGON:New( "IngressZone", IngressZoneTemplate ) + +-- Ropes - theese zones will simulate the ropes on a carrier. +zonegroup1 = GROUP:FindByName("LandingZoneChallenge - Rope 1" ) +zonegroup2 = GROUP:FindByName("LandingZoneChallenge - Rope 2" ) +zonegroup3 = GROUP:FindByName("LandingZoneChallenge - Rope 3" ) +LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) +LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) +LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) + + +-- 3. Create a set of clients +-- In this example we do not want to handle the event for one specific client, but rather for all red plane clients. +-- To achieve this, we start with filtering the clients and saving those into the "BlueClients" variable +RedClients = SET_CLIENT:New():FilterCoalitions("red"):FilterStart() + + +-- 4. We want to let every client subscribe to the event EVENT.Land. This event occurs when a plane lands. Be aware that this could be any airfield at this point. +-- To do so, we run the ForEachClient method on our set of clients and call a function taking the client as parameter +RedClients:ForEachClient( + --- This function will be called for every single client in the set + -- @param MooseClient#CLIENT ClientInSet + function( ClientInSet ) + + -- Inside here we want to do two things. + -- 1. Write down the local function doing all the magic. + -- 2. Call this function for each ClientInSet + + -- 1. The magic + local function ResetClientForZone( MooseClient ) + --At first we set this client to a state, in wich she/he is not participating in this event + MooseClient:SetState( MooseClient, "ZoneStep", "0" ) + + --Now we subscribe to the event just like we did in the first example. + MooseClient:HandleEvent(EVENTS.Land) + + + --- Finally we set up the so called handler FOR the event. This is a function wich will determine what happens, whenever a client lands. + -- Note here, that the function has the MooseClient in front. So this function will literaly get a part of the client itself. + -- Therefore we can refere to "self" inside the function whenever meaning the MooseClient + -- The param EventData is a parameter given to all event handlers and providing several data about this particular event. + -- @param Core.Event#EVENTDATA EventData + function MooseClient:OnEventLand( EventData ) + + -- Ok now the client "MooseClient" definetly has landed. And beeing here means being the client. MooseClient <-> self + -- So now i want to know 2 things, to verify that i have done everything right. + -- 1. I want to know if my(self) landed in the challengeZone, so landing in other places will not react to this challenge + -- 2. Furthermore i want to know if my(self) came from the right side. + -- In all other cases nothing shell happen, so we reset the client state here and return doin nothing else. + if not self:IsInZone(InitZone) or self:GetState( self, "ZoneStep" ) ~= "2" then + self:SetState( self, "ZoneStep", "0" ) + return + end + + -- Here we check wich rope was picked and set the signal and message according to it. + if self:IsInZone(LandZoneRope1) then + MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( self ) + signal:FlareGreen() + elseif self:IsInZone(LandZoneRope2) then + MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( self ) + signal:FlareYellow() + elseif self:IsInZone(LandZoneRope3) then + MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( self ) + signal:FlareRed() + else + MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( self ) + end + + -- Finally we set the client back to step 1, allowing a new message for landing + self:SetState( self, "ZoneStep", "1" ) + + end + end + + -- 2. As we're now all set, we can finally call our function for every ClientInSet + ClientInSet:Alive( ResetClientForZone ) + + end + ) + +-- 5. Finally we use a scheduler checking wether clients are inside or outside these zones. +LandingChallangeActionsScheduler, LandingChallangeActionsSchedulerID = SCHEDULER:New( nil, + function () + + -- Flying by the airport there will be a message showing that the landing challange is currently in place. + -- This will make the ClientState shift from 0 -> 1 + RedClients:ForEachClientInZone( InitZone, + function( MooseClient ) + BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) + if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "0" then + MooseClient:SetState( MooseClient, "ZoneStep", "1" ) + MESSAGE:New("Welcome to the Landing challenge. If you want to participate, get yourself a landing clearance by ATC and navigate to the landing corridor.", 20, "Landing challenge" ):ToClient( MooseClient ) + end + end + ) + + -- The client is approaching the runway from the correct side? + -- If yes, then shift state from 1 to 2 + RedClients:ForEachClientInZone( IngressZone, + function( MooseClient ) + BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) + if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "1" then + MooseClient:SetState( MooseClient, "ZoneStep", "2" ) + MESSAGE:New("Ok, now its your turn. Land your airframe and try to get one of the ropes. Good luck!", 15, "Landing challenge" ):ToClient( MooseClient ) + end + end + ) + + end, {}, 5, 5 + ) + MESSAGE:New("Try to land on the runway in between the red trucks located at the right side.", 15, "Landing challenge"):ToAll() \ No newline at end of file diff --git a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz b/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz similarity index 100% rename from EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz rename to Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz diff --git a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua b/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua similarity index 96% rename from EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua rename to Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua index a58e7fae54..e05d830818 100644 --- a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua +++ b/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua @@ -1,29 +1,29 @@ ---- --- Name: EVT-600 - OnEventHit Example with a Set of Units --- Author: FlightControl --- Date Created: 6 Mar 2017 --- --- # Situation: --- --- A plane is flying in the air and shoots an missile to a ground target. --- It will shoot a couple of tanks units that are part of a Set. --- --- # Test cases: --- --- 1. Observe the plane shooting the missile. --- 2. Observe when the plane hits a tank, a dcs.log entry is written in the logging. --- 4. Observe the tanks hitting the targets and the messages appear. --- 3. Check the contents of the fields of the S_EVENT_HIT entries. - -Plane = UNIT:FindByName( "Plane" ) - -UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart() - -UnitSet:HandleEvent( EVENTS.Hit ) - -function UnitSet:OnEventHit( EventData ) - - Plane:MessageToAll( "I just hit a tank! " .. EventData.IniUnit:GetName(), 15, "Alert!" ) -end - - +--- +-- Name: EVT-600 - OnEventHit Example with a Set of Units +-- Author: FlightControl +-- Date Created: 6 Mar 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- It will shoot a couple of tanks units that are part of a Set. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the plane hits a tank, a dcs.log entry is written in the logging. +-- 4. Observe the tanks hitting the targets and the messages appear. +-- 3. Check the contents of the fields of the S_EVENT_HIT entries. + +Plane = UNIT:FindByName( "Plane" ) + +UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart() + +UnitSet:HandleEvent( EVENTS.Hit ) + +function UnitSet:OnEventHit( EventData ) + + Plane:MessageToAll( "I just hit a tank! " .. EventData.IniUnit:GetName(), 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz b/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz similarity index 100% rename from EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz rename to Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz diff --git a/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua b/Core/FSM/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua similarity index 96% rename from FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua rename to Core/FSM/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua index 50d85c903b..1ad43849b4 100644 --- a/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua +++ b/Core/FSM/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua @@ -1,122 +1,122 @@ ---- Transition Explanation --- --- === --- --- Name: Transition Explanation --- Author: FlightControl --- Date Created: 05 Jan 2017 --- --- # Situation: --- --- Create a simple FSM. --- Add 2 transitions that will switch state from "Green" to "Red" upon event "Switch". --- --- # Test cases: --- --- # Status: TESTED 05 Jan 2017 - -local FsmDemo = FSM:New() -- #FsmDemo -local FsmUnit = UNIT:FindByName( "FlareUnit" ) - -FsmDemo:SetStartState( "Green" ) - -do FsmDemo:AddTransition( "Green", "Switch", "Red" ) -- FSM Transition for type #FsmDemo. - - --- OnLeave State Transition for Green. - -- @function [parent=#FsmDemo] OnLeaveGreen - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnEnter State Transition for Red. - -- @function [parent=#FsmDemo] OnEnterRed - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- OnBefore State Transition for Switch. - -- @function [parent=#FsmDemo] OnBeforeSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnAfter State Transition for Switch. - -- @function [parent=#FsmDemo] OnAfterSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- Embedded Event Trigger for Switch. - -- @function [parent=#FsmDemo] Switch - -- @param #FsmDemo self - - --- Delayed Event Trigger for Switch - -- @function [parent=#FsmDemo] __Switch - -- @param #FsmDemo self - -- @param #number Delay The delay in seconds. - -end -- FsmDemo - -do FsmDemo:AddTransition( "Red", "Switch", "Green" ) -- FSM Transition for type #FsmDemo. - - --- OnLeave State Transition for Red. - -- @function [parent=#FsmDemo] OnLeaveRed - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnEnter State Transition for Green. - -- @function [parent=#FsmDemo] OnEnterGreen - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- OnBefore State Transition for Switch. - -- @function [parent=#FsmDemo] OnBeforeSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnAfter State Transition for Switch. - -- @function [parent=#FsmDemo] OnAfterSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- Embedded Event Trigger for Switch. - -- @function [parent=#FsmDemo] Switch - -- @param #FsmDemo self - - --- Delayed Event Trigger for Switch - -- @function [parent=#FsmDemo] __Switch - -- @param #FsmDemo self - -- @param #number Delay The delay in seconds. - -end -- FsmDemo - -function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit ) - self:E( { From, Event, To, FsmUnit } ) - if From == "Green" then - FsmUnit:Flare(FLARECOLOR.Green) - else - if From == "Red" then - FsmUnit:Flare(FLARECOLOR.Red) - end - end - FsmDemo:__Switch( 5, FsmUnit ) -end - -FsmDemo:__Switch( 5, FsmUnit ) - +--- Transition Explanation +-- +-- === +-- +-- Name: Transition Explanation +-- Author: FlightControl +-- Date Created: 05 Jan 2017 +-- +-- # Situation: +-- +-- Create a simple FSM. +-- Add 2 transitions that will switch state from "Green" to "Red" upon event "Switch". +-- +-- # Test cases: +-- +-- # Status: TESTED 05 Jan 2017 + +local FsmDemo = FSM:New() -- #FsmDemo +local FsmUnit = UNIT:FindByName( "FlareUnit" ) + +FsmDemo:SetStartState( "Green" ) + +do FsmDemo:AddTransition( "Green", "Switch", "Red" ) -- FSM Transition for type #FsmDemo. + + --- OnLeave State Transition for Green. + -- @function [parent=#FsmDemo] OnLeaveGreen + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnEnter State Transition for Red. + -- @function [parent=#FsmDemo] OnEnterRed + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- OnBefore State Transition for Switch. + -- @function [parent=#FsmDemo] OnBeforeSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnAfter State Transition for Switch. + -- @function [parent=#FsmDemo] OnAfterSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- Embedded Event Trigger for Switch. + -- @function [parent=#FsmDemo] Switch + -- @param #FsmDemo self + + --- Delayed Event Trigger for Switch + -- @function [parent=#FsmDemo] __Switch + -- @param #FsmDemo self + -- @param #number Delay The delay in seconds. + +end -- FsmDemo + +do FsmDemo:AddTransition( "Red", "Switch", "Green" ) -- FSM Transition for type #FsmDemo. + + --- OnLeave State Transition for Red. + -- @function [parent=#FsmDemo] OnLeaveRed + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnEnter State Transition for Green. + -- @function [parent=#FsmDemo] OnEnterGreen + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- OnBefore State Transition for Switch. + -- @function [parent=#FsmDemo] OnBeforeSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnAfter State Transition for Switch. + -- @function [parent=#FsmDemo] OnAfterSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- Embedded Event Trigger for Switch. + -- @function [parent=#FsmDemo] Switch + -- @param #FsmDemo self + + --- Delayed Event Trigger for Switch + -- @function [parent=#FsmDemo] __Switch + -- @param #FsmDemo self + -- @param #number Delay The delay in seconds. + +end -- FsmDemo + +function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit ) + self:E( { From, Event, To, FsmUnit } ) + if From == "Green" then + FsmUnit:Flare(FLARECOLOR.Green) + else + if From == "Red" then + FsmUnit:Flare(FLARECOLOR.Red) + end + end + FsmDemo:__Switch( 5, FsmUnit ) +end + +FsmDemo:__Switch( 5, FsmUnit ) + diff --git a/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz b/Core/FSM/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz similarity index 100% rename from FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz rename to Core/FSM/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz diff --git a/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua b/Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua similarity index 100% rename from MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua rename to Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua diff --git a/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz b/Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz similarity index 100% rename from MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz rename to Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz diff --git a/MOP-100 - MARKEROPS_BASE/MarkerOps_Base_Demo.lua b/Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MarkerOps_Base_Demo.lua similarity index 97% rename from MOP-100 - MARKEROPS_BASE/MarkerOps_Base_Demo.lua rename to Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MarkerOps_Base_Demo.lua index bda9ed35b9..0ee97708dc 100644 --- a/MOP-100 - MARKEROPS_BASE/MarkerOps_Base_Demo.lua +++ b/Core/MarkerOps_Base/MOP-100 - MARKEROPS_BASE/MarkerOps_Base_Demo.lua @@ -1,86 +1,86 @@ -------------------------------------------------------------------------- --- MOP-100 - MARKEROPS_BASE - Basic Demo -------------------------------------------------------------------------- --- Documentation --- --- MARKEROPS_BASE: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.MarkerOps_Base.html --- -------------------------------------------------------------------------- --- On the F10, call a tanker to start from the carrier. It will fly to --- an initial zone. Set a marker on the F10 map with keyword "TankerDemo". --- The Tanker will fly there. Set a marker on the F10 map with keywords --- "TankerDemo RTB". The tanke will RTB to the carrier. -------------------------------------------------------------------------- --- Date: May 2021 -------------------------------------------------------------------------- - --- globals -mytanker = nil -tankergroup = nil -TankerAuftrag = nil - -function menucalltanker() - - if not mytanker then - -- new MARKEROPS_BASE object - mytanker = MARKEROPS_BASE:New("TankerDemo",{"RTB"}) -- Core.MarkerOps_Base#MARKEROPS_BASE - -- start FlightGroup - tankergroup = FLIGHTGROUP:New("Tanker") - tankergroup:SetHomebase(AIRBASE:FindByName("Truman")) - tankergroup:SetDefaultRadio(245,"AM",false) - tankergroup:SetDespawnAfterLanding() - tankergroup:SwitchTACAN(45, "TKR", 1, "X") - tankergroup:SetDefaultCallsign(CALLSIGN.Tanker.Texaco,1) - -- Mission - local InitialHold = ZONE:New("Initial Hold"):GetCoordinate() - TankerAuftrag = AUFTRAG:NewTANKER(InitialHold,18000,UTILS.KnotsToAltKIAS(220,18000),90,20,0) - TankerAuftrag:SetMissionRange(500) - tankergroup:AddMission(TankerAuftrag) - else - local status = tankergroup:GetState() - local m = MESSAGE:New(string.format("Tanker %s ops in status: %s", mytanker.Tag, status),10,"Info",true):ToAll() - end - - -- Handler function - local function Handler(Keywords,Coord) - - local MustRTB = false - for _,_word in pairs (Keywords) do - if string.lower(_word) == "rtb" then - MustRTB = true - end - end - - -- cancel current Auftrag - TankerAuftrag:Cancel() - - -- check if we need to RTB - if MustRTB then - tankergroup:RTB(AIRBASE:FindByName("Truman")) - else - -- no, fly to coordinate of marker - local auftrag = AUFTRAG:NewTANKER(Coord,18000,UTILS.KnotsToAltKIAS(220,18000),90,20,0) - auftrag:SetMissionRange(500) - tankergroup:AddMission(auftrag) - TankerAuftrag = auftrag - end - end - - -- Event functions - function mytanker:OnAfterMarkAdded(From,Event,To,Text,Keywords,Coord) - local m = MESSAGE:New(string.format("Tanker %s Mark Added.", self.Tag),10,"Info",true):ToAll() - Handler(Keywords,Coord) - end - - function mytanker:OnAfterMarkChanged(From,Event,To,Text,Keywords,Coord) - local m = MESSAGE:New(string.format("Tanker %s Mark Changed.", self.Tag),10,"Info",true):ToAll() - Handler(Keywords,Coord) - end - - function mytanker:OnAfterMarkDeleted(From,Event,To) - local m = MESSAGE:New(string.format("Tanker %s Mark Deleted.", self.Tag),10,"Info",true):ToAll() - end -end - -MenuTop = MENU_COALITION:New( coalition.side.BLUE,"Call Tanker") -MenuTanker = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"Start Tanker",MenuTop,menucalltanker) +------------------------------------------------------------------------- +-- MOP-100 - MARKEROPS_BASE - Basic Demo +------------------------------------------------------------------------- +-- Documentation +-- +-- MARKEROPS_BASE: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.MarkerOps_Base.html +-- +------------------------------------------------------------------------- +-- On the F10, call a tanker to start from the carrier. It will fly to +-- an initial zone. Set a marker on the F10 map with keyword "TankerDemo". +-- The Tanker will fly there. Set a marker on the F10 map with keywords +-- "TankerDemo RTB". The tanke will RTB to the carrier. +------------------------------------------------------------------------- +-- Date: May 2021 +------------------------------------------------------------------------- + +-- globals +mytanker = nil +tankergroup = nil +TankerAuftrag = nil + +function menucalltanker() + + if not mytanker then + -- new MARKEROPS_BASE object + mytanker = MARKEROPS_BASE:New("TankerDemo",{"RTB"}) -- Core.MarkerOps_Base#MARKEROPS_BASE + -- start FlightGroup + tankergroup = FLIGHTGROUP:New("Tanker") + tankergroup:SetHomebase(AIRBASE:FindByName("Truman")) + tankergroup:SetDefaultRadio(245,"AM",false) + tankergroup:SetDespawnAfterLanding() + tankergroup:SwitchTACAN(45, "TKR", 1, "X") + tankergroup:SetDefaultCallsign(CALLSIGN.Tanker.Texaco,1) + -- Mission + local InitialHold = ZONE:New("Initial Hold"):GetCoordinate() + TankerAuftrag = AUFTRAG:NewTANKER(InitialHold,18000,UTILS.KnotsToAltKIAS(220,18000),90,20,0) + TankerAuftrag:SetMissionRange(500) + tankergroup:AddMission(TankerAuftrag) + else + local status = tankergroup:GetState() + local m = MESSAGE:New(string.format("Tanker %s ops in status: %s", mytanker.Tag, status),10,"Info",true):ToAll() + end + + -- Handler function + local function Handler(Keywords,Coord) + + local MustRTB = false + for _,_word in pairs (Keywords) do + if string.lower(_word) == "rtb" then + MustRTB = true + end + end + + -- cancel current Auftrag + TankerAuftrag:Cancel() + + -- check if we need to RTB + if MustRTB then + tankergroup:RTB(AIRBASE:FindByName("Truman")) + else + -- no, fly to coordinate of marker + local auftrag = AUFTRAG:NewTANKER(Coord,18000,UTILS.KnotsToAltKIAS(220,18000),90,20,0) + auftrag:SetMissionRange(500) + tankergroup:AddMission(auftrag) + TankerAuftrag = auftrag + end + end + + -- Event functions + function mytanker:OnAfterMarkAdded(From,Event,To,Text,Keywords,Coord) + local m = MESSAGE:New(string.format("Tanker %s Mark Added.", self.Tag),10,"Info",true):ToAll() + Handler(Keywords,Coord) + end + + function mytanker:OnAfterMarkChanged(From,Event,To,Text,Keywords,Coord) + local m = MESSAGE:New(string.format("Tanker %s Mark Changed.", self.Tag),10,"Info",true):ToAll() + Handler(Keywords,Coord) + end + + function mytanker:OnAfterMarkDeleted(From,Event,To) + local m = MESSAGE:New(string.format("Tanker %s Mark Deleted.", self.Tag),10,"Info",true):ToAll() + end +end + +MenuTop = MENU_COALITION:New( coalition.side.BLUE,"Call Tanker") +MenuTanker = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"Start Tanker",MenuTop,menucalltanker) diff --git a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua b/Core/Menu/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua similarity index 97% rename from MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua rename to Core/Menu/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua index 088ec2bd1b..11c0bbb028 100644 --- a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua +++ b/Core/Menu/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua @@ -1,43 +1,43 @@ - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = GROUP:FindByName( "Red Plane 1" ) - local Plane2 = GROUP:FindByName( "Red Plane 2" ) - local Plane3 = GROUP:FindByName( "Red Plane 3" ) - local Plane4 = GROUP:FindByName( "Red Plane 4" ) - - -- This would create a menu for the red coalition under the main DCS "Others" menu. - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) - - - local function ShowStatus( StatusText, Coalition ) - - Plane1:MessageToRed( StatusText, 15 ) - Plane2:MessageToRed( StatusText, 15 ) - end - - local MenuStatus -- Menu#MENU_COALITION - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND - - local function RemoveStatusMenu() - MenuStatus:Remove() - end - - local function AddStatusMenu() - - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) - MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) - end - - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) - -end - - - - + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = GROUP:FindByName( "Red Plane 1" ) + local Plane2 = GROUP:FindByName( "Red Plane 2" ) + local Plane3 = GROUP:FindByName( "Red Plane 3" ) + local Plane4 = GROUP:FindByName( "Red Plane 4" ) + + -- This would create a menu for the red coalition under the main DCS "Others" menu. + local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) + + + local function ShowStatus( StatusText, Coalition ) + + Plane1:MessageToRed( StatusText, 15 ) + Plane2:MessageToRed( StatusText, 15 ) + end + + local MenuStatus -- Menu#MENU_COALITION + local MenuStatusShow -- Menu#MENU_COALITION_COMMAND + + local function RemoveStatusMenu() + MenuStatus:Remove() + end + + local function AddStatusMenu() + + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) + MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) + end + + local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) + local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) + +end + + + + diff --git a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz b/Core/Menu/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz similarity index 100% rename from MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz rename to Core/Menu/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz diff --git a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua b/Core/Menu/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua similarity index 97% rename from MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua rename to Core/Menu/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua index 170029283e..fa483f1037 100644 --- a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua +++ b/Core/Menu/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua @@ -1,56 +1,56 @@ - -do - -- This demo creates a menu structure for the two clients of planes. - -- Each client will receive a different menu structure. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - -- And play with the Add and Remove menu options. - - -- Note that in multi player, this will only work after the DCS clients bug is solved. - - local function ShowStatus( PlaneClient, StatusText, Coalition ) - - MESSAGE:New( Coalition, 15 ):ToRed() - PlaneClient:Message( StatusText, 15 ) - end - - local MenuStatus = {} - - local function RemoveStatusMenu( MenuClient ) - local MenuClientName = MenuClient:GetName() - MenuStatus[MenuClientName]:Remove() - end - - --- @param Wrapper.Client#CLIENT MenuClient - local function AddStatusMenu( MenuClient ) - local MenuClientName = MenuClient:GetName() - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" ) - MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" ) - end - - SCHEDULER:New( nil, - function() - local PlaneClient = CLIENT:FindByName( "Plane 1" ) - if PlaneClient and PlaneClient:IsAlive() then - local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient ) - end - end, {}, 10, 10 ) - - SCHEDULER:New( nil, - function() - local PlaneClient = CLIENT:FindByName( "Plane 2" ) - if PlaneClient and PlaneClient:IsAlive() then - local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient ) - end - end, {}, 10, 10 ) - -end - - - - + +do + -- This demo creates a menu structure for the two clients of planes. + -- Each client will receive a different menu structure. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + -- And play with the Add and Remove menu options. + + -- Note that in multi player, this will only work after the DCS clients bug is solved. + + local function ShowStatus( PlaneClient, StatusText, Coalition ) + + MESSAGE:New( Coalition, 15 ):ToRed() + PlaneClient:Message( StatusText, 15 ) + end + + local MenuStatus = {} + + local function RemoveStatusMenu( MenuClient ) + local MenuClientName = MenuClient:GetName() + MenuStatus[MenuClientName]:Remove() + end + + --- @param Wrapper.Client#CLIENT MenuClient + local function AddStatusMenu( MenuClient ) + local MenuClientName = MenuClient:GetName() + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" ) + MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" ) + end + + SCHEDULER:New( nil, + function() + local PlaneClient = CLIENT:FindByName( "Plane 1" ) + if PlaneClient and PlaneClient:IsAlive() then + local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient ) + end + end, {}, 10, 10 ) + + SCHEDULER:New( nil, + function() + local PlaneClient = CLIENT:FindByName( "Plane 2" ) + if PlaneClient and PlaneClient:IsAlive() then + local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient ) + end + end, {}, 10, 10 ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz b/Core/Menu/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz similarity index 100% rename from MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz rename to Core/Menu/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz diff --git a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua b/Core/Menu/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua similarity index 97% rename from MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua rename to Core/Menu/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua index 86ae033e59..f7ffaccefa 100644 --- a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua +++ b/Core/Menu/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua @@ -1,43 +1,43 @@ - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = CLIENT:FindByName( "Plane 1" ) - local Plane2 = CLIENT:FindByName( "Plane 2" ) - - - -- This would create a menu for the red coalition under the main DCS "Others" menu. - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) - - - local function ShowStatus( StatusText, Coalition ) - - MESSAGE:New( Coalition, 15 ):ToRed() - Plane1:Message( StatusText, 15 ) - Plane2:Message( StatusText, 15 ) - end - - local MenuStatus -- Menu#MENU_COALITION - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND - - local function RemoveStatusMenu() - MenuStatus:Remove() - end - - local function AddStatusMenu() - - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) - MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) - end - - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) - -end - - - - + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = CLIENT:FindByName( "Plane 1" ) + local Plane2 = CLIENT:FindByName( "Plane 2" ) + + + -- This would create a menu for the red coalition under the main DCS "Others" menu. + local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) + + + local function ShowStatus( StatusText, Coalition ) + + MESSAGE:New( Coalition, 15 ):ToRed() + Plane1:Message( StatusText, 15 ) + Plane2:Message( StatusText, 15 ) + end + + local MenuStatus -- Menu#MENU_COALITION + local MenuStatusShow -- Menu#MENU_COALITION_COMMAND + + local function RemoveStatusMenu() + MenuStatus:Remove() + end + + local function AddStatusMenu() + + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) + MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) + end + + local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) + local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz b/Core/Menu/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz similarity index 100% rename from MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz rename to Core/Menu/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz diff --git a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua b/Core/Menu/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua similarity index 97% rename from MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua rename to Core/Menu/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua index ee0b1722bc..94d602abf0 100644 --- a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua +++ b/Core/Menu/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua @@ -1,56 +1,56 @@ - -do - -- This demo creates a menu structure for the two groups of planes. - -- Each group will receive a different menu structure. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - -- And play with the Add and Remove menu options. - - -- Note that in multi player, this will only work after the DCS groups bug is solved. - - local function ShowStatus( PlaneGroup, StatusText, Coalition ) - - MESSAGE:New( Coalition, 15 ):ToRed() - PlaneGroup:Message( StatusText, 15 ) - end - - local MenuStatus = {} - - local function RemoveStatusMenu( MenuGroup ) - local MenuGroupName = MenuGroup:GetName() - MenuStatus[MenuGroupName]:Remove() - end - - --- @param Wrapper.Group#GROUP MenuGroup - local function AddStatusMenu( MenuGroup ) - local MenuGroupName = MenuGroup:GetName() - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" ) - MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" ) - end - - SCHEDULER:New( nil, - function() - local PlaneGroup = GROUP:FindByName( "Plane 1" ) - if PlaneGroup and PlaneGroup:IsAlive() then - local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup ) - end - end, {}, 10, 10 ) - - SCHEDULER:New( nil, - function() - local PlaneGroup = GROUP:FindByName( "Plane 2" ) - if PlaneGroup and PlaneGroup:IsAlive() then - local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup ) - end - end, {}, 10, 10 ) - -end - - - - + +do + -- This demo creates a menu structure for the two groups of planes. + -- Each group will receive a different menu structure. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + -- And play with the Add and Remove menu options. + + -- Note that in multi player, this will only work after the DCS groups bug is solved. + + local function ShowStatus( PlaneGroup, StatusText, Coalition ) + + MESSAGE:New( Coalition, 15 ):ToRed() + PlaneGroup:Message( StatusText, 15 ) + end + + local MenuStatus = {} + + local function RemoveStatusMenu( MenuGroup ) + local MenuGroupName = MenuGroup:GetName() + MenuStatus[MenuGroupName]:Remove() + end + + --- @param Wrapper.Group#GROUP MenuGroup + local function AddStatusMenu( MenuGroup ) + local MenuGroupName = MenuGroup:GetName() + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" ) + MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" ) + end + + SCHEDULER:New( nil, + function() + local PlaneGroup = GROUP:FindByName( "Plane 1" ) + if PlaneGroup and PlaneGroup:IsAlive() then + local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup ) + end + end, {}, 10, 10 ) + + SCHEDULER:New( nil, + function() + local PlaneGroup = GROUP:FindByName( "Plane 2" ) + if PlaneGroup and PlaneGroup:IsAlive() then + local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup ) + end + end, {}, 10, 10 ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz b/Core/Menu/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz similarity index 100% rename from MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz rename to Core/Menu/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz diff --git a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua b/Core/Menu/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua similarity index 97% rename from MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua rename to Core/Menu/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua index 088ec2bd1b..11c0bbb028 100644 --- a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua +++ b/Core/Menu/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua @@ -1,43 +1,43 @@ - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = GROUP:FindByName( "Red Plane 1" ) - local Plane2 = GROUP:FindByName( "Red Plane 2" ) - local Plane3 = GROUP:FindByName( "Red Plane 3" ) - local Plane4 = GROUP:FindByName( "Red Plane 4" ) - - -- This would create a menu for the red coalition under the main DCS "Others" menu. - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) - - - local function ShowStatus( StatusText, Coalition ) - - Plane1:MessageToRed( StatusText, 15 ) - Plane2:MessageToRed( StatusText, 15 ) - end - - local MenuStatus -- Menu#MENU_COALITION - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND - - local function RemoveStatusMenu() - MenuStatus:Remove() - end - - local function AddStatusMenu() - - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) - MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) - end - - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) - -end - - - - + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = GROUP:FindByName( "Red Plane 1" ) + local Plane2 = GROUP:FindByName( "Red Plane 2" ) + local Plane3 = GROUP:FindByName( "Red Plane 3" ) + local Plane4 = GROUP:FindByName( "Red Plane 4" ) + + -- This would create a menu for the red coalition under the main DCS "Others" menu. + local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) + + + local function ShowStatus( StatusText, Coalition ) + + Plane1:MessageToRed( StatusText, 15 ) + Plane2:MessageToRed( StatusText, 15 ) + end + + local MenuStatus -- Menu#MENU_COALITION + local MenuStatusShow -- Menu#MENU_COALITION_COMMAND + + local function RemoveStatusMenu() + MenuStatus:Remove() + end + + local function AddStatusMenu() + + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) + MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) + end + + local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) + local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz b/Core/Menu/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz similarity index 100% rename from MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz rename to Core/Menu/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz diff --git a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua b/Core/Menu/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua similarity index 97% rename from MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua rename to Core/Menu/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua index ee2b5bca07..ab24d82d08 100644 --- a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua +++ b/Core/Menu/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua @@ -1,56 +1,56 @@ - -TestMenus = {} - -Menu = MENU_MISSION:New( "Generate Menus" ) - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = GROUP:FindByName( "Red Plane 1" ) - local Plane2 = GROUP:FindByName( "Red Plane 2" ) - local Plane3 = GROUP:FindByName( "Red Plane 3" ) - local Plane4 = GROUP:FindByName( "Red Plane 4" ) - - local CoalitionText = { - [coalition.side.BLUE] = "BLUE", - [coalition.side.RED] = "RED", - } - - local function MenuMessage( Text, Parameter ) - MESSAGE:NewType( Text .. Parameter, MESSAGE.Type.Information ):ToAll() - end - - local function MenuRemove(m) - TestMenus[m]:Remove() - end - - local function GenerateMissionMenu() - local m = #TestMenus+1 - TestMenus[m] = MENU_MISSION:New( "Menu Mission "..m ) - for n = 1, 8 do - local MenuMissionCommand = MENU_MISSION_COMMAND:New( "Show Mission "..m.."."..n, TestMenus[m], MenuMessage, "Mission ", m.."."..n) - end - local MenuMissionRemoveCommand = MENU_MISSION_COMMAND:New( "Remove Mission "..m, TestMenus[m], MenuRemove, m) - end - - local function GenerateCoalitionMenu( Coalition ) - local m = #TestMenus+1 - TestMenus[m] = MENU_COALITION:New( Coalition, "Menu Coalition "..CoalitionText[Coalition].." ".. m ) - for n = 1, 8 do - local MenuMissionCommand = MENU_COALITION_COMMAND:New( Coalition, "Show Coalition "..CoalitionText[Coalition].." "..m.."."..n, TestMenus[m], MenuMessage, "Coalition ", CoalitionText[Coalition].." "..m.."."..n) - end - local MenuMissionRemoveCommand = MENU_COALITION_COMMAND:New( Coalition, "Remove Coalition "..CoalitionText[Coalition].." "..m, TestMenus[m], MenuRemove, m) - end - - -- Create a mission menu to generate the menus. - local MenuMission = MENU_MISSION_COMMAND:New( "Generate Mission Menus", Menu, GenerateMissionMenu ) - local MenuCoalitionBlue = MENU_MISSION_COMMAND:New( "Generate Blue Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.BLUE ) - local MenucoalitionRed = MENU_MISSION_COMMAND:New( "Generate Red Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.RED ) - -end - - - - + +TestMenus = {} + +Menu = MENU_MISSION:New( "Generate Menus" ) + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = GROUP:FindByName( "Red Plane 1" ) + local Plane2 = GROUP:FindByName( "Red Plane 2" ) + local Plane3 = GROUP:FindByName( "Red Plane 3" ) + local Plane4 = GROUP:FindByName( "Red Plane 4" ) + + local CoalitionText = { + [coalition.side.BLUE] = "BLUE", + [coalition.side.RED] = "RED", + } + + local function MenuMessage( Text, Parameter ) + MESSAGE:NewType( Text .. Parameter, MESSAGE.Type.Information ):ToAll() + end + + local function MenuRemove(m) + TestMenus[m]:Remove() + end + + local function GenerateMissionMenu() + local m = #TestMenus+1 + TestMenus[m] = MENU_MISSION:New( "Menu Mission "..m ) + for n = 1, 8 do + local MenuMissionCommand = MENU_MISSION_COMMAND:New( "Show Mission "..m.."."..n, TestMenus[m], MenuMessage, "Mission ", m.."."..n) + end + local MenuMissionRemoveCommand = MENU_MISSION_COMMAND:New( "Remove Mission "..m, TestMenus[m], MenuRemove, m) + end + + local function GenerateCoalitionMenu( Coalition ) + local m = #TestMenus+1 + TestMenus[m] = MENU_COALITION:New( Coalition, "Menu Coalition "..CoalitionText[Coalition].." ".. m ) + for n = 1, 8 do + local MenuMissionCommand = MENU_COALITION_COMMAND:New( Coalition, "Show Coalition "..CoalitionText[Coalition].." "..m.."."..n, TestMenus[m], MenuMessage, "Coalition ", CoalitionText[Coalition].." "..m.."."..n) + end + local MenuMissionRemoveCommand = MENU_COALITION_COMMAND:New( Coalition, "Remove Coalition "..CoalitionText[Coalition].." "..m, TestMenus[m], MenuRemove, m) + end + + -- Create a mission menu to generate the menus. + local MenuMission = MENU_MISSION_COMMAND:New( "Generate Mission Menus", Menu, GenerateMissionMenu ) + local MenuCoalitionBlue = MENU_MISSION_COMMAND:New( "Generate Blue Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.BLUE ) + local MenucoalitionRed = MENU_MISSION_COMMAND:New( "Generate Red Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.RED ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz b/Core/Menu/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz similarity index 100% rename from MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz rename to Core/Menu/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz diff --git a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua b/Functional/CleanUp/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua similarity index 96% rename from CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua rename to Functional/CleanUp/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua index 1c49160870..5f2b3a57cf 100644 --- a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua +++ b/Functional/CleanUp/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua @@ -1,14 +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 ) - + + + + +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 ) + diff --git a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz b/Functional/CleanUp/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz similarity index 100% rename from CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz rename to Functional/CleanUp/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz diff --git a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua b/Functional/Designate/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua similarity index 96% rename from DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua rename to Functional/Designate/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua index 6b0c4d52a6..8905e43c35 100644 --- a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua +++ b/Functional/Designate/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua @@ -1,43 +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 ) - +--- +-- 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 ) + diff --git a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz b/Functional/Designate/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz similarity index 100% rename from DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz rename to Functional/Designate/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz diff --git a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua b/Functional/Designate/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua similarity index 96% rename from DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua rename to Functional/Designate/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua index d25850745d..81c46290c2 100644 --- a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua +++ b/Functional/Designate/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua @@ -1,40 +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 ) - +--- +-- 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 ) + diff --git a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz b/Functional/Designate/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz similarity index 100% rename from DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz rename to Functional/Designate/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua b/Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua similarity index 96% rename from DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua rename to Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua index 672f452a8e..31263f1a7f 100644 --- a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua +++ b/Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-010 - Designation of AREAS - Threat Level Prioritization.lua @@ -1,40 +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 ) - +--- +-- 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 ) + diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua b/Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua similarity index 96% rename from DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua rename to Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua index 4e270ee7cb..9777d1e676 100644 --- a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua +++ b/Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua @@ -1,40 +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 ) - +--- +-- 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 ) + diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz b/Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz similarity index 100% rename from DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz rename to Functional/Designate/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz diff --git a/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua b/Functional/Designate/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua similarity index 98% rename from DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua rename to Functional/Designate/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua index fa691bc5c1..6123068b22 100644 --- a/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua +++ b/Functional/Designate/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua @@ -1,58 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz b/Functional/Designate/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz similarity index 100% rename from DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz rename to Functional/Designate/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz diff --git a/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua b/Functional/Designate/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua similarity index 98% rename from DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua rename to Functional/Designate/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua index 6409fccf51..9526575366 100644 --- a/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua +++ b/Functional/Designate/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua @@ -1,58 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz b/Functional/Designate/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz similarity index 100% rename from DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz rename to Functional/Designate/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz diff --git a/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua b/Functional/Designate/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua similarity index 98% rename from DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua rename to Functional/Designate/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua index 6409fccf51..9526575366 100644 --- a/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua +++ b/Functional/Designate/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua @@ -1,58 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz b/Functional/Designate/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz similarity index 100% rename from DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz rename to Functional/Designate/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz diff --git a/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua b/Functional/Designate/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua similarity index 98% rename from DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua rename to Functional/Designate/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua index 6c9f5b7ae3..e465a98e9b 100644 --- a/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua +++ b/Functional/Designate/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua @@ -1,57 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz b/Functional/Designate/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz similarity index 100% rename from DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz rename to Functional/Designate/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz diff --git a/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua b/Functional/Designate/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua similarity index 98% rename from DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua rename to Functional/Designate/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua index a3b316b7e4..6b5e8e1790 100644 --- a/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua +++ b/Functional/Designate/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua @@ -1,57 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz b/Functional/Designate/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz similarity index 100% rename from DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz rename to Functional/Designate/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz diff --git a/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua b/Functional/Designate/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua similarity index 98% rename from DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua rename to Functional/Designate/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua index 4ab7e0c208..605f1b4d24 100644 --- a/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua +++ b/Functional/Designate/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua @@ -1,57 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz b/Functional/Designate/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz similarity index 100% rename from DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz rename to Functional/Designate/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz diff --git a/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua b/Functional/Designate/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua similarity index 98% rename from DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua rename to Functional/Designate/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua index 5af0822548..0b5c8ddde0 100644 --- a/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua +++ b/Functional/Designate/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua @@ -1,57 +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)" ) - - +-- 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)" ) + + diff --git a/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz b/Functional/Designate/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz similarity index 100% rename from DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz rename to Functional/Designate/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz diff --git a/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua b/Functional/Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua similarity index 97% rename from DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua rename to Functional/Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua index 3c8ce24b69..7afca5c499 100644 --- a/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua +++ b/Functional/Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua @@ -1,24 +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() - +--- +-- 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 ) \ No newline at end of file diff --git a/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz b/Functional/Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz similarity index 100% rename from DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz rename to Functional/Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz diff --git a/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua b/Functional/Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua similarity index 97% rename from DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua rename to Functional/Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua index 3c8ce24b69..7afca5c499 100644 --- a/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua +++ b/Functional/Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua @@ -1,24 +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() - +--- +-- 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 ) \ No newline at end of file diff --git a/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz b/Functional/Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz similarity index 100% rename from DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz rename to Functional/Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz diff --git a/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua b/Functional/Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua similarity index 97% rename from DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua rename to Functional/Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua index 3a02c7349c..7fcc33cc62 100644 --- a/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua +++ b/Functional/Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua @@ -1,56 +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 +--- +-- 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 diff --git a/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz b/Functional/Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz similarity index 100% rename from DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz rename to Functional/Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz diff --git a/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua b/Functional/Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua similarity index 97% rename from DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua rename to Functional/Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua index 061c468740..a09bef36dd 100644 --- a/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua +++ b/Functional/Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua @@ -1,9 +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 ) + + +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 ) diff --git a/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz b/Functional/Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz similarity index 100% rename from DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz rename to Functional/Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz diff --git a/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua b/Functional/Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua similarity index 97% rename from DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua rename to Functional/Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua index c381743a31..6659d2c08c 100644 --- a/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua +++ b/Functional/Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua @@ -1,62 +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() +--- +-- 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() diff --git a/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz b/Functional/Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz similarity index 100% rename from DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz rename to Functional/Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz diff --git a/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua b/Functional/Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua similarity index 96% rename from DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua rename to Functional/Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua index 1a5cb6af12..00fd71b742 100644 --- a/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua +++ b/Functional/Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua @@ -1,42 +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 - +--- +-- 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 + diff --git a/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz b/Functional/Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz similarity index 100% rename from DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz rename to Functional/Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz diff --git a/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua b/Functional/Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua similarity index 96% rename from DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua rename to Functional/Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua index 0b92220ad2..6f4bee12a7 100644 --- a/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua +++ b/Functional/Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua @@ -1,43 +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 - +--- +-- 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 + diff --git a/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz b/Functional/Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz similarity index 100% rename from DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz rename to Functional/Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz diff --git a/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua b/Functional/Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua similarity index 96% rename from DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua rename to Functional/Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua index 09aad74c36..e39217d203 100644 --- a/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua +++ b/Functional/Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua @@ -1,42 +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 - +--- +-- 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 + diff --git a/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz b/Functional/Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz similarity index 100% rename from DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz rename to Functional/Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz diff --git a/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua b/Functional/Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua similarity index 97% rename from DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua rename to Functional/Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua index 4de0f48654..34cf755e65 100644 --- a/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua +++ b/Functional/Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua @@ -1,58 +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" ) +--- +-- 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 \ No newline at end of file diff --git a/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz b/Functional/Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz similarity index 100% rename from DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz rename to Functional/Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz diff --git a/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua b/Functional/Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua similarity index 97% rename from DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua rename to Functional/Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua index 40dfeae9bd..cbba0418f0 100644 --- a/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua +++ b/Functional/Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua @@ -1,46 +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 +--- +-- 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 ) \ No newline at end of file diff --git a/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz b/Functional/Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz similarity index 100% rename from DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz rename to Functional/Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz diff --git a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua b/Functional/Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua similarity index 96% rename from DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua rename to Functional/Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua index 1e86545384..a543336ba7 100644 --- a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua +++ b/Functional/Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua @@ -1,36 +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() +--- +-- 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() diff --git a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz b/Functional/Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz similarity index 100% rename from DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz rename to Functional/Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz diff --git a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua b/Functional/Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua similarity index 96% rename from DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua rename to Functional/Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua index 7b6f7e69ae..2471addbb5 100644 --- a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua +++ b/Functional/Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua @@ -1,36 +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() +--- +-- 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() diff --git a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz b/Functional/Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz similarity index 100% rename from DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz rename to Functional/Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz diff --git a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua b/Functional/Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua similarity index 96% rename from DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua rename to Functional/Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua index 0de9a38cf1..4150c5e647 100644 --- a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua +++ b/Functional/Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua @@ -1,36 +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() +--- +-- 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() diff --git a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz b/Functional/Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz similarity index 100% rename from DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz rename to Functional/Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz diff --git a/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua b/Functional/Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua similarity index 96% rename from DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua rename to Functional/Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua index 6a25a2978f..71b8ae7d0e 100644 --- a/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua +++ b/Functional/Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua @@ -1,36 +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() +--- +-- 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() diff --git a/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz b/Functional/Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz similarity index 100% rename from DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz rename to Functional/Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz diff --git a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua b/Functional/Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua similarity index 96% rename from DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua rename to Functional/Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua index 32204b34da..8abd8bf5cf 100644 --- a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua +++ b/Functional/Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua @@ -1,36 +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() +--- +-- 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() diff --git a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz b/Functional/Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz similarity index 100% rename from DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz rename to Functional/Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz diff --git a/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua b/Functional/Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua similarity index 96% rename from DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua rename to Functional/Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua index 654dc29ccd..039db9d696 100644 --- a/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua +++ b/Functional/Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua @@ -1,44 +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() +--- +-- 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() diff --git a/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz b/Functional/Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz similarity index 100% rename from DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz rename to Functional/Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz diff --git a/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua b/Functional/Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua similarity index 96% rename from DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua rename to Functional/Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua index 38bafc67d0..42f2ab9140 100644 --- a/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua +++ b/Functional/Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua @@ -1,40 +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() +--- +-- 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() diff --git a/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz b/Functional/Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz similarity index 100% rename from DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz rename to Functional/Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz diff --git a/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua b/Functional/Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua similarity index 96% rename from DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua rename to Functional/Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua index 4e8d422e9f..9b1b2df832 100644 --- a/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua +++ b/Functional/Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua @@ -1,57 +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() +--- +-- 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() diff --git a/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz b/Functional/Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz similarity index 100% rename from DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz rename to Functional/Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz diff --git a/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua b/Functional/Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua similarity index 96% rename from DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua rename to Functional/Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua index b3264fdf8c..21ce09f25e 100644 --- a/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua +++ b/Functional/Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua @@ -1,49 +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() +--- +-- 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() diff --git a/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz b/Functional/Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz similarity index 100% rename from DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz rename to Functional/Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz diff --git a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua b/Functional/Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua similarity index 97% rename from DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua rename to Functional/Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua index 9d35056ce5..6890351a4d 100644 --- a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua +++ b/Functional/Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua @@ -1,70 +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 +--- +-- 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 \ No newline at end of file diff --git a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz b/Functional/Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz similarity index 100% rename from DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz rename to Functional/Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz diff --git a/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua b/Functional/Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua similarity index 97% rename from DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua rename to Functional/Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua index 5b056e0397..b4edf657ad 100644 --- a/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua +++ b/Functional/Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua @@ -1,16 +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() - +--- +-- 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 ) \ No newline at end of file diff --git a/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz b/Functional/Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz similarity index 100% rename from DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz rename to Functional/Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz diff --git a/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua b/Functional/Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua similarity index 97% rename from DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua rename to Functional/Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua index e4c30453ef..a52d811e36 100644 --- a/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua +++ b/Functional/Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua @@ -1,18 +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() - +--- +-- 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 ) \ No newline at end of file diff --git a/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz b/Functional/Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz similarity index 100% rename from DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz rename to Functional/Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz diff --git a/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua b/Functional/Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua similarity index 97% rename from DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua rename to Functional/Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua index 80fc1ba75d..cc2969de45 100644 --- a/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua +++ b/Functional/Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua @@ -1,25 +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 ) +--- +-- 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 ) diff --git a/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz b/Functional/Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz similarity index 100% rename from DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz rename to Functional/Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz diff --git a/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua b/Functional/Escort/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua similarity index 97% rename from ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua rename to Functional/Escort/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua index f2d75c832e..2885f61672 100644 --- a/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua +++ b/Functional/Escort/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua @@ -1,89 +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" ) +--- +-- 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" ) diff --git a/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz b/Functional/Escort/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz similarity index 100% rename from ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz rename to Functional/Escort/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz diff --git a/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua b/Functional/Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua similarity index 100% rename from MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua rename to Functional/Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua diff --git a/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz b/Functional/Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz similarity index 100% rename from MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz rename to Functional/Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz diff --git a/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua b/Functional/Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua similarity index 98% rename from MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua rename to Functional/Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua index 3522ba2568..668f864f23 100644 --- a/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua +++ b/Functional/Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua @@ -1,23 +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 +------------------------------------------------------------------------- +-- 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() \ No newline at end of file diff --git a/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz b/Functional/Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz similarity index 100% rename from MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz rename to Functional/Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz diff --git a/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua b/Functional/Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua similarity index 98% rename from MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua rename to Functional/Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua index fe480710a4..baf38d3047 100644 --- a/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua +++ b/Functional/Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua @@ -1,23 +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 +------------------------------------------------------------------------- +-- 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() \ No newline at end of file diff --git a/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz b/Functional/Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz similarity index 100% rename from MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz rename to Functional/Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz diff --git a/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua b/Functional/Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua similarity index 97% rename from MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua rename to Functional/Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua index 079ab68d09..36544553b9 100644 --- a/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua +++ b/Functional/Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua @@ -1,37 +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()!! +------------------------------------------------------------------------- +-- 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()!! diff --git a/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz b/Functional/Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz similarity index 100% rename from MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz rename to Functional/Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz diff --git a/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua b/Functional/Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua similarity index 97% rename from MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua rename to Functional/Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua index 030ece1c00..af72dad47d 100644 --- a/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua +++ b/Functional/Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua @@ -1,71 +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 +------------------------------------------------------------------------- +-- 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 diff --git a/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz b/Functional/Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz similarity index 100% rename from MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz rename to Functional/Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz diff --git a/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua b/Functional/Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua similarity index 97% rename from MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua rename to Functional/Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua index 8952fee017..2398a52cfa 100644 --- a/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua +++ b/Functional/Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua @@ -1,90 +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 +------------------------------------------------------------------------- +-- 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 \ No newline at end of file diff --git a/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz b/Functional/Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz similarity index 100% rename from MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz rename to Functional/Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz diff --git a/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua b/Functional/Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua similarity index 97% rename from MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua rename to Functional/Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua index 5d278effda..7bc7a9344a 100644 --- a/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua +++ b/Functional/Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua @@ -1,71 +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) +------------------------------------------------------------------------- +-- 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) diff --git a/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz b/Functional/Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz similarity index 100% rename from MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz rename to Functional/Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz diff --git a/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua b/Functional/MissileTrainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua similarity index 97% rename from MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua rename to Functional/MissileTrainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua index 388e1127f6..b28f6644d7 100644 --- a/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua +++ b/Functional/MissileTrainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua @@ -1,20 +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 + +-- 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 diff --git a/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz b/Functional/MissileTrainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz similarity index 100% rename from MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz rename to Functional/MissileTrainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz diff --git a/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua b/Functional/ZoneCaptureCoalition/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua similarity index 97% rename from CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua rename to Functional/ZoneCaptureCoalition/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua index 8b5203d3e9..97d158449e 100644 --- a/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua +++ b/Functional/ZoneCaptureCoalition/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua @@ -1,110 +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 ) - - - +--- +-- 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 ) + + + diff --git a/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz b/Functional/ZoneCaptureCoalition/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz similarity index 100% rename from CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz rename to Functional/ZoneCaptureCoalition/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz diff --git a/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua b/Functional/ZoneCaptureCoalition/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua similarity index 97% rename from CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua rename to Functional/ZoneCaptureCoalition/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua index 8b5203d3e9..97d158449e 100644 --- a/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua +++ b/Functional/ZoneCaptureCoalition/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua @@ -1,110 +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 ) - - - +--- +-- 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 ) + + + diff --git a/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz b/Functional/ZoneCaptureCoalition/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz similarity index 100% rename from CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz rename to Functional/ZoneCaptureCoalition/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz diff --git a/CAZ - Capture Zones/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua b/Functional/ZoneCaptureCoalition/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua similarity index 97% rename from CAZ - Capture Zones/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua rename to Functional/ZoneCaptureCoalition/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua index 3a24e17d8e..41c30d8492 100644 --- a/CAZ - Capture Zones/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua +++ b/Functional/ZoneCaptureCoalition/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.lua @@ -1,114 +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 ) - - - +--- +-- 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 ) + + + diff --git a/CAZ - Capture Zones/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.miz b/Functional/ZoneCaptureCoalition/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.miz similarity index 100% rename from CAZ - Capture Zones/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.miz rename to Functional/ZoneCaptureCoalition/CAZ-003 - Attack Zone Polygon/CAZ-003 - Attack Zone Polygon.miz diff --git a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua b/Functional/ZoneCaptureCoalition/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua similarity index 97% rename from CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua rename to Functional/ZoneCaptureCoalition/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua index 4d7d737db2..7a477de451 100644 --- a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua +++ b/Functional/ZoneCaptureCoalition/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua @@ -1,114 +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 ) - +--- +-- 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() \ No newline at end of file diff --git a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz b/Functional/ZoneCaptureCoalition/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz similarity index 100% rename from CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz rename to Functional/ZoneCaptureCoalition/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz diff --git a/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua b/Ops/ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua similarity index 97% rename from OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua rename to Ops/ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua index 5bfd11f1b4..9d28d4aaf8 100644 --- a/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua +++ b/Ops/ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua @@ -1,18 +1,18 @@ - --- ATIS Batumi Airport on 143.00 MHz AM. -atisBatumi=ATIS:New(AIRBASE.Caucasus.Batumi, 143.00) -atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi") -atisBatumi:SetTowerFrequencies({260, 131}) -atisBatumi:Start() - --- ATIS Vaziani Airport on 144.00 MHz AM. -atisVaziani=ATIS:New(AIRBASE.Caucasus.Vaziani, 144.00) -atisVaziani:SetRadioRelayUnitName("Radio Relay Vaziani") -atisVaziani:SetTowerFrequencies({269, 140}) -atisVaziani:Start() - -local airbases=AIRBASE.GetAllAirbases() -for _,_airbase in pairs(airbases) do - local airbase=_airbase --Wrapper.Airbase#AIRBASE - airbase:GetRunwayData(nil, true) -end + +-- ATIS Batumi Airport on 143.00 MHz AM. +atisBatumi=ATIS:New(AIRBASE.Caucasus.Batumi, 143.00) +atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi") +atisBatumi:SetTowerFrequencies({260, 131}) +atisBatumi:Start() + +-- ATIS Vaziani Airport on 144.00 MHz AM. +atisVaziani=ATIS:New(AIRBASE.Caucasus.Vaziani, 144.00) +atisVaziani:SetRadioRelayUnitName("Radio Relay Vaziani") +atisVaziani:SetTowerFrequencies({269, 140}) +atisVaziani:Start() + +local airbases=AIRBASE.GetAllAirbases() +for _,_airbase in pairs(airbases) do + local airbase=_airbase --Wrapper.Airbase#AIRBASE + airbase:GetRunwayData(nil, true) +end diff --git a/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz b/Ops/ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz similarity index 100% rename from OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz rename to Ops/ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz diff --git a/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua b/Ops/ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua similarity index 96% rename from OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua rename to Ops/ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua index c100a29be2..52419819f3 100644 --- a/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua +++ b/Ops/ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua @@ -1,37 +1,37 @@ - - --- ATIS Nellis AFB on 270.10 MHz AM. -atisNellis=ATIS:New(AIRBASE.Nevada.Nellis_AFB, 270.1) -atisNellis:SetRadioRelayUnitName("Radio Relay Nellis") -atisNellis:SetActiveRunway("21L") -atisNellis:SetTowerFrequencies({327.000, 132.550}) -atisNellis:SetTACAN(12) -atisNellis:AddILS(109.1, "21") -atisNellis:Start() - --- For debugging: Mark runway info on F10 map. ---atisNellis:MarkRunways(true) - - --- ATIS Creech AFB on 290.45 MHz AM -atisCreech=ATIS:New(AIRBASE.Nevada.Creech_AFB, 290.45) -atisCreech:SetRadioRelayUnitName("Radio Relay Creech") -atisCreech:SetTowerFrequencies({360.6, 118.3}) -atisCreech:AddILS(108.7, "08") -atisCreech:SetTACAN(87) -atisCreech:Start() - - --- ATIS Creech AFB on 290.45 MHz AM. -atisMcCarran=ATIS:New(AIRBASE.Nevada.McCarran_International_Airport, 132.4) -atisMcCarran:SetRadioRelayUnitName("Radio Relay McCarran") -atisMcCarran:SetTowerFrequencies({257.8, 119.9}) -atisMcCarran:SetRunwayHeadingsMagnetic({"25L", "25R"}) -atisMcCarran:SetActiveRunway("R") -atisMcCarran:AddILS(110.3, "25R") -atisMcCarran:AddILS(111.75, "25L") -atisMcCarran:SetVOR(116.9) -atisMcCarran:SetTACAN(116) -atisMcCarran:SetElevation() -atisMcCarran:SetRunwayLength() -atisMcCarran:Start() + + +-- ATIS Nellis AFB on 270.10 MHz AM. +atisNellis=ATIS:New(AIRBASE.Nevada.Nellis_AFB, 270.1) +atisNellis:SetRadioRelayUnitName("Radio Relay Nellis") +atisNellis:SetActiveRunway("21L") +atisNellis:SetTowerFrequencies({327.000, 132.550}) +atisNellis:SetTACAN(12) +atisNellis:AddILS(109.1, "21") +atisNellis:Start() + +-- For debugging: Mark runway info on F10 map. +--atisNellis:MarkRunways(true) + + +-- ATIS Creech AFB on 290.45 MHz AM +atisCreech=ATIS:New(AIRBASE.Nevada.Creech_AFB, 290.45) +atisCreech:SetRadioRelayUnitName("Radio Relay Creech") +atisCreech:SetTowerFrequencies({360.6, 118.3}) +atisCreech:AddILS(108.7, "08") +atisCreech:SetTACAN(87) +atisCreech:Start() + + +-- ATIS Creech AFB on 290.45 MHz AM. +atisMcCarran=ATIS:New(AIRBASE.Nevada.McCarran_International_Airport, 132.4) +atisMcCarran:SetRadioRelayUnitName("Radio Relay McCarran") +atisMcCarran:SetTowerFrequencies({257.8, 119.9}) +atisMcCarran:SetRunwayHeadingsMagnetic({"25L", "25R"}) +atisMcCarran:SetActiveRunway("R") +atisMcCarran:AddILS(110.3, "25R") +atisMcCarran:AddILS(111.75, "25L") +atisMcCarran:SetVOR(116.9) +atisMcCarran:SetTACAN(116) +atisMcCarran:SetElevation() +atisMcCarran:SetRunwayLength() +atisMcCarran:Start() diff --git a/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz b/Ops/ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz similarity index 100% rename from OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz rename to Ops/ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz diff --git a/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua b/Ops/ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua similarity index 97% rename from OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua rename to Ops/ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua index be713b1907..89824a2690 100644 --- a/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua +++ b/Ops/ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua @@ -1,26 +1,26 @@ - -atisDubai=ATIS:New(AIRBASE.PersianGulf.Dubai_Intl, 131.7) -atisDubai:SetRadioRelayUnitName("Radio Relay Dubai Intl") -atisDubai:SetMetricUnits() -atisDubai:SetActiveRunway("R") -atisDubai:SetTowerFrequencies({251.05, 118.75}) -atisDubai:AddILS(110.9, "30") -atisDubai:AddILS(110.1, "12") -atisDubai:Start() - -atisAbuDhabi=ATIS:New(AIRBASE.PersianGulf.Abu_Dhabi_International_Airport, 125.1) -atisAbuDhabi:SetRadioRelayUnitName("Radio Relay Abu Dhabi International Airport") -atisAbuDhabi:SetMetricUnits() -atisAbuDhabi:SetActiveRunway("L") -atisAbuDhabi:SetTowerFrequencies({250.5, 119.2}) -atisAbuDhabi:SetVOR(114.25) -atisAbuDhabi:Start() - --- For debug only! Mark Runway info on F10 map. ---atisAbuDhabi:MarkRunways(true) - --- Jiroft Airport. No radio relay unit ==> No subtitles. -atisJiroft=ATIS:New(AIRBASE.PersianGulf.Jiroft_Airport, 130) -atisJiroft:SetMetricUnits() -atisJiroft:SetTowerFrequencies({250.75, 136}) + +atisDubai=ATIS:New(AIRBASE.PersianGulf.Dubai_Intl, 131.7) +atisDubai:SetRadioRelayUnitName("Radio Relay Dubai Intl") +atisDubai:SetMetricUnits() +atisDubai:SetActiveRunway("R") +atisDubai:SetTowerFrequencies({251.05, 118.75}) +atisDubai:AddILS(110.9, "30") +atisDubai:AddILS(110.1, "12") +atisDubai:Start() + +atisAbuDhabi=ATIS:New(AIRBASE.PersianGulf.Abu_Dhabi_International_Airport, 125.1) +atisAbuDhabi:SetRadioRelayUnitName("Radio Relay Abu Dhabi International Airport") +atisAbuDhabi:SetMetricUnits() +atisAbuDhabi:SetActiveRunway("L") +atisAbuDhabi:SetTowerFrequencies({250.5, 119.2}) +atisAbuDhabi:SetVOR(114.25) +atisAbuDhabi:Start() + +-- For debug only! Mark Runway info on F10 map. +--atisAbuDhabi:MarkRunways(true) + +-- Jiroft Airport. No radio relay unit ==> No subtitles. +atisJiroft=ATIS:New(AIRBASE.PersianGulf.Jiroft_Airport, 130) +atisJiroft:SetMetricUnits() +atisJiroft:SetTowerFrequencies({250.75, 136}) atisJiroft:Start() \ No newline at end of file diff --git a/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz b/Ops/ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz similarity index 100% rename from OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz rename to Ops/ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz diff --git a/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua b/Ops/ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua similarity index 97% rename from OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua rename to Ops/ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua index 021ab7155c..efbb91b964 100644 --- a/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua +++ b/Ops/ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua @@ -1,44 +1,44 @@ - ---[[ - --- Beirut Rafic Hariri Airport -atisBeirut=ATIS:New(AIRBASE.Syria.Beirut_Rafic_Hariri, 130.0) -atisBeirut:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Beirut_Rafic_Hariri) -atisBeirut:SetTowerFrequencies({251.450, 118.900, 39.850, 4.475}) -atisBeirut:SetVOR(112.60) -atisBeirut:AddILS(109.5, "17") -atisBeirut:SetMapMarks() -atisBeirut:Start() - --- Damascus Airport -atisDamascus=ATIS:New(AIRBASE.Syria.Damascus, 131.0) -atisDamascus:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Damascus) -atisDamascus:SetTowerFrequencies({251.500, 118.500, 39.900, 4.500}) -atisDamascus:SetActiveRunway("R") -atisDamascus:SetVOR(116.00) -atisDamascus:AddILS(109.9, "23") -atisDamascus:SetMapMarks() -atisDamascus:Start() - --- Ramat David Airport -atisRamatDavid=ATIS:New(AIRBASE.Syria.Ramat_David, 132.0) -atisRamatDavid:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Ramat_David) -atisRamatDavid:SetTowerFrequencies({251.000, 118.600, 39.400, 4.250}) -atisRamatDavid:ReportQNHOnly() -- More realitic as only QNH not QFE is reported. -atisRamatDavid:ReportZuluTimeOnly() -- More realistic as -atisRamatDavid:SetMapMarks() -atisRamatDavid:Start() - -]] - -PROFILER.Start() - --- Incirlik -atisIncirlik=ATIS:New(AIRBASE.Syria.Incirlik, 250.40) -atisIncirlik:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Incirlik) -atisIncirlik:SetImperialUnits() -atisIncirlik:SetTACAN(21) -atisIncirlik:SetTowerFrequencies({250.350}) -atisIncirlik:AddILS(109.30, "5") -atisIncirlik:AddILS(111.70, "23") + +--[[ + +-- Beirut Rafic Hariri Airport +atisBeirut=ATIS:New(AIRBASE.Syria.Beirut_Rafic_Hariri, 130.0) +atisBeirut:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Beirut_Rafic_Hariri) +atisBeirut:SetTowerFrequencies({251.450, 118.900, 39.850, 4.475}) +atisBeirut:SetVOR(112.60) +atisBeirut:AddILS(109.5, "17") +atisBeirut:SetMapMarks() +atisBeirut:Start() + +-- Damascus Airport +atisDamascus=ATIS:New(AIRBASE.Syria.Damascus, 131.0) +atisDamascus:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Damascus) +atisDamascus:SetTowerFrequencies({251.500, 118.500, 39.900, 4.500}) +atisDamascus:SetActiveRunway("R") +atisDamascus:SetVOR(116.00) +atisDamascus:AddILS(109.9, "23") +atisDamascus:SetMapMarks() +atisDamascus:Start() + +-- Ramat David Airport +atisRamatDavid=ATIS:New(AIRBASE.Syria.Ramat_David, 132.0) +atisRamatDavid:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Ramat_David) +atisRamatDavid:SetTowerFrequencies({251.000, 118.600, 39.400, 4.250}) +atisRamatDavid:ReportQNHOnly() -- More realitic as only QNH not QFE is reported. +atisRamatDavid:ReportZuluTimeOnly() -- More realistic as +atisRamatDavid:SetMapMarks() +atisRamatDavid:Start() + +]] + +PROFILER.Start() + +-- Incirlik +atisIncirlik=ATIS:New(AIRBASE.Syria.Incirlik, 250.40) +atisIncirlik:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Incirlik) +atisIncirlik:SetImperialUnits() +atisIncirlik:SetTACAN(21) +atisIncirlik:SetTowerFrequencies({250.350}) +atisIncirlik:AddILS(109.30, "5") +atisIncirlik:AddILS(111.70, "23") atisIncirlik:Start() \ No newline at end of file diff --git a/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz b/Ops/ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz similarity index 100% rename from OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz rename to Ops/ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz diff --git a/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua b/Ops/ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua similarity index 97% rename from OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua rename to Ops/ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua index 1ca1a2f4c3..a0a5ed358c 100644 --- a/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua +++ b/Ops/ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua @@ -1,29 +1,29 @@ ---- --- SRS: --- SRS version 1.9.6.0+ required. See https://github.com/ciribob/DCS-SimpleRadioStandalone --- SRS is installed in the D:\DCS\_SRS directory. NOTE that backslashes need to be escaped and you have to adjust the directory for you personal install path. ---- - - --- Damascus Airport: Use male voice with en-US culture (accent) -atisDamascus=ATIS:New(AIRBASE.Syria.Damascus, 250.00) -atisDamascus:SetSRS("D:\\DCS\\_SRS", "male", "en-US") -atisDamascus:SetTowerFrequencies({251.500, 118.500, 39.900, 4.500}) -atisDamascus:SetActiveRunway("R") -atisDamascus:SetVOR(116.00) -atisDamascus:AddILS(109.9, "23") -atisDamascus:SetMapMarks() -atisDamascus:Start() - - --- Incirlik: Use specific voice named "Microsoft Hedda Desktop", which is a female German adult. Hope you don't mind the accent too much ;) -atisIncirlik=ATIS:New(AIRBASE.Syria.Incirlik, 251.50) -atisIncirlik:SetSRS("D:\\DCS\\_SRS", nil, nil, "Microsoft Hedda Desktop") -atisIncirlik:SetImperialUnits() -atisIncirlik:SetTACAN(21) -atisIncirlik:SetTowerFrequencies({250.350}) -atisIncirlik:AddILS(109.30, "5") -atisIncirlik:AddILS(111.70, "23") -atisIncirlik:Start() - - +--- +-- SRS: +-- SRS version 1.9.6.0+ required. See https://github.com/ciribob/DCS-SimpleRadioStandalone +-- SRS is installed in the D:\DCS\_SRS directory. NOTE that backslashes need to be escaped and you have to adjust the directory for you personal install path. +--- + + +-- Damascus Airport: Use male voice with en-US culture (accent) +atisDamascus=ATIS:New(AIRBASE.Syria.Damascus, 250.00) +atisDamascus:SetSRS("D:\\DCS\\_SRS", "male", "en-US") +atisDamascus:SetTowerFrequencies({251.500, 118.500, 39.900, 4.500}) +atisDamascus:SetActiveRunway("R") +atisDamascus:SetVOR(116.00) +atisDamascus:AddILS(109.9, "23") +atisDamascus:SetMapMarks() +atisDamascus:Start() + + +-- Incirlik: Use specific voice named "Microsoft Hedda Desktop", which is a female German adult. Hope you don't mind the accent too much ;) +atisIncirlik=ATIS:New(AIRBASE.Syria.Incirlik, 251.50) +atisIncirlik:SetSRS("D:\\DCS\\_SRS", nil, nil, "Microsoft Hedda Desktop") +atisIncirlik:SetImperialUnits() +atisIncirlik:SetTACAN(21) +atisIncirlik:SetTowerFrequencies({250.350}) +atisIncirlik:AddILS(109.30, "5") +atisIncirlik:AddILS(111.70, "23") +atisIncirlik:Start() + + diff --git a/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz b/Ops/ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz similarity index 100% rename from OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz rename to Ops/ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz diff --git a/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua b/Ops/Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua similarity index 97% rename from OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua rename to Ops/Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua index 53b14f2795..5afc63d101 100644 --- a/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua +++ b/Ops/Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua @@ -1,150 +1,150 @@ ----------------------------------------------------------------------------------------- ---- --- Name: BOS-100 - Stennis Hornet and Tomcat --- Author: funkyfranky --- Date Created: 17 August 2019 --- --- # Situation: --- --- Practice Case I/II/III recovery using the F/A-18C Hornet or F-14B Tomcat. --- --- See mission briefing for further details. --- --- *** IMPORTANT *** --- If you run the mission in single player, hit ESC twice before entering a slot! --- Otherwise the script will not load due to a long standing DCS bug. --- ----------------------------------------------------------------------------------------- - --- No MOOSE settings menu. Comment out this line if required. -_SETTINGS:SetPlayerMenuOff() - --- S-3B Recovery Tanker spawning in air. -local tanker=RECOVERYTANKER:New("USS Stennis", "Texaco Group") -tanker:SetTakeoffAir() -tanker:SetRadio(250) -tanker:SetModex(511) -tanker:SetTACAN(1, "TKR") -tanker:__Start(1) - --- E-2D AWACS spawning on Stennis. -local awacs=RECOVERYTANKER:New("USS Stennis", "E-2D Wizard Group") -awacs:SetAWACS() -awacs:SetRadio(260) -awacs:SetAltitude(20000) -awacs:SetCallsign(CALLSIGN.AWACS.Wizard) -awacs:SetRacetrackDistances(30, 15) -awacs:SetModex(611) -awacs:SetTACAN(2, "WIZ") -awacs:__Start(1) - --- Rescue Helo with home base Lake Erie. Has to be a global object! -rescuehelo=RESCUEHELO:New("USS Stennis", "Rescue Helo") -rescuehelo:SetHomeBase(AIRBASE:FindByName("Lake Erie")) -rescuehelo:SetModex(42) -rescuehelo:__Start(1) - --- Create AIRBOSS object. -local AirbossStennis=AIRBOSS:New("USS Stennis") - --- Add recovery windows: --- Case I from 9 to 10 am. -local window1=AirbossStennis:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25) --- Case II with +15 degrees holding offset from 15:00 for 60 min. -local window2=AirbossStennis:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 23) --- Case III with +30 degrees holding offset from 2100 to 2200. -local window3=AirbossStennis:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 21) - --- Set folder of airboss sound files within miz file. -AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/") - --- Single carrier menu optimization. -AirbossStennis:SetMenuSingleCarrier() - --- Skipper menu. -AirbossStennis:SetMenuRecovery(30, 20, false) - --- Remove landed AI planes from flight deck. -AirbossStennis:SetDespawnOnEngineShutdown() - --- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). -AirbossStennis:Load() - --- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. -AirbossStennis:SetAutoSave() - --- Enable trap sheet. -AirbossStennis:SetTrapSheet() - --- Start airboss class. -AirbossStennis:Start() - - ---- Function called when recovery tanker is started. -function tanker:OnAfterStart(From,Event,To) - - -- Set recovery tanker. - AirbossStennis:SetRecoveryTanker(tanker) - - - -- Use tanker as radio relay unit for LSO transmissions. - AirbossStennis:SetRadioRelayLSO(self:GetUnitName()) - -end - ---- Function called when AWACS is started. -function awacs:OnAfterStart(From,Event,To) - -- Set AWACS. - AirbossStennis:SetRecoveryTanker(tanker) -end - - ---- Function called when rescue helo is started. -function rescuehelo:OnAfterStart(From,Event,To) - -- Use rescue helo as radio relay for Marshal. - AirbossStennis:SetRadioRelayMarshal(self:GetUnitName()) -end - ---- Function called when a player gets graded by the LSO. -function AirbossStennis:OnAfterLSOGrade(From, Event, To, playerData, grade) - local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData - local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade - - ---------------------------------------- - --- Interface your Discord bot here! --- - ---------------------------------------- - - local score=tonumber(Grade.points) - local name=tostring(PlayerData.name) - - -- Report LSO grade to dcs.log file. - env.info(string.format("Player %s scored %.1f", name, score)) -end - - ---------------------------- ---- Generate AI Traffic --- ---------------------------- - --- Spawn some AI flights as additional traffic. -local F181=SPAWN:New("FA-18C Group 1"):InitModex(111) -- Coming in from NW after ~ 6 min -local F182=SPAWN:New("FA-18C Group 2"):InitModex(112) -- Coming in from NW after ~20 min -local F183=SPAWN:New("FA-18C Group 3"):InitModex(113) -- Coming in from W after ~18 min -local F14=SPAWN:New("F-14B 2ship"):InitModex(211) -- Coming in from SW after ~ 4 min -local E2D=SPAWN:New("E-2D Group"):InitModex(311) -- Coming in from NE after ~10 min -local S3B=SPAWN:New("S-3B Group"):InitModex(411) -- Coming in from S after ~16 min - --- Spawn always 9 min before the recovery window opens. -local spawntimes={"8:51", "14:51", "20:51"} -for _,spawntime in pairs(spawntimes) do - local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime() - if _time>0 then - SCHEDULER:New(nil, F181.Spawn, {F181}, _time) - SCHEDULER:New(nil, F182.Spawn, {F182}, _time) - SCHEDULER:New(nil, F183.Spawn, {F183}, _time) - SCHEDULER:New(nil, F14.Spawn, {F14}, _time) - SCHEDULER:New(nil, E2D.Spawn, {E2D}, _time) - SCHEDULER:New(nil, S3B.Spawn, {S3B}, _time) - end -end - +---------------------------------------------------------------------------------------- +--- +-- Name: BOS-100 - Stennis Hornet and Tomcat +-- Author: funkyfranky +-- Date Created: 17 August 2019 +-- +-- # Situation: +-- +-- Practice Case I/II/III recovery using the F/A-18C Hornet or F-14B Tomcat. +-- +-- See mission briefing for further details. +-- +-- *** IMPORTANT *** +-- If you run the mission in single player, hit ESC twice before entering a slot! +-- Otherwise the script will not load due to a long standing DCS bug. +-- +---------------------------------------------------------------------------------------- + +-- No MOOSE settings menu. Comment out this line if required. +_SETTINGS:SetPlayerMenuOff() + +-- S-3B Recovery Tanker spawning in air. +local tanker=RECOVERYTANKER:New("USS Stennis", "Texaco Group") +tanker:SetTakeoffAir() +tanker:SetRadio(250) +tanker:SetModex(511) +tanker:SetTACAN(1, "TKR") +tanker:__Start(1) + +-- E-2D AWACS spawning on Stennis. +local awacs=RECOVERYTANKER:New("USS Stennis", "E-2D Wizard Group") +awacs:SetAWACS() +awacs:SetRadio(260) +awacs:SetAltitude(20000) +awacs:SetCallsign(CALLSIGN.AWACS.Wizard) +awacs:SetRacetrackDistances(30, 15) +awacs:SetModex(611) +awacs:SetTACAN(2, "WIZ") +awacs:__Start(1) + +-- Rescue Helo with home base Lake Erie. Has to be a global object! +rescuehelo=RESCUEHELO:New("USS Stennis", "Rescue Helo") +rescuehelo:SetHomeBase(AIRBASE:FindByName("Lake Erie")) +rescuehelo:SetModex(42) +rescuehelo:__Start(1) + +-- Create AIRBOSS object. +local AirbossStennis=AIRBOSS:New("USS Stennis") + +-- Add recovery windows: +-- Case I from 9 to 10 am. +local window1=AirbossStennis:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25) +-- Case II with +15 degrees holding offset from 15:00 for 60 min. +local window2=AirbossStennis:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 23) +-- Case III with +30 degrees holding offset from 2100 to 2200. +local window3=AirbossStennis:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 21) + +-- Set folder of airboss sound files within miz file. +AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/") + +-- Single carrier menu optimization. +AirbossStennis:SetMenuSingleCarrier() + +-- Skipper menu. +AirbossStennis:SetMenuRecovery(30, 20, false) + +-- Remove landed AI planes from flight deck. +AirbossStennis:SetDespawnOnEngineShutdown() + +-- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). +AirbossStennis:Load() + +-- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. +AirbossStennis:SetAutoSave() + +-- Enable trap sheet. +AirbossStennis:SetTrapSheet() + +-- Start airboss class. +AirbossStennis:Start() + + +--- Function called when recovery tanker is started. +function tanker:OnAfterStart(From,Event,To) + + -- Set recovery tanker. + AirbossStennis:SetRecoveryTanker(tanker) + + + -- Use tanker as radio relay unit for LSO transmissions. + AirbossStennis:SetRadioRelayLSO(self:GetUnitName()) + +end + +--- Function called when AWACS is started. +function awacs:OnAfterStart(From,Event,To) + -- Set AWACS. + AirbossStennis:SetRecoveryTanker(tanker) +end + + +--- Function called when rescue helo is started. +function rescuehelo:OnAfterStart(From,Event,To) + -- Use rescue helo as radio relay for Marshal. + AirbossStennis:SetRadioRelayMarshal(self:GetUnitName()) +end + +--- Function called when a player gets graded by the LSO. +function AirbossStennis:OnAfterLSOGrade(From, Event, To, playerData, grade) + local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData + local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade + + ---------------------------------------- + --- Interface your Discord bot here! --- + ---------------------------------------- + + local score=tonumber(Grade.points) + local name=tostring(PlayerData.name) + + -- Report LSO grade to dcs.log file. + env.info(string.format("Player %s scored %.1f", name, score)) +end + + +--------------------------- +--- Generate AI Traffic --- +--------------------------- + +-- Spawn some AI flights as additional traffic. +local F181=SPAWN:New("FA-18C Group 1"):InitModex(111) -- Coming in from NW after ~ 6 min +local F182=SPAWN:New("FA-18C Group 2"):InitModex(112) -- Coming in from NW after ~20 min +local F183=SPAWN:New("FA-18C Group 3"):InitModex(113) -- Coming in from W after ~18 min +local F14=SPAWN:New("F-14B 2ship"):InitModex(211) -- Coming in from SW after ~ 4 min +local E2D=SPAWN:New("E-2D Group"):InitModex(311) -- Coming in from NE after ~10 min +local S3B=SPAWN:New("S-3B Group"):InitModex(411) -- Coming in from S after ~16 min + +-- Spawn always 9 min before the recovery window opens. +local spawntimes={"8:51", "14:51", "20:51"} +for _,spawntime in pairs(spawntimes) do + local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime() + if _time>0 then + SCHEDULER:New(nil, F181.Spawn, {F181}, _time) + SCHEDULER:New(nil, F182.Spawn, {F182}, _time) + SCHEDULER:New(nil, F183.Spawn, {F183}, _time) + SCHEDULER:New(nil, F14.Spawn, {F14}, _time) + SCHEDULER:New(nil, E2D.Spawn, {E2D}, _time) + SCHEDULER:New(nil, S3B.Spawn, {S3B}, _time) + end +end + diff --git a/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz b/Ops/Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz similarity index 100% rename from OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz rename to Ops/Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz diff --git a/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua b/Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua similarity index 100% rename from OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua rename to Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua diff --git a/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz b/Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz similarity index 100% rename from OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz rename to Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz diff --git a/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua b/Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua similarity index 97% rename from OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua rename to Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua index 145a50171d..61f35adff2 100644 --- a/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua +++ b/Ops/Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/RecoveryTanker - 030 - Uncontrolled_AI.lua @@ -1,52 +1,52 @@ ---- --- RECOVERYTANKER: Uncontrolled_AI --- --- Created by Azza276. --- --- DateTime: 29/12/2020 20:47 --- --- Simple Recovery tanker script demonstrating the use of the RECOVERYTANKER.uncontrolledac method. --- or RECOVERYTANKER:SetUseUncontrolledAircraft(). Both are shown below. --- You will require an AI skill S-3B tanker group placed in the mission editor, --- Set to "Takeoff from Ramp" and ensure "Uncontrolled" is ticked. --- Ensure "Late activation" is not ticked. --- --- 2 S-3B Tankers will be spawned on the USS Stennis as a visible objects (not late activation) but without crew. --- After 30 seconds, the first S-3B will start up go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). --- After 1 minute, the second S-3B will start up and go on station overhead at angels 12 with 300 knots TAS (~250 KIAS) --- Radio frequencies, callsign are set below and overrule the settings of the AI group. ---- - --- S-3B at USS Stennis spawning on deck, Start with Delay in Moose. -local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") - --- Custom settings for radio frequency, TACAN and callsign. -tankerStennis:SetRadio(261) -tankerStennis:SetTACAN(37, "SHL") -tankerStennis:SetCallsign(CALLSIGN.Tanker.Shell, 3) - ---tankerStennis:SetTakeoffCold() --This is not required as they will always start cold from uncontrolled state. - ---RECOVERYTANKER.uncontrolledac if true, use an uncontrolled tanker group already present in the mission. -tankerStennis.uncontrolledac = true - --- Start recovery tanker. --- NOTE: Delay to show Aircraft visible on deck then starts later (30 seconds after mission start). -tankerStennis:__Start(30) - - - --- S-3B at USS Stennis spawning on deck, Start with Delay in Mission Editor Trigger. -tankerStennis2=RECOVERYTANKER:New( "USS Stennis", "Texaco Group-1") -tankerStennis2:SetRadio(271) -tankerStennis2:SetTACAN(38, "SHE") -tankerStennis2:SetCallsign(3, 2) --First parameter is Callsign name (1=Texaco, 2=Arco, 3=Shell) -tankerStennis2:SetAltitude(12000) --Sets Orbit Altitude -tankerStennis2:SetSpeed(300) --Sets speed to 300 knots TAS (~250 KIAS at 12000ft) - ---RECOVERYTANKER:SetUseUncontrolledAircraft() to use an uncontrolled tanker group already present in the mission. -tankerStennis2:SetUseUncontrolledAircraft() - --- tankerStennis2:Start() --- The above without "--" is loaded to the Mission editor trigger "Do Script" action after 60 seconds condition. --- NOTE: Delay to show Aircraft visible on deck then starts later (60 seconds after mission start).. +--- +-- RECOVERYTANKER: Uncontrolled_AI +-- +-- Created by Azza276. +-- +-- DateTime: 29/12/2020 20:47 +-- +-- Simple Recovery tanker script demonstrating the use of the RECOVERYTANKER.uncontrolledac method. +-- or RECOVERYTANKER:SetUseUncontrolledAircraft(). Both are shown below. +-- You will require an AI skill S-3B tanker group placed in the mission editor, +-- Set to "Takeoff from Ramp" and ensure "Uncontrolled" is ticked. +-- Ensure "Late activation" is not ticked. +-- +-- 2 S-3B Tankers will be spawned on the USS Stennis as a visible objects (not late activation) but without crew. +-- After 30 seconds, the first S-3B will start up go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). +-- After 1 minute, the second S-3B will start up and go on station overhead at angels 12 with 300 knots TAS (~250 KIAS) +-- Radio frequencies, callsign are set below and overrule the settings of the AI group. +--- + +-- S-3B at USS Stennis spawning on deck, Start with Delay in Moose. +local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") + +-- Custom settings for radio frequency, TACAN and callsign. +tankerStennis:SetRadio(261) +tankerStennis:SetTACAN(37, "SHL") +tankerStennis:SetCallsign(CALLSIGN.Tanker.Shell, 3) + +--tankerStennis:SetTakeoffCold() --This is not required as they will always start cold from uncontrolled state. + +--RECOVERYTANKER.uncontrolledac if true, use an uncontrolled tanker group already present in the mission. +tankerStennis.uncontrolledac = true + +-- Start recovery tanker. +-- NOTE: Delay to show Aircraft visible on deck then starts later (30 seconds after mission start). +tankerStennis:__Start(30) + + + +-- S-3B at USS Stennis spawning on deck, Start with Delay in Mission Editor Trigger. +tankerStennis2=RECOVERYTANKER:New( "USS Stennis", "Texaco Group-1") +tankerStennis2:SetRadio(271) +tankerStennis2:SetTACAN(38, "SHE") +tankerStennis2:SetCallsign(3, 2) --First parameter is Callsign name (1=Texaco, 2=Arco, 3=Shell) +tankerStennis2:SetAltitude(12000) --Sets Orbit Altitude +tankerStennis2:SetSpeed(300) --Sets speed to 300 knots TAS (~250 KIAS at 12000ft) + +--RECOVERYTANKER:SetUseUncontrolledAircraft() to use an uncontrolled tanker group already present in the mission. +tankerStennis2:SetUseUncontrolledAircraft() + +-- tankerStennis2:Start() +-- The above without "--" is loaded to the Mission editor trigger "Do Script" action after 60 seconds condition. +-- NOTE: Delay to show Aircraft visible on deck then starts later (60 seconds after mission start).. diff --git a/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua b/Ops/Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua similarity index 97% rename from OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua rename to Ops/Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua index 173cfd9440..b8a12422d9 100644 --- a/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua +++ b/Ops/Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua @@ -1,124 +1,124 @@ ----------------------------------------------------------------------------------------- ---- --- Name: BOS-200 - Tarawa Harrier --- Author: funkyfranky --- Date Created: 18 August 2019 --- --- # Situation: --- --- Practice Case I/II/III recovery using the AV-8B Harrier on the USS Tarawa. --- --- See mission briefing for further details. --- --- *** IMPORTANT *** --- If you run the mission in single player, hit ESC twice before entering a slot! --- Otherwise the script will not load due to a long standing DCS bug. --- ----------------------------------------------------------------------------------------- - --- No MOOSE settings menu. Comment out this line if required. -_SETTINGS:SetPlayerMenuOff() - --- Rescue Helo with home base USS Viksburg. Has to be a global object! -rescuehelo=RESCUEHELO:New("USS Tarawa", "Rescue Helo") -rescuehelo:SetHomeBase(AIRBASE:FindByName("USS Viksburg")) -rescuehelo:SetModex(42) - --- Create AIRBOSS object. -local AirbossTarawa=AIRBOSS:New("USS Tarawa") - --- Add recovery windows: --- Case I from 9:00 to 10:00 am. -local window1=AirbossTarawa:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25) --- Case II with +15 degrees holding offset from 15:00 for 60 min. -local window2=AirbossTarawa:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 20) --- Case III with +30 degrees holding offset from 2100 to 2200. -local window3=AirbossTarawa:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 20) - --- Set TACAN. -AirbossTarawa:SetTACAN(73, "X", "LHA") - --- Not sure if Tarawa has ICLS? ---AirbossTarawa:SetICLSoff() - --- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). -AirbossTarawa:Load() - --- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. -AirbossTarawa:SetAutoSave() - --- Set radio relay units in order to properly send transmissions with subtitles only visible if correct frequency is tuned in. -AirbossTarawa:SetRadioRelayLSO("CH-53E Radio Relay") -AirbossTarawa:SetRadioRelayMarshal("SH-60B Radio Relay") - --- Radios. -AirbossTarawa:SetMarshalRadio(243) -AirbossTarawa:SetLSORadio(265) - ---Set folder of airboss sound files within miz file. -AirbossTarawa:SetSoundfilesFolder("Airboss Soundfiles/") - --- Remove landed AI planes from flight deck. -AirbossTarawa:SetDespawnOnEngineShutdown() - --- Single carrier menu optimization. -AirbossTarawa:SetMenuSingleCarrier() - --- Add Skipper menu to start recovery via F10 radio menu. -AirbossTarawa:SetMenuRecovery(30, 20, true) - --- Start Airboss. -AirbossTarawa:Start() - - ---- Function called when a recovery starts. -function AirbossTarawa:OnAfterRecoveryStart(From, Event, To, Case, Offset) - -- Start helo. - rescuehelo:Start() -end - ---- Function called when a recovery ends. -function AirbossTarawa:OnAfterRecoveryStop(From,Event,To) - -- Send helo RTB. - rescuehelo:RTB() -end - ---- Function called when the rescue helo has returned to base. -function rescuehelo:OnAfterReturned(From, Event, To, airbase) - -- Stop helo. - self:__Stop(3) -end - ---- Function called when a player gets graded by the LSO. -function AirbossTarawa:OnAfterLSOGrade(From, Event, To, playerData, grade) - local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData - local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade - - ---------------------------------------- - --- Interface your Discord bot here! --- - ---------------------------------------- - - local score=tonumber(Grade.points) - local name=tostring(PlayerData.name) - - -- Report LSO grade to dcs.log file. - env.info(self.lid..string.format("Player %s scored %.1f", name, score)) -end - - ---------------------------- ---- Generate AI Traffic --- ---------------------------- - -local AV8B1=SPAWN:New("Harrier Group 1"):InitModex(70) -local AV8B2=SPAWN:New("Harrier Group 2"):InitModex(80) - --- Spawn always 9 min before the recovery window opens. -local spawntimes={"9:06", "14:51", "20:51"} -for _,spawntime in pairs(spawntimes) do - local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime() - if _time>0 then - SCHEDULER:New(nil, AV8B1.Spawn, {AV8B1}, _time) - SCHEDULER:New(nil, AV8B2.Spawn, {AV8B2}, _time) - end -end +---------------------------------------------------------------------------------------- +--- +-- Name: BOS-200 - Tarawa Harrier +-- Author: funkyfranky +-- Date Created: 18 August 2019 +-- +-- # Situation: +-- +-- Practice Case I/II/III recovery using the AV-8B Harrier on the USS Tarawa. +-- +-- See mission briefing for further details. +-- +-- *** IMPORTANT *** +-- If you run the mission in single player, hit ESC twice before entering a slot! +-- Otherwise the script will not load due to a long standing DCS bug. +-- +---------------------------------------------------------------------------------------- + +-- No MOOSE settings menu. Comment out this line if required. +_SETTINGS:SetPlayerMenuOff() + +-- Rescue Helo with home base USS Viksburg. Has to be a global object! +rescuehelo=RESCUEHELO:New("USS Tarawa", "Rescue Helo") +rescuehelo:SetHomeBase(AIRBASE:FindByName("USS Viksburg")) +rescuehelo:SetModex(42) + +-- Create AIRBOSS object. +local AirbossTarawa=AIRBOSS:New("USS Tarawa") + +-- Add recovery windows: +-- Case I from 9:00 to 10:00 am. +local window1=AirbossTarawa:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25) +-- Case II with +15 degrees holding offset from 15:00 for 60 min. +local window2=AirbossTarawa:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 20) +-- Case III with +30 degrees holding offset from 2100 to 2200. +local window3=AirbossTarawa:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 20) + +-- Set TACAN. +AirbossTarawa:SetTACAN(73, "X", "LHA") + +-- Not sure if Tarawa has ICLS? +--AirbossTarawa:SetICLSoff() + +-- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). +AirbossTarawa:Load() + +-- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. +AirbossTarawa:SetAutoSave() + +-- Set radio relay units in order to properly send transmissions with subtitles only visible if correct frequency is tuned in. +AirbossTarawa:SetRadioRelayLSO("CH-53E Radio Relay") +AirbossTarawa:SetRadioRelayMarshal("SH-60B Radio Relay") + +-- Radios. +AirbossTarawa:SetMarshalRadio(243) +AirbossTarawa:SetLSORadio(265) + +--Set folder of airboss sound files within miz file. +AirbossTarawa:SetSoundfilesFolder("Airboss Soundfiles/") + +-- Remove landed AI planes from flight deck. +AirbossTarawa:SetDespawnOnEngineShutdown() + +-- Single carrier menu optimization. +AirbossTarawa:SetMenuSingleCarrier() + +-- Add Skipper menu to start recovery via F10 radio menu. +AirbossTarawa:SetMenuRecovery(30, 20, true) + +-- Start Airboss. +AirbossTarawa:Start() + + +--- Function called when a recovery starts. +function AirbossTarawa:OnAfterRecoveryStart(From, Event, To, Case, Offset) + -- Start helo. + rescuehelo:Start() +end + +--- Function called when a recovery ends. +function AirbossTarawa:OnAfterRecoveryStop(From,Event,To) + -- Send helo RTB. + rescuehelo:RTB() +end + +--- Function called when the rescue helo has returned to base. +function rescuehelo:OnAfterReturned(From, Event, To, airbase) + -- Stop helo. + self:__Stop(3) +end + +--- Function called when a player gets graded by the LSO. +function AirbossTarawa:OnAfterLSOGrade(From, Event, To, playerData, grade) + local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData + local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade + + ---------------------------------------- + --- Interface your Discord bot here! --- + ---------------------------------------- + + local score=tonumber(Grade.points) + local name=tostring(PlayerData.name) + + -- Report LSO grade to dcs.log file. + env.info(self.lid..string.format("Player %s scored %.1f", name, score)) +end + + +--------------------------- +--- Generate AI Traffic --- +--------------------------- + +local AV8B1=SPAWN:New("Harrier Group 1"):InitModex(70) +local AV8B2=SPAWN:New("Harrier Group 2"):InitModex(80) + +-- Spawn always 9 min before the recovery window opens. +local spawntimes={"9:06", "14:51", "20:51"} +for _,spawntime in pairs(spawntimes) do + local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime() + if _time>0 then + SCHEDULER:New(nil, AV8B1.Spawn, {AV8B1}, _time) + SCHEDULER:New(nil, AV8B2.Spawn, {AV8B2}, _time) + end +end diff --git a/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz b/Ops/Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz similarity index 100% rename from OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz rename to Ops/Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz diff --git a/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua b/Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua similarity index 100% rename from OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua rename to Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua diff --git a/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua b/Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua similarity index 96% rename from OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua rename to Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua index ac13e56cbe..da3faacacd 100644 --- a/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - FA-18C Fortress Cherbourg.lua +++ b/Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua @@ -1,83 +1,83 @@ -------------------------- --- AIRBOSS Test Script -- -------------------------- - --- Set mission menu. -AIRBOSS.MenuF10Root=MENU_MISSION:New("Airboss").MenuPath - --- No MOOSE settings menu. -_SETTINGS:SetPlayerMenuOff() - --- S-3B Recovery Tanker spawning in air. -local tanker=RECOVERYTANKER:New("CVN-74", "- Texaco Tanker") -tanker:SetTakeoffAir() -tanker:SetRadio(256) -tanker:SetModex(511) -tanker:SetTACAN(1, "TKR") -tanker:Start() - --- E-2D AWACS spawning in air -local awacs=RECOVERYTANKER:New("CVN-74", "AWACS") -awacs:SetAWACS() -awacs:SetTakeoffAir() -awacs:SetRadio(264) -awacs:SetAltitude(20000) -awacs:SetCallsign(CALLSIGN.AWACS.Overloard) -awacs:SetRacetrackDistances(20, 8) -awacs:SetModex(611) -awacs:SetTACAN(2, "OLV") -awacs:Start() - --- Rescue Helo spawned in air with home base USS Perry. Has to be a global object! -rescuehelo=RESCUEHELO:New("CVN-74", "CV Helo") -rescuehelo:SetHomeBase(AIRBASE:FindByName("CG-67")) -rescuehelo:SetTakeoffAir() -rescuehelo:SetModex(42) -rescuehelo:Start() - --- Create AIRBOSS object. -local AirbossStennis=AIRBOSS:New("CVN-74") - --- Add recovery windows: -local window1=AirbossStennis:AddRecoveryWindow("18:30", "21:00", 1, nil, true, 20) - --- Radio freqs. -AirbossStennis:SetMarshalRadio(305) -AirbossStennis:SetLSORadio(265) - --- Radio relay units. -AirbossStennis:SetRadioRelayLSO(rescuehelo:GetUnitName()) -AirbossStennis:SetRadioRelayMarshal(tanker:GetUnitName()) - --- Set folder of airboss sound files within miz file. -AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/") - --- Single carrier menu optimization. -AirbossStennis:SetMenuSingleCarrier() - --- Enable skipper menu. -AirbossStennis:SetMenuRecovery(15, 30, true) - --- AI groups explicitly excluded from handling by the Airboss -AirbossStennis:SetHandleAIOFF() - --- Remove landed AI planes from flight deck. -AirbossStennis:SetDespawnOnEngineShutdown() - --- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). -AirbossStennis:Load() - --- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. -AirbossStennis:SetAutoSave() - --- Enable trap sheet. -AirbossStennis:SetTrapSheet() - --- Set recovery tanker -AirbossStennis:SetRecoveryTanker(tanker) - --- Set AWACS. -AirbossStennis:SetAWACS(awacs) - --- Start airboss class. -AirbossStennis:Start() +------------------------- +-- AIRBOSS Test Script -- +------------------------- + +-- Set mission menu. +AIRBOSS.MenuF10Root=MENU_MISSION:New("Airboss").MenuPath + +-- No MOOSE settings menu. +_SETTINGS:SetPlayerMenuOff() + +-- S-3B Recovery Tanker spawning in air. +local tanker=RECOVERYTANKER:New("CVN-74", "- Texaco Tanker") +tanker:SetTakeoffAir() +tanker:SetRadio(256) +tanker:SetModex(511) +tanker:SetTACAN(1, "TKR") +tanker:Start() + +-- E-2D AWACS spawning in air +local awacs=RECOVERYTANKER:New("CVN-74", "AWACS") +awacs:SetAWACS() +awacs:SetTakeoffAir() +awacs:SetRadio(264) +awacs:SetAltitude(20000) +awacs:SetCallsign(CALLSIGN.AWACS.Overloard) +awacs:SetRacetrackDistances(20, 8) +awacs:SetModex(611) +awacs:SetTACAN(2, "OLV") +awacs:Start() + +-- Rescue Helo spawned in air with home base USS Perry. Has to be a global object! +rescuehelo=RESCUEHELO:New("CVN-74", "CV Helo") +rescuehelo:SetHomeBase(AIRBASE:FindByName("CG-67")) +rescuehelo:SetTakeoffAir() +rescuehelo:SetModex(42) +rescuehelo:Start() + +-- Create AIRBOSS object. +local AirbossStennis=AIRBOSS:New("CVN-74") + +-- Add recovery windows: +local window1=AirbossStennis:AddRecoveryWindow("18:30", "21:00", 1, nil, true, 20) + +-- Radio freqs. +AirbossStennis:SetMarshalRadio(305) +AirbossStennis:SetLSORadio(265) + +-- Radio relay units. +AirbossStennis:SetRadioRelayLSO(rescuehelo:GetUnitName()) +AirbossStennis:SetRadioRelayMarshal(tanker:GetUnitName()) + +-- Set folder of airboss sound files within miz file. +AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/") + +-- Single carrier menu optimization. +AirbossStennis:SetMenuSingleCarrier() + +-- Enable skipper menu. +AirbossStennis:SetMenuRecovery(15, 30, true) + +-- AI groups explicitly excluded from handling by the Airboss +AirbossStennis:SetHandleAIOFF() + +-- Remove landed AI planes from flight deck. +AirbossStennis:SetDespawnOnEngineShutdown() + +-- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). +AirbossStennis:Load() + +-- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. +AirbossStennis:SetAutoSave() + +-- Enable trap sheet. +AirbossStennis:SetTrapSheet() + +-- Set recovery tanker +AirbossStennis:SetRecoveryTanker(tanker) + +-- Set AWACS. +AirbossStennis:SetAWACS(awacs) + +-- Start airboss class. +AirbossStennis:Start() diff --git a/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz b/Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz similarity index 100% rename from OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz rename to Ops/Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz diff --git a/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua b/Ops/RecoveryTanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua similarity index 97% rename from OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua rename to Ops/RecoveryTanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua index 457e68695c..1c57bd1432 100644 --- a/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua +++ b/Ops/RecoveryTanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua @@ -1,16 +1,16 @@ ---- --- RECOVERYTANKER: Simple --- --- Simple Recovery tanker script using default settings. --- --- Tanker will be spawned on the USS Stennis and go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). --- --- Radio frequencies, callsign are taken from the settings of the late activated template group in the mission editor. ---- - --- S-3B at USS Stennis spawning on deck. First Parameter is the UNIT name of the Carrier, second the GROUP name of the tanker template. -local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") - --- Start recovery tanker. --- NOTE: If you spawn on deck, it seems prudent to delay the spawn a bit after the mission starts. -tankerStennis:__Start(1) +--- +-- RECOVERYTANKER: Simple +-- +-- Simple Recovery tanker script using default settings. +-- +-- Tanker will be spawned on the USS Stennis and go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). +-- +-- Radio frequencies, callsign are taken from the settings of the late activated template group in the mission editor. +--- + +-- S-3B at USS Stennis spawning on deck. First Parameter is the UNIT name of the Carrier, second the GROUP name of the tanker template. +local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") + +-- Start recovery tanker. +-- NOTE: If you spawn on deck, it seems prudent to delay the spawn a bit after the mission starts. +tankerStennis:__Start(1) diff --git a/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz b/Ops/RecoveryTanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz similarity index 100% rename from OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz rename to Ops/RecoveryTanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz diff --git a/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua b/Ops/RecoveryTanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua similarity index 97% rename from OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua rename to Ops/RecoveryTanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua index 954b984ffb..7c1bcf6bc4 100644 --- a/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua +++ b/Ops/RecoveryTanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua @@ -1,22 +1,22 @@ ---- --- RECOVERYTANKER: Custom --- --- Simple Recovery tanker script using some customized settings. --- --- Tanker will be spawned on the USS Stennis and go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). --- --- Radio frequencies, callsign are set below and overrule the settings of the late activated template group. ---- - --- S-3B at USS Stennis spawning on deck. -local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") - --- Custom settings for radio frequency, TACAN, callsign and modex. -tankerStennis:SetRadio(261) -tankerStennis:SetTACAN(37, "SHL") -tankerStennis:SetCallsign(CALLSIGN.Tanker.Arco, 3) -tankerStennis:SetModex(0) -- "Triple nuts" - --- Start recovery tanker. --- NOTE: If you spawn on deck, it seems prudent to delay the spawn a bit after the mission starts. -tankerStennis:__Start(1) +--- +-- RECOVERYTANKER: Custom +-- +-- Simple Recovery tanker script using some customized settings. +-- +-- Tanker will be spawned on the USS Stennis and go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). +-- +-- Radio frequencies, callsign are set below and overrule the settings of the late activated template group. +--- + +-- S-3B at USS Stennis spawning on deck. +local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") + +-- Custom settings for radio frequency, TACAN, callsign and modex. +tankerStennis:SetRadio(261) +tankerStennis:SetTACAN(37, "SHL") +tankerStennis:SetCallsign(CALLSIGN.Tanker.Arco, 3) +tankerStennis:SetModex(0) -- "Triple nuts" + +-- Start recovery tanker. +-- NOTE: If you spawn on deck, it seems prudent to delay the spawn a bit after the mission starts. +tankerStennis:__Start(1) diff --git a/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz b/Ops/RecoveryTanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz similarity index 100% rename from OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz rename to Ops/RecoveryTanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz diff --git a/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua b/Wrapper/Group/GRP-100 - IsAlive/GRP-100 - IsAlive.lua similarity index 96% rename from GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua rename to Wrapper/Group/GRP-100 - IsAlive/GRP-100 - IsAlive.lua index 27e3a00b97..7f33d42f2d 100644 --- a/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua +++ b/Wrapper/Group/GRP-100 - IsAlive/GRP-100 - IsAlive.lua @@ -1,32 +1,32 @@ ---- --- Name: GRP-100 - IsAlive --- Author: FlightControl --- Date Created: 23 Feb 2017 --- --- # Situation: --- --- This test is about checking if IsAlive on GROUP level is working correctly. --- Two ground forces GROUPS are shooting each other. --- Check the IsAlive status in the logging of the survivor and the defeat. --- --- # Test cases: --- --- 1. Observe the IsAlive statuses in the dcs.log file. - - - ---Create Spawn Groups -local GroupBlue = GROUP:FindByName( "Blue" ) -local GroupRed = GROUP:FindByName( "Red" ) - -local Schedule, ScheduleID = SCHEDULER:New( nil, - --- Variable Declarations - -- @param Wrapper.Group#GROUP GroupBlue - -- @param Wrapper.Group#GROUP GroupRed - function( GroupBlue, GroupRed ) - local IsAliveBlue = GroupBlue:IsAlive() - local IsAliveRed = GroupRed:IsAlive() - BASE:E( { IsAliveBlue = IsAliveBlue, IsAliveRed = IsAliveRed } ) - end, { GroupBlue, GroupRed }, 1, 1 -) - +--- +-- Name: GRP-100 - IsAlive +-- Author: FlightControl +-- Date Created: 23 Feb 2017 +-- +-- # Situation: +-- +-- This test is about checking if IsAlive on GROUP level is working correctly. +-- Two ground forces GROUPS are shooting each other. +-- Check the IsAlive status in the logging of the survivor and the defeat. +-- +-- # Test cases: +-- +-- 1. Observe the IsAlive statuses in the dcs.log file. + + + +--Create Spawn Groups +local GroupBlue = GROUP:FindByName( "Blue" ) +local GroupRed = GROUP:FindByName( "Red" ) + +local Schedule, ScheduleID = SCHEDULER:New( nil, + --- Variable Declarations + -- @param Wrapper.Group#GROUP GroupBlue + -- @param Wrapper.Group#GROUP GroupRed + function( GroupBlue, GroupRed ) + local IsAliveBlue = GroupBlue:IsAlive() + local IsAliveRed = GroupRed:IsAlive() + BASE:E( { IsAliveBlue = IsAliveBlue, IsAliveRed = IsAliveRed } ) + end, { GroupBlue, GroupRed }, 1, 1 +) + diff --git a/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz b/Wrapper/Group/GRP-100 - IsAlive/GRP-100 - IsAlive.miz similarity index 100% rename from GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz rename to Wrapper/Group/GRP-100 - IsAlive/GRP-100 - IsAlive.miz diff --git a/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua b/Wrapper/Group/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua similarity index 95% rename from GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua rename to Wrapper/Group/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua index efd8040ab7..1a96f44e74 100644 --- a/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua +++ b/Wrapper/Group/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua @@ -1,30 +1,30 @@ ---- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. - -local HeliGroup = GROUP:FindByName( "Helicopter" ) - -local AttackGroup = GROUP:FindByName( "AttackGroup" ) - -local AttackUnits = AttackGroup:GetUnits() - -local Tasks = {} - -for i = 1, #AttackUnits do - - local AttackUnit = AttackGroup:GetUnit( i ) - Tasks[#Tasks+1] = HeliGroup:TaskAttackUnit( AttackUnit ) -end - -Tasks[#Tasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) - ---- @param Wrapper.Group#GROUP HeliGroup -function _Resume( HeliGroup ) - env.info( '_Resume' ) - - HeliGroup:MessageToAll( "Resuming",10,"Info") -end - -HeliGroup:PushTask( - HeliGroup:TaskCombo( - Tasks - ), 30 +--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. + +local HeliGroup = GROUP:FindByName( "Helicopter" ) + +local AttackGroup = GROUP:FindByName( "AttackGroup" ) + +local AttackUnits = AttackGroup:GetUnits() + +local Tasks = {} + +for i = 1, #AttackUnits do + + local AttackUnit = AttackGroup:GetUnit( i ) + Tasks[#Tasks+1] = HeliGroup:TaskAttackUnit( AttackUnit ) +end + +Tasks[#Tasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) + +--- @param Wrapper.Group#GROUP HeliGroup +function _Resume( HeliGroup ) + env.info( '_Resume' ) + + HeliGroup:MessageToAll( "Resuming",10,"Info") +end + +HeliGroup:PushTask( + HeliGroup:TaskCombo( + Tasks + ), 30 ) \ No newline at end of file diff --git a/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz b/Wrapper/Group/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz similarity index 100% rename from GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz rename to Wrapper/Group/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz diff --git a/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua b/Wrapper/Group/GRP-200 - Follow Group/GRP-200 - Follow Group.lua similarity index 97% rename from GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua rename to Wrapper/Group/GRP-200 - Follow Group/GRP-200 - Follow Group.lua index 3c414f54a6..176f507c99 100644 --- a/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua +++ b/Wrapper/Group/GRP-200 - Follow Group/GRP-200 - Follow Group.lua @@ -1,24 +1,24 @@ - ---Create Spawn Groups -local SpawnPlane1 = SPAWN:New("Plane 1") -local SpawnPlane2 = SPAWN:New("Plane 2") - ---Spawn Groups into world -local GroupPlane1 = SpawnPlane1:Spawn() ---local GroupPlane1 = GROUP:FindByName( "Plane 1" ) -local GroupPlane2 = SpawnPlane2:Spawn() ---local GroupPlane2 = GROUP:FindByName( "Plane 2" ) - ---Create Task for plane2 (follow groupPlane1 at Vec3 offset) (Note: I think I need to be using controllers here) ---i.e. cntrlPlane1 = groupPlane1.getController(groupPlane1) - -local PointVec3 = POINT_VEC3:New( 100, 0, -100 ) -- This is a Vec3 class. - -local FollowDCSTask = GroupPlane2:TaskFollow( GroupPlane1, PointVec3:GetVec3() ) - ---Activate Task (Either PushTask/SetTask?) --- PushTask will push a task on the execution queue of the group. --- SetTask will delete all tasks from the current group queue, and executes this task. - -GroupPlane2:SetTask( FollowDCSTask, 1 ) - + +--Create Spawn Groups +local SpawnPlane1 = SPAWN:New("Plane 1") +local SpawnPlane2 = SPAWN:New("Plane 2") + +--Spawn Groups into world +local GroupPlane1 = SpawnPlane1:Spawn() +--local GroupPlane1 = GROUP:FindByName( "Plane 1" ) +local GroupPlane2 = SpawnPlane2:Spawn() +--local GroupPlane2 = GROUP:FindByName( "Plane 2" ) + +--Create Task for plane2 (follow groupPlane1 at Vec3 offset) (Note: I think I need to be using controllers here) +--i.e. cntrlPlane1 = groupPlane1.getController(groupPlane1) + +local PointVec3 = POINT_VEC3:New( 100, 0, -100 ) -- This is a Vec3 class. + +local FollowDCSTask = GroupPlane2:TaskFollow( GroupPlane1, PointVec3:GetVec3() ) + +--Activate Task (Either PushTask/SetTask?) +-- PushTask will push a task on the execution queue of the group. +-- SetTask will delete all tasks from the current group queue, and executes this task. + +GroupPlane2:SetTask( FollowDCSTask, 1 ) + diff --git a/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz b/Wrapper/Group/GRP-200 - Follow Group/GRP-200 - Follow Group.miz similarity index 100% rename from GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz rename to Wrapper/Group/GRP-200 - Follow Group/GRP-200 - Follow Group.miz diff --git a/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua b/Wrapper/Group/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua similarity index 97% rename from GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua rename to Wrapper/Group/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua index 8355b95e10..03258b2cfb 100644 --- a/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua +++ b/Wrapper/Group/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua @@ -1,12 +1,12 @@ ---- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. - -HeliGroup = GROUP:FindByName( "Helicopter" ) - ---- Route the helicopter back to the FARP after 60 seconds. --- We use the SCHEDULER class to do this. -SCHEDULER:New( nil, - function( HeliGroup ) - local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 ) - HeliGroup:SetCommand( CommandRTB ) - end, { HeliGroup }, 90 -) +--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. + +HeliGroup = GROUP:FindByName( "Helicopter" ) + +--- Route the helicopter back to the FARP after 60 seconds. +-- We use the SCHEDULER class to do this. +SCHEDULER:New( nil, + function( HeliGroup ) + local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 ) + HeliGroup:SetCommand( CommandRTB ) + end, { HeliGroup }, 90 +) diff --git a/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz b/Wrapper/Group/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz similarity index 100% rename from GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz rename to Wrapper/Group/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz diff --git a/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua b/Wrapper/Group/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua similarity index 95% rename from GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua rename to Wrapper/Group/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua index 47012d3de2..1f7710d18c 100644 --- a/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua +++ b/Wrapper/Group/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua @@ -1,39 +1,39 @@ ---- --- Name: GRP-310 - Command StopRoute --- Author: FlightControl --- Date Created: 25 Mar 2017 --- --- # Situation: --- A ground unit is moving. --- Using the command CommandStopMove it will stop moving after 10 seconds. --- --- # Test cases: --- --- 1. Observe the ground group stopping to move. --- - ---- @param Wrapper.Group#GROUP GroundGroup -function StopMove( GroundGroup ) - - BASE:E("Stop") - local Command = GroundGroup:CommandStopRoute( true ) - GroundGroup:SetCommand(Command) - -end - ---- @param Wrapper.Group#GROUP GroundGroup -function StartMove( GroundGroup ) - - BASE:E("Start") - local Command = GroundGroup:CommandStopRoute( false ) - GroundGroup:SetCommand(Command) - -end - -GroundGroup = GROUP:FindByName( "Ground" ) - -Scheduler = SCHEDULER:New( nil ) -ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 ) -ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 ) - - +--- +-- Name: GRP-310 - Command StopRoute +-- Author: FlightControl +-- Date Created: 25 Mar 2017 +-- +-- # Situation: +-- A ground unit is moving. +-- Using the command CommandStopMove it will stop moving after 10 seconds. +-- +-- # Test cases: +-- +-- 1. Observe the ground group stopping to move. +-- + +--- @param Wrapper.Group#GROUP GroundGroup +function StopMove( GroundGroup ) + + BASE:E("Stop") + local Command = GroundGroup:CommandStopRoute( true ) + GroundGroup:SetCommand(Command) + +end + +--- @param Wrapper.Group#GROUP GroundGroup +function StartMove( GroundGroup ) + + BASE:E("Start") + local Command = GroundGroup:CommandStopRoute( false ) + GroundGroup:SetCommand(Command) + +end + +GroundGroup = GROUP:FindByName( "Ground" ) + +Scheduler = SCHEDULER:New( nil ) +ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 ) +ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 ) + + diff --git a/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz b/Wrapper/Group/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz similarity index 100% rename from GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz rename to Wrapper/Group/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz diff --git a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua b/Wrapper/Group/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua similarity index 96% rename from GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua rename to Wrapper/Group/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua index 879bf9cd33..47ff792f44 100644 --- a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua +++ b/Wrapper/Group/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua @@ -1,45 +1,45 @@ ---- --- Name: GRP-400 - RouteReturnToAirbase --- Author: FlightControl --- Date Created: 25 Mar 2017 --- --- # Situation: --- Three air units are flying and are commanded to return a specific airbase. --- --- # Test cases: --- --- 1. Observe the Air1 group return to Batumi after 10 seconds. --- 2. Observe the Air2 group returning to Kobuleti after 300 seconds. (It was planned to land at Kutaisi). --- 3. Observe the Air3 group returning to the home (landing) airbase after 300 seconds. (It was planned to land at Kutaisi). --- - ---- @param Wrapper.Group#GROUP AirGroup -function ReturnToBatumi( AirGroup ) - BASE:E("ReturnToBatumi") - AirGroup:RouteRTB( AIRBASE:FindByName("Batumi") ) -end - ---- @param Wrapper.Group#GROUP AirGroup -function ReturnToKobuleti( AirGroup ) - BASE:E("ReturnToKobuleti") - AirGroup:RouteRTB( AIRBASE:FindByName("Kobuleti") ) -end - ---- @param Wrapper.Group#GROUP AirGroup -function ReturnToHome( AirGroup ) - BASE:E("ReturnToHome") - AirGroup:RouteRTB() -end - -Air1Group = GROUP:FindByName( "Air1" ) -Air2Group = GROUP:FindByName( "Air2" ) -Air3Group = GROUP:FindByName( "Air3" ) - -Scheduler = SCHEDULER:New( nil ) -ScheduleIDAir1 = Scheduler:Schedule(nil, ReturnToBatumi, { Air1Group }, 10 ) -ScheduleIDAir2 = Scheduler:Schedule(nil, ReturnToKobuleti, { Air2Group }, 300 ) -ScheduleIDAir3 = Scheduler:Schedule(nil, ReturnToHome, { Air3Group }, 300 ) - - - - +--- +-- Name: GRP-400 - RouteReturnToAirbase +-- Author: FlightControl +-- Date Created: 25 Mar 2017 +-- +-- # Situation: +-- Three air units are flying and are commanded to return a specific airbase. +-- +-- # Test cases: +-- +-- 1. Observe the Air1 group return to Batumi after 10 seconds. +-- 2. Observe the Air2 group returning to Kobuleti after 300 seconds. (It was planned to land at Kutaisi). +-- 3. Observe the Air3 group returning to the home (landing) airbase after 300 seconds. (It was planned to land at Kutaisi). +-- + +--- @param Wrapper.Group#GROUP AirGroup +function ReturnToBatumi( AirGroup ) + BASE:E("ReturnToBatumi") + AirGroup:RouteRTB( AIRBASE:FindByName("Batumi") ) +end + +--- @param Wrapper.Group#GROUP AirGroup +function ReturnToKobuleti( AirGroup ) + BASE:E("ReturnToKobuleti") + AirGroup:RouteRTB( AIRBASE:FindByName("Kobuleti") ) +end + +--- @param Wrapper.Group#GROUP AirGroup +function ReturnToHome( AirGroup ) + BASE:E("ReturnToHome") + AirGroup:RouteRTB() +end + +Air1Group = GROUP:FindByName( "Air1" ) +Air2Group = GROUP:FindByName( "Air2" ) +Air3Group = GROUP:FindByName( "Air3" ) + +Scheduler = SCHEDULER:New( nil ) +ScheduleIDAir1 = Scheduler:Schedule(nil, ReturnToBatumi, { Air1Group }, 10 ) +ScheduleIDAir2 = Scheduler:Schedule(nil, ReturnToKobuleti, { Air2Group }, 300 ) +ScheduleIDAir3 = Scheduler:Schedule(nil, ReturnToHome, { Air3Group }, 300 ) + + + + diff --git a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz b/Wrapper/Group/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz similarity index 100% rename from GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz rename to Wrapper/Group/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz diff --git a/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua b/Wrapper/Group/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua similarity index 97% rename from GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua rename to Wrapper/Group/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua index 6de4df765b..b8948304bb 100644 --- a/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua +++ b/Wrapper/Group/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua @@ -1,21 +1,21 @@ --- This routes a GroundGroup 1km further with an angle of 180 degrees. - -local GroundGroup = GROUP:FindByName( "Vehicle" ) - --- Get the current coordinate of GroundGroup -FromCoord = GroundGroup:GetCoordinate() - --- From the current coordinate, calculate 1km away with an angle of 180 degrees. -ToCoord = FromCoord:Translate( 1000, 180 ) - -RoutePoints = {} - --- Create a "grount route point", which is a "point" structure that can be given as a parameter to a Task -RoutePoints[#RoutePoints+1] = FromCoord:RoutePointGround( 0 ) -RoutePoints[#RoutePoints+1] = ToCoord:RoutePointGround( 60, "Cone" ) - --- Create a combo task, that creates a route task to the RoutePoint -RouteTask = GroundGroup:TaskRoute( RoutePoints ) - --- Set the task to be executed by the GroundGroup +-- This routes a GroundGroup 1km further with an angle of 180 degrees. + +local GroundGroup = GROUP:FindByName( "Vehicle" ) + +-- Get the current coordinate of GroundGroup +FromCoord = GroundGroup:GetCoordinate() + +-- From the current coordinate, calculate 1km away with an angle of 180 degrees. +ToCoord = FromCoord:Translate( 1000, 180 ) + +RoutePoints = {} + +-- Create a "grount route point", which is a "point" structure that can be given as a parameter to a Task +RoutePoints[#RoutePoints+1] = FromCoord:RoutePointGround( 0 ) +RoutePoints[#RoutePoints+1] = ToCoord:RoutePointGround( 60, "Cone" ) + +-- Create a combo task, that creates a route task to the RoutePoint +RouteTask = GroundGroup:TaskRoute( RoutePoints ) + +-- Set the task to be executed by the GroundGroup GroundGroup:SetTask( RouteTask, 1 ) \ No newline at end of file diff --git a/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz b/Wrapper/Group/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz similarity index 100% rename from GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz rename to Wrapper/Group/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz diff --git a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua b/Wrapper/Group/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua similarity index 97% rename from GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua rename to Wrapper/Group/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua index 44530328be..3c27fa34c7 100644 --- a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua +++ b/Wrapper/Group/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua @@ -1,16 +1,16 @@ --- This routes a GroundGroup 1km further with an angle of 180 degrees. - -local GroundGroup = GROUP:FindByName( "Vehicle" ) - --- Get the current coordinate of GroundGroup -FromCoord = GroundGroup:GetCoordinate() - --- From the current coordinate, calculate 1km away with an angle of 180 degrees. -ToCoord = FromCoord:Translate( 1000, 180 ) - - --- Create a combo task, that creates a route task to the RoutePoint -RouteTask = GroundGroup:TaskRouteToVec2( ToCoord:GetVec2() ) - --- Set the task to be executed by the GroundGroup +-- This routes a GroundGroup 1km further with an angle of 180 degrees. + +local GroundGroup = GROUP:FindByName( "Vehicle" ) + +-- Get the current coordinate of GroundGroup +FromCoord = GroundGroup:GetCoordinate() + +-- From the current coordinate, calculate 1km away with an angle of 180 degrees. +ToCoord = FromCoord:Translate( 1000, 180 ) + + +-- Create a combo task, that creates a route task to the RoutePoint +RouteTask = GroundGroup:TaskRouteToVec2( ToCoord:GetVec2() ) + +-- Set the task to be executed by the GroundGroup GroundGroup:SetTask( RouteTask, 1 ) \ No newline at end of file diff --git a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz b/Wrapper/Group/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz similarity index 100% rename from GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz rename to Wrapper/Group/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz diff --git a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua b/Wrapper/Group/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua similarity index 97% rename from GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua rename to Wrapper/Group/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua index 51979c7f34..2718cafa9f 100644 --- a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua +++ b/Wrapper/Group/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua @@ -1,46 +1,46 @@ ---- This makes a vehicle fly to random zones when a waypoint has been reached. --- Name: GRP - Group Commands/GRP-502 - Route at waypoint to random point --- Author: FlightControl --- Date Created: 08 Aug 2017 - - -local ZoneList = { - ZONE:New( "ZONE1" ), - ZONE:New( "ZONE2" ), - ZONE:New( "ZONE3" ), - ZONE:New( "ZONE4" ), - ZONE:New( "ZONE5" ) -} - -GroundGroup = GROUP:FindByName( "Vehicle" ) - ---- @param Wrapper.Group#GROUP GroundGroup -function RouteToZone( Vehicle, ZoneRoute ) - - local Route = {} - - Vehicle:E( { ZoneRoute = ZoneRoute } ) - - Vehicle:MessageToAll( "Moving to zone " .. ZoneRoute:GetName(), 10 ) - - -- Get the current coordinate of the Vehicle - local FromCoord = Vehicle:GetCoordinate() - - -- Select a random Zone and get the Coordinate of the new Zone. - local RandomZone = ZoneList[ math.random( 1, #ZoneList ) ] -- Core.Zone#ZONE - local ToCoord = RandomZone:GetCoordinate() - - -- Create a "ground route point", which is a "point" structure that can be given as a parameter to a Task - Route[#Route+1] = FromCoord:RoutePointGround( 72 ) - Route[#Route+1] = ToCoord:RoutePointGround( 60, "Vee" ) - - local TaskRouteToZone = Vehicle:TaskFunction( "RouteToZone", RandomZone ) - - Vehicle:SetTaskAtWaypoint( Route, #Route, TaskRouteToZone ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone. - - Vehicle:Route( Route, math.random( 10, 20 ) ) -- Move after a random seconds to the Route. See the Route method for details. - -end - -RouteToZone( GroundGroup, ZoneList[1] ) - +--- This makes a vehicle fly to random zones when a waypoint has been reached. +-- Name: GRP - Group Commands/GRP-502 - Route at waypoint to random point +-- Author: FlightControl +-- Date Created: 08 Aug 2017 + + +local ZoneList = { + ZONE:New( "ZONE1" ), + ZONE:New( "ZONE2" ), + ZONE:New( "ZONE3" ), + ZONE:New( "ZONE4" ), + ZONE:New( "ZONE5" ) +} + +GroundGroup = GROUP:FindByName( "Vehicle" ) + +--- @param Wrapper.Group#GROUP GroundGroup +function RouteToZone( Vehicle, ZoneRoute ) + + local Route = {} + + Vehicle:E( { ZoneRoute = ZoneRoute } ) + + Vehicle:MessageToAll( "Moving to zone " .. ZoneRoute:GetName(), 10 ) + + -- Get the current coordinate of the Vehicle + local FromCoord = Vehicle:GetCoordinate() + + -- Select a random Zone and get the Coordinate of the new Zone. + local RandomZone = ZoneList[ math.random( 1, #ZoneList ) ] -- Core.Zone#ZONE + local ToCoord = RandomZone:GetCoordinate() + + -- Create a "ground route point", which is a "point" structure that can be given as a parameter to a Task + Route[#Route+1] = FromCoord:RoutePointGround( 72 ) + Route[#Route+1] = ToCoord:RoutePointGround( 60, "Vee" ) + + local TaskRouteToZone = Vehicle:TaskFunction( "RouteToZone", RandomZone ) + + Vehicle:SetTaskAtWaypoint( Route, #Route, TaskRouteToZone ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone. + + Vehicle:Route( Route, math.random( 10, 20 ) ) -- Move after a random seconds to the Route. See the Route method for details. + +end + +RouteToZone( GroundGroup, ZoneList[1] ) + diff --git a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz b/Wrapper/Group/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz similarity index 100% rename from GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz rename to Wrapper/Group/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz diff --git a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua b/Wrapper/Group/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua similarity index 95% rename from GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua rename to Wrapper/Group/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua index 330e3fbc26..021dc73518 100644 --- a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua +++ b/Wrapper/Group/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua @@ -1,45 +1,45 @@ ---- This makes a vehicle drive to random zones when a waypoint has been reached. --- Name: GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point --- Author: FlightControl --- Date Created: 08 Aug 2017 - - -local ZoneList = { - ZONE:New( "ZONE1" ), - ZONE:New( "ZONE2" ), - ZONE:New( "ZONE3" ), - ZONE:New( "ZONE4" ), - ZONE:New( "ZONE5" ), -} - -VehicleGroup = GROUP:FindByName( "Vehicle #001" ) - ---- @param Wrapper.Group#GROUP RoutedGroup -function ReRoute( VehicleGroup ) - - VehicleGroup:E( "Routing" ) - - local ZoneNumber = math.random( 1, #ZoneList ) - VehicleGroup:E( ZoneNumber ) - - local FromCoord = VehicleGroup:GetCoordinate() -- Core.Point#COORDINATE - local FromWP = FromCoord:WaypointGround() - - local ZoneTo = ZoneList[ ZoneNumber ] -- Core.Zone#ZONE - local ToCoord = ZoneTo:GetCoordinate() - local ToWP = ToCoord:WaypointGround( 72, "Vee" ) - - local TaskReRoute = VehicleGroup:TaskFunction( "ReRoute" ) - VehicleGroup:SetTaskWaypoint( ToWP, TaskReRoute ) - - VehicleGroup:Route( { FromWP, ToWP }, 1 ) - -end - -ReRoute( VehicleGroup ) - - - - - - +--- This makes a vehicle drive to random zones when a waypoint has been reached. +-- Name: GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point +-- Author: FlightControl +-- Date Created: 08 Aug 2017 + + +local ZoneList = { + ZONE:New( "ZONE1" ), + ZONE:New( "ZONE2" ), + ZONE:New( "ZONE3" ), + ZONE:New( "ZONE4" ), + ZONE:New( "ZONE5" ), +} + +VehicleGroup = GROUP:FindByName( "Vehicle #001" ) + +--- @param Wrapper.Group#GROUP RoutedGroup +function ReRoute( VehicleGroup ) + + VehicleGroup:E( "Routing" ) + + local ZoneNumber = math.random( 1, #ZoneList ) + VehicleGroup:E( ZoneNumber ) + + local FromCoord = VehicleGroup:GetCoordinate() -- Core.Point#COORDINATE + local FromWP = FromCoord:WaypointGround() + + local ZoneTo = ZoneList[ ZoneNumber ] -- Core.Zone#ZONE + local ToCoord = ZoneTo:GetCoordinate() + local ToWP = ToCoord:WaypointGround( 72, "Vee" ) + + local TaskReRoute = VehicleGroup:TaskFunction( "ReRoute" ) + VehicleGroup:SetTaskWaypoint( ToWP, TaskReRoute ) + + VehicleGroup:Route( { FromWP, ToWP }, 1 ) + +end + +ReRoute( VehicleGroup ) + + + + + + diff --git a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz b/Wrapper/Group/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz similarity index 100% rename from GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz rename to Wrapper/Group/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz diff --git a/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua b/Wrapper/Group/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua similarity index 96% rename from GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua rename to Wrapper/Group/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua index 685a5826d5..909d0f11c8 100644 --- a/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua +++ b/Wrapper/Group/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua @@ -1,17 +1,17 @@ ---- This makes a vehicle drive its route in a repetitive way. --- Name: GRP-550 - Patrol a route --- Author: FlightControl --- Date Created: 24 Sep 2017 - - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Patrol the route of the Vehicle. -Vehicle:PatrolRoute() - --- Find the Ship and create a GROUP object. -Ship = GROUP:FindByName( "Ship" ) - --- Patrol the route of the Ship. -Ship:PatrolRoute() +--- This makes a vehicle drive its route in a repetitive way. +-- Name: GRP-550 - Patrol a route +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Patrol the route of the Vehicle. +Vehicle:PatrolRoute() + +-- Find the Ship and create a GROUP object. +Ship = GROUP:FindByName( "Ship" ) + +-- Patrol the route of the Ship. +Ship:PatrolRoute() diff --git a/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz b/Wrapper/Group/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz similarity index 100% rename from GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz rename to Wrapper/Group/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz diff --git a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua b/Wrapper/Group/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua similarity index 97% rename from GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua rename to Wrapper/Group/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua index 17949556e8..d934f1018f 100644 --- a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua +++ b/Wrapper/Group/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua @@ -1,17 +1,17 @@ ---- This makes a vehicle drive its route using the waypoints of the route and selecing random points on the route. --- Name: GRP-551 - Patrol to random points of a route --- Author: FlightControl --- Date Created: 24 Sep 2017 - - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Patrol to random points of the route at 120 km/h in "Vee" formation. -Vehicle:PatrolRouteRandom( 120, "Vee" ) - --- Find the Ship and create a GROUP object. -Ship = GROUP:FindByName( "Ship" ) - --- Patrol to random points of the route at 120 km/h in "Vee" formation. -Ship:PatrolRouteRandom( 120, "Vee" ) +--- This makes a vehicle drive its route using the waypoints of the route and selecing random points on the route. +-- Name: GRP-551 - Patrol to random points of a route +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Patrol to random points of the route at 120 km/h in "Vee" formation. +Vehicle:PatrolRouteRandom( 120, "Vee" ) + +-- Find the Ship and create a GROUP object. +Ship = GROUP:FindByName( "Ship" ) + +-- Patrol to random points of the route at 120 km/h in "Vee" formation. +Ship:PatrolRouteRandom( 120, "Vee" ) diff --git a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz b/Wrapper/Group/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz similarity index 100% rename from GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz rename to Wrapper/Group/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz diff --git a/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua b/Wrapper/Group/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua similarity index 97% rename from GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua rename to Wrapper/Group/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua index 926a790e9b..c3dbcc73d6 100644 --- a/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua +++ b/Wrapper/Group/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua @@ -1,16 +1,16 @@ ---- This makes a vehicle drive its route selecting random points in a zone. --- Name: GRP-552 - Patrol in a zone --- Author: FlightControl --- Date Created: 24 Sep 2017 - - -- Find the Vehicle and create a GROUP object. - Vehicle = GROUP:FindByName( "Vehicle" ) - - -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. - Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE" ) }, 120, "Vee" ) - - -- Find the Vehicle and create a GROUP object. - Ship = GROUP:FindByName( "Ship" ) - - -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. - Ship:PatrolZones( { ZONE:New( "ZONESHIP" ) }, 120, "Vee" ) +--- This makes a vehicle drive its route selecting random points in a zone. +-- Name: GRP-552 - Patrol in a zone +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + + -- Find the Vehicle and create a GROUP object. + Vehicle = GROUP:FindByName( "Vehicle" ) + + -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. + Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE" ) }, 120, "Vee" ) + + -- Find the Vehicle and create a GROUP object. + Ship = GROUP:FindByName( "Ship" ) + + -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. + Ship:PatrolZones( { ZONE:New( "ZONESHIP" ) }, 120, "Vee" ) diff --git a/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz b/Wrapper/Group/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz similarity index 100% rename from GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz rename to Wrapper/Group/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz diff --git a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua b/Wrapper/Group/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua similarity index 98% rename from GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua rename to Wrapper/Group/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua index d7f821d839..db2f18d112 100644 --- a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua +++ b/Wrapper/Group/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua @@ -1,16 +1,16 @@ ---- This makes a vehicle drive its route selecting random points in a zone. --- Name: GRP-553 - Patrol in a list of zones --- Author: FlightControl --- Date Created: 24 Sep 2017 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Patrol to random points in the trigger zones ZONEVEHICLE1, ZONEVEHICLE2, ZONEVEHICLE3, at 120 km/h in Vee format. -Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE1" ), ZONE:New( "ZONEVEHICLE2" ), ZONE:New( "ZONEVEHICLE3" ) }, 120, "Vee" ) - --- Find the Ship and create a GROUP object. -Ship = GROUP:FindByName( "Ship" ) - --- Patrol to random points in the trigger zones ZONESHIP1, ZONESHIP2, ZONESHIP3, at 120 km/h in Vee format. -Ship:PatrolZones( { ZONE:New( "ZONESHIP1" ), ZONE:New( "ZONESHIP2" ), ZONE:New( "ZONESHIP3" ) }, 120, "Vee" ) +--- This makes a vehicle drive its route selecting random points in a zone. +-- Name: GRP-553 - Patrol in a list of zones +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Patrol to random points in the trigger zones ZONEVEHICLE1, ZONEVEHICLE2, ZONEVEHICLE3, at 120 km/h in Vee format. +Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE1" ), ZONE:New( "ZONEVEHICLE2" ), ZONE:New( "ZONEVEHICLE3" ) }, 120, "Vee" ) + +-- Find the Ship and create a GROUP object. +Ship = GROUP:FindByName( "Ship" ) + +-- Patrol to random points in the trigger zones ZONESHIP1, ZONESHIP2, ZONESHIP3, at 120 km/h in Vee format. +Ship:PatrolZones( { ZONE:New( "ZONESHIP1" ), ZONE:New( "ZONESHIP2" ), ZONE:New( "ZONESHIP3" ) }, 120, "Vee" ) diff --git a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz b/Wrapper/Group/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz similarity index 100% rename from GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz rename to Wrapper/Group/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz diff --git a/GRP - Group Commands/GRP-600 - Respawn.miz b/Wrapper/Group/GRP-600 - Respawn.miz similarity index 100% rename from GRP - Group Commands/GRP-600 - Respawn.miz rename to Wrapper/Group/GRP-600 - Respawn.miz diff --git a/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua b/Wrapper/Group/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua similarity index 97% rename from GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua rename to Wrapper/Group/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua index e44d649a56..2fb61d50b1 100644 --- a/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua +++ b/Wrapper/Group/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua @@ -1,11 +1,11 @@ ---- This makes a vehicle respawn itself when the mission starts. --- The vehicle is hidden, so you need to observe from the watch tower! --- Name: GRP-601 - Respawn hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Respawn the vehicle. +--- This makes a vehicle respawn itself when the mission starts. +-- The vehicle is hidden, so you need to observe from the watch tower! +-- Name: GRP-601 - Respawn hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Respawn the vehicle. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz b/Wrapper/Group/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz similarity index 100% rename from GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz rename to Wrapper/Group/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz diff --git a/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua b/Wrapper/Group/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua similarity index 96% rename from GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua rename to Wrapper/Group/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua index 40b26485f2..b97128271c 100644 --- a/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua +++ b/Wrapper/Group/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua @@ -1,16 +1,16 @@ ---- This makes a vehicle respawn itself when the mission starts. --- Name: GRP-600 - Respawn --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. +--- This makes a vehicle respawn itself when the mission starts. +-- Name: GRP-600 - Respawn +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz b/Wrapper/Group/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz similarity index 100% rename from GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz rename to Wrapper/Group/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz diff --git a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua b/Wrapper/Group/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua similarity index 97% rename from GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua rename to Wrapper/Group/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua index 447a9fd440..e88b31fb7a 100644 --- a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua +++ b/Wrapper/Group/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua @@ -1,18 +1,18 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in relation to the original template position. --- --- Name: GRP-611 - Respawn multiple units in Zone --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in relation to the original template position. +-- +-- Name: GRP-611 - Respawn multiple units in Zone +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz b/Wrapper/Group/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz similarity index 100% rename from GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz rename to Wrapper/Group/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz diff --git a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua b/Wrapper/Group/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua similarity index 97% rename from GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua rename to Wrapper/Group/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua index acd0ef570a..9eacddea4d 100644 --- a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua +++ b/Wrapper/Group/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua @@ -1,19 +1,19 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in randomized within the new zone. --- --- Name: GRP-612 - Respawn multiple units in Zone randomized. --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) -Vehicle:InitRandomizePositionZone( true ) - --- Respawn the vehicle in RespawnZone1. +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in randomized within the new zone. +-- +-- Name: GRP-612 - Respawn multiple units in Zone randomized. +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) +Vehicle:InitRandomizePositionZone( true ) + +-- Respawn the vehicle in RespawnZone1. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz b/Wrapper/Group/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz similarity index 100% rename from GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz rename to Wrapper/Group/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz diff --git a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua b/Wrapper/Group/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua similarity index 97% rename from GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua rename to Wrapper/Group/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua index 1ea21c9e2e..15bd8837ea 100644 --- a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua +++ b/Wrapper/Group/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua @@ -1,17 +1,17 @@ ---- This makes a vehicle respawn within ZONEVEHICLE1. --- The vehicle is hidden, so you need to observe at the watch tower through external view. --- Name: GRP-615 - Respawn in Zone hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. +--- This makes a vehicle respawn within ZONEVEHICLE1. +-- The vehicle is hidden, so you need to observe at the watch tower through external view. +-- Name: GRP-615 - Respawn in Zone hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz b/Wrapper/Group/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz similarity index 100% rename from GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz rename to Wrapper/Group/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz diff --git a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua b/Wrapper/Group/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua similarity index 97% rename from GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua rename to Wrapper/Group/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua index af7d29b1d8..bc2268a4c6 100644 --- a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua +++ b/Wrapper/Group/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua @@ -1,19 +1,19 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in relation to the original template position. --- The vehicle is hidden, so you need to observe from the watch tower (external view). --- --- Name: GRP-616 - Respawn multiple units in Zone hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in relation to the original template position. +-- The vehicle is hidden, so you need to observe from the watch tower (external view). +-- +-- Name: GRP-616 - Respawn multiple units in Zone hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz b/Wrapper/Group/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz similarity index 100% rename from GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz rename to Wrapper/Group/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz diff --git a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua b/Wrapper/Group/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua similarity index 97% rename from GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua rename to Wrapper/Group/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua index 005a9c99f6..8df3b2487a 100644 --- a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua +++ b/Wrapper/Group/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua @@ -1,20 +1,20 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1 hidden. --- The vehicle group consists of multiple units and are spawned in randomized within the new zone. --- The vehicle is hidden, so you need to observe from the watch tower (external view). --- --- Name: GRP-617 - Respawn multiple units in Zone randomized hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) -Vehicle:InitRandomizePositionZone( true ) - --- Respawn the vehicle in RespawnZone1. +--- This makes a vehicle respawn itself within ZONEVEHICLE1 hidden. +-- The vehicle group consists of multiple units and are spawned in randomized within the new zone. +-- The vehicle is hidden, so you need to observe from the watch tower (external view). +-- +-- Name: GRP-617 - Respawn multiple units in Zone randomized hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) +Vehicle:InitRandomizePositionZone( true ) + +-- Respawn the vehicle in RespawnZone1. Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz b/Wrapper/Group/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz similarity index 100% rename from GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz rename to Wrapper/Group/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz diff --git a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua b/Wrapper/Group/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua similarity index 97% rename from GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua rename to Wrapper/Group/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua index a654277c0b..16fc27ddd4 100644 --- a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua +++ b/Wrapper/Group/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua @@ -1,29 +1,29 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in randomized within the new zone. --- When the last vehicle of the group is destroyed, the group will respawn. --- --- Name: GRP-620 - Respawn multiple units when destroyed --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) -Vehicle:InitRandomizePositionZone( true ) - -Vehicle:HandleEvent( EVENTS.Dead ) -function Vehicle:OnEventDead( EventData ) - - self:E( { "Size ", Size = Vehicle:GetSize() } ) - - -- When the last vehicle of the group is declared dead, respawn the group. - if Vehicle:GetSize() == 1 then - -- Respawn the vehicle in RespawnZone1. - Vehicle:Respawn() - end +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in randomized within the new zone. +-- When the last vehicle of the group is destroyed, the group will respawn. +-- +-- Name: GRP-620 - Respawn multiple units when destroyed +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) +Vehicle:InitRandomizePositionZone( true ) + +Vehicle:HandleEvent( EVENTS.Dead ) +function Vehicle:OnEventDead( EventData ) + + self:E( { "Size ", Size = Vehicle:GetSize() } ) + + -- When the last vehicle of the group is declared dead, respawn the group. + if Vehicle:GetSize() == 1 then + -- Respawn the vehicle in RespawnZone1. + Vehicle:Respawn() + end end \ No newline at end of file diff --git a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz b/Wrapper/Group/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz similarity index 100% rename from GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz rename to Wrapper/Group/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz diff --git a/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua b/Wrapper/Group/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua similarity index 96% rename from GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua rename to Wrapper/Group/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua index 6083e5218c..c5ae02e822 100644 --- a/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua +++ b/Wrapper/Group/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua @@ -1,27 +1,27 @@ ---- --- Name: GRP-900 - Option Green and Red State --- Author: FlightControl --- Date Created: 10 Dec 2017 --- --- This tests the option to set the alarm state of a group to RED or GREEN. --- Both options are tested with two groups. --- Please check the dcs.log in case of errors, and the time the group reacts to the approaching target. --- The Red State Group should react much faster than the Green State Group. --- --- Join the Game Master to observe the reaction of the ground units. --- --- Blue is attacking. --- Green is defending. --- - - -RedStateGroup = GROUP:FindByName( "Red State" ) -GreenStateGroup = GROUP:FindByName( "Green State" ) - - -RedStateGroup:OptionAlarmStateRed() -GreenStateGroup:OptionAlarmStateGreen() - - - - +--- +-- Name: GRP-900 - Option Green and Red State +-- Author: FlightControl +-- Date Created: 10 Dec 2017 +-- +-- This tests the option to set the alarm state of a group to RED or GREEN. +-- Both options are tested with two groups. +-- Please check the dcs.log in case of errors, and the time the group reacts to the approaching target. +-- The Red State Group should react much faster than the Green State Group. +-- +-- Join the Game Master to observe the reaction of the ground units. +-- +-- Blue is attacking. +-- Green is defending. +-- + + +RedStateGroup = GROUP:FindByName( "Red State" ) +GreenStateGroup = GROUP:FindByName( "Green State" ) + + +RedStateGroup:OptionAlarmStateRed() +GreenStateGroup:OptionAlarmStateGreen() + + + + diff --git a/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz b/Wrapper/Group/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz similarity index 100% rename from GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz rename to Wrapper/Group/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz diff --git a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua b/other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua similarity index 97% rename from DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua rename to other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua index 8f6a23c50f..1bdca35cba 100644 --- a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua +++ b/other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua @@ -1,568 +1,568 @@ ---- Gori Valley designed with the MOOSE framework for DCS World. --- Author: FlightControl - --- Define the headquarters. - -NATO_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ NATO Gori" ), "Gori" ) -CCCP_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ CCCP Tskinvali" ), "Tskinvali" ) - - --- Define the scoring object. - -Score = SCORING:New( "Gori Valley" ) - -Score:SetScaleDestroyScore( 40 ) -Score:SetScaleDestroyPenalty( 80 ) -Score:SetFratricide( 80 ) -Score:SetMessagesHit( false ) - - ---- Cargo Dispatching - -do - - local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() - local SetHelicopter = SET_GROUP:New():FilterPrefixes( "US CH-47D@RAMP Troop Deployment" ):FilterStart() - local SetDeployZones = SET_ZONE:New():FilterPrefixes( "US Troops Landing Zone" ):FilterStart() - - NATO_AI_Cargo_Dispatcher_Helicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetDeployZones ) - NATO_AI_Cargo_Dispatcher_Helicopter:SetPickupRadius( 50, 25 ) - NATO_AI_Cargo_Dispatcher_Helicopter:SetDeployRadius( 1000, 500 ) - NATO_AI_Cargo_Dispatcher_Helicopter:Start() - -end - --- CCCP COALITION UNITS - --- Russian helicopters engaging the battle field in Gori Valley -Spawn_RU_KA50 = SPAWN - :New( "RU KA-50@HOT-Patriot Attack" ) - :InitLimit( 1, 24 ) - :InitRandomizeRoute( 1, 1, 8000 ) - :InitCleanUp( 180 ) - :SpawnScheduled( 1200, 0.2 ) - --- Russian ground troops attacking Gori Valley -Spawn_RU_Troops = - { 'RU Attack Gori 1', - 'RU Attack Gori 2', - 'RU Attack Gori 3', - 'RU Attack Gori 4', - 'RU Attack Gori 5', - 'RU Attack Gori 6', - 'RU Attack Gori 7', - 'RU Attack Gori 8', - 'RU Attack Gori 9', - 'RU Attack Gori 10' - } - - -Spawn_RU_Troops_Left = SPAWN - :New( "RU Attack Gori Left" ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_RU_Troops ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 349, 30, 20, 6 * 20 ) - :SpawnScheduled( 120, 1 ) - -Spawn_RU_Troops_Middle = SPAWN - :New( "RU Attack Gori Middle" ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_RU_Troops ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 260, 50, 20, 6 * 20 ) - :SpawnScheduled( 120, 1 ) - -Spawn_RU_Troops_Right = SPAWN - :New( "RU Attack Gori Right" ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_RU_Troops ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 238, 50, 20, 6 * 20 ) - :SpawnScheduled( 120, 1 ) - - --- NATO Tank Platoons invading Tskinvali - -Spawn_US_Platoon = - { 'US Tank Platoon 1', - 'US Tank Platoon 2', - 'US Tank Platoon 3', - 'US Tank Platoon 4', - 'US Tank Platoon 5', - 'US Tank Platoon 6', - 'US Tank Platoon 7', - 'US Tank Platoon 8', - 'US Tank Platoon 9', - 'US Tank Platoon 10', - 'US Tank Platoon 11', - 'US Tank Platoon 12', - 'US Tank Platoon 13' - } - -Spawn_US_Platoon_Left = SPAWN - :New( 'US Tank Platoon Left' ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_US_Platoon ) - :InitRandomizeRoute( 3, 1, 2000 ) - --:InitArray( 76, 20, 15, 15*6 ) - :SpawnScheduled( 120, 1 ) - -Spawn_US_Platoon_Middle = SPAWN - :New( 'US Tank Platoon Middle' ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_US_Platoon ) - :InitRandomizeRoute( 3, 1, 2000 ) - --:InitArray( 160, 20, 15, 15*6 ) - :SpawnScheduled( 120, 1 ) - -Spawn_US_Platoon_Right = SPAWN - :New( 'US Tank Platoon Right' ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_US_Platoon ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 90, 20, 15, 15*6 ) - :SpawnScheduled( 120, 1 ) - - - -do -- NATO Air Patrol Support Mission - - - local NATO_S1 = MISSION - :New( NATO_HQ, "Intercept Intruders","Support","Intercept any intruders invading airspace from the North!", coalition.side.BLUE ) - :AddScoring( Score ) - - -- Define the Recce groups that will detect the upcoming ground forces. - local NATO_S1_EWR = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "AI NATO EWR A2A" ):FilterStart() - - -- Define the detection method, we'll use here AREA detection. - local NATO_S1_EWR_Areas = DETECTION_AREAS:New( NATO_S1_EWR, 20000 ) - NATO_S1_EWR_Areas:SetFriendliesRange( 80000 ) - NATO_S1_EWR_Areas:SetRefreshTimeInterval( 30 ) - NATO_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets within 250km. - - local NATO_S1_Task = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "S1 NATO Air Patrol" ):FilterStart() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - NATO_S1_A2A = TASK_A2A_DISPATCHER:New( NATO_S1, NATO_S1_Task, NATO_S1_EWR_Areas ) - - - local NATO_AI_A2A_Support_East = { - "AI NATO Air Support East F-16A A", - "AI NATO Air Support East F-16A B", - } - - local NATO_AI_A2A_Support_West = { - "AI NATO Air Support West F-16A A", - "AI NATO Air Support West F-16A B", - } - - NATO_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( NATO_S1_EWR_Areas ) - - NATO_AI_A2A_Dispatcher:SetTacticalDisplay( false ) - - NATO_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) - NATO_AI_A2A_Dispatcher:SetGciRadius( 140000 ) - - NATO_AI_A2A_Dispatcher:SetSquadron( "Kutaisi", AIRBASE.Caucasus.Kutaisi, NATO_AI_A2A_Support_West, 20 ) - NATO_AI_A2A_Dispatcher:SetSquadronCap( "Kutaisi", ZONE_POLYGON:New( "NATO CAP EAST", GROUP:FindByName( "NATO CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) - NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Kutaisi", 2, 180, 300 ) - - NATO_AI_A2A_Dispatcher:SetSquadronGci( "Kutaisi", 800, 1200 ) - - NATO_AI_A2A_Dispatcher:SetSquadron( "Vaziani", AIRBASE.Caucasus.Vaziani, NATO_AI_A2A_Support_East, 20 ) - NATO_AI_A2A_Dispatcher:SetSquadronCap( "Vaziani", ZONE_POLYGON:New( "NATO CAP WEST", GROUP:FindByName( "NATO CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) - NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Vaziani", 2, 180, 300 ) - - NATO_AI_A2A_Dispatcher:SetSquadronGci( "Vaziani", 800, 1200 ) - -end - - -do -- NATO Mission 1 - - - local NATO_M1 = MISSION - :New( NATO_HQ, "Destroy SAM-6","Primary","Destroy SAM-6 batteries", coalition.side.BLUE ) - :AddScoring( Score ) - - - -- Define the Recce groups that will detect the upcoming ground forces. - local NATO_M1_RecceSet = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "M1 NATO Recce" ):FilterStart() - - NATO_M1_Spawn_Reaper = SPAWN - :New( "M1 NATO Recce Reaper" ) - :InitLimit( 1, 5 ) - :SpawnScheduled( 300, 0 ) - - - NATO_M1_ReccePatrolArray = {} - NATO_M1_RecceSpawn_US = SPAWN - :New( "M1 NATO Recce AH-64" ) - :InitLimit( 2, 10 ) - :SpawnScheduled( 60, 0.4 ) - :InitCleanUp( 300 ) - :OnSpawnGroup( - function( SpawnGroup ) - NATO_M1_RecceSpawn_US:E( SpawnGroup.ControllableName ) - local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 US Patrol Zone@ZONE" ) - local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) - local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) - NATO_M1_ReccePatrolArray[#NATO_M1_ReccePatrolArray+1] = M1_ReccePatrol - - M1_ReccePatrol:SetControllable( SpawnGroup ) - M1_ReccePatrol:__Start( 30 ) -- It takes a bit of time for the Recce to start - end - ) - - - -- Define the detection method, we'll use here AREA detection. - local NATO_M1_DetectionAreas = DETECTION_AREAS:New( NATO_M1_RecceSet, 1000 ) - --M1_DetectionAreas:BoundDetectedZones() - - local NATO_M1_Attack = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "M1 NATO Attack" ):FilterStart() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - NATO_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( NATO_M1, NATO_M1_Attack, NATO_M1_DetectionAreas ) - - NATO_M1_Designate = DESIGNATE:New( NATO_HQ, NATO_M1_DetectionAreas, NATO_M1_Attack, NATO_M1 ) - - -end - - -do -- NATO Transport Task Engineers - - local NATO_M4_Patriots = MISSION - :New( NATO_HQ, - "Engineers Patriots", - "Operational", - "Transport 3 engineering teams to three strategical Patriot launch sites. " .. - "The launch sites are not yet complete and need some special launch codes to be delivered. " .. - "The engineers have the knowledge to install these launch codes. ", - coalition.side.BLUE ) - - local NATO_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 NATO Patriot Transport" ):FilterStart() - - local NATO_M4_SetCargo = SET_CARGO:New():FilterTypes( { "Patriot Engineers" } ):FilterStart() - - local EngineersCargo1 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Bear" ), "Patriot Engineers", "Team Bear", 500 ):RespawnOnDestroyed(true) - local EngineersCargo2 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Moose" ), "Patriot Engineers", "Team Moose", 500 ):RespawnOnDestroyed(true) - local EngineersCargo3 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Falcon" ), "Patriot Engineers", "Team Falcon", 500 ):RespawnOnDestroyed(true) - - - -- These are the groups of the SA-6 batteries. - local Patriots1 = GROUP:FindByName( "M4 NATO Patriot North" ):SetAIOff() - local Patriots2 = GROUP:FindByName( "M4 NATO Patriot West" ):SetAIOff() - local Patriots3 = GROUP:FindByName( "M4 NATO Patriot East" ):SetAIOff() - - -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! - local Zone_Patriots1 = ZONE_GROUP:New( "Patriots North", Patriots1, 600 ) - local Zone_Patriots2 = ZONE_GROUP:New( "Patriots West", Patriots2, 600 ) - local Zone_Patriots3 = ZONE_GROUP:New( "Patriots East", Patriots3, 600 ) - - NATO_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( NATO_M4_Patriots, NATO_M4_HeloSetGroup ) - - local NATO_M4_Cargo_Transport_TaskName = NATO_M4_Cargo_Transport_Dispatcher:AddTransportTask( - "Activate Patriot Batteries", - NATO_M4_SetCargo, - "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the Patriot launchers. " .. - "Deployment zones have been defined at each Patriot location." - ) - - NATO_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( NATO_M4_Cargo_Transport_TaskName, { Zone_Patriots1, Zone_Patriots2, Zone_Patriots3 } ) - - local NATO_M4_Cargo_Transport_Task = NATO_M4_Cargo_Transport_Dispatcher:GetTransportTask( NATO_M4_Cargo_Transport_TaskName ) - - - --- OnAfter Transition Handler for Event CargoDeployed. - -- This event will handle after deployment the activation of the SA-6 site. - -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed - -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT 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 TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. - -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. - -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. - function NATO_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - self:E( { From, Event, To, TaskUnit, Cargo, DeployZone } ) - - local DeployZoneName = DeployZone:GetName() - local CargoName = Cargo:GetName() - - - NATO_HQ:MessageToCoalition( - string.format( "Engineers %s are successfully transported to patriot site %s.", - CargoName, - DeployZoneName - ) - ) - - if DeployZoneName == Zone_Patriots1:GetName() then - if Patriots1 and not Patriots1:IsAlive() then - local Template = Patriots1:GetTemplate() - Template.lateActivation = false - Template.Visible = false - Patriots1:Respawn(Template) - --Patriots1:SetAIOn() - end - end - - if DeployZoneName == Zone_Patriots2:GetName() then - if Patriots2 and not Patriots2:IsAlive() then - local Template = Patriots2:GetTemplate() - Template.lateActivation = false - Template.Visible = false - Patriots2:Respawn(Template) - --Patriots2:SetAIOn() - end - end - - if DeployZoneName == Zone_Patriots3:GetName() then - if Patriots3 and not Patriots3:IsAlive() then - local Template = Patriots3:GetTemplate() - Template.lateActivation = false - Template.Visible = false - Patriots3:Respawn(Template) - --Patriots3:SetAIOn() - end - end - - if self:IsAllCargoTransported() then - self:Success() - NATO_M4_Patriots:Complete() - end - end - -end - - - - - - -do -- CCCP Air Patrol Support Functions - - - local CCCP_S1 = MISSION - :New( CCCP_HQ, "Provide Air Support","Support","Intercept any bogeys invading airspace from the South or East!", coalition.side.RED ) - :AddScoring( Score ) - - -- Define the Recce groups that will detect the upcoming A2A intruders. - local CCCP_S1_EWR_Groups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "AI CCCP EWR" ):FilterStart() - - -- Define the detection method, we'll use here AREA detection. - local CCCP_S1_EWR_Areas = DETECTION_AREAS:New( CCCP_S1_EWR_Groups, 30000 ) - CCCP_S1_EWR_Areas:SetFriendliesRange( 80000 ) - CCCP_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets that are within 250km from detection. - --M1_DetectionAreas_US:BoundDetectedZones() - - local CCCP_S1_SupportGroups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "S1 CCCP Air Defense" ):FilterStart() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - CCCP_S1_A2A_Task_Dispatcher = TASK_A2A_DISPATCHER:New( CCCP_S1, CCCP_S1_SupportGroups, CCCP_S1_EWR_Areas ) - - - CCCP_AI_A2A_Support_SU_27 = { - "AI CCCP Air Support SU-27 A", - "AI CCCP Air Support SU-27 B", - "AI CCCP Air Support SU-27 C", - "AI CCCP Air Support SU-27 D" - } - - CCCP_AI_A2A_Support_MIG_29S = { - "AI CCCP Air Support MIG-29S A", - "AI CCCP Air Support MIG-29S B", - "AI CCCP Air Support MIG-29S C", - "AI CCCP Air Support MIG-29S D" - } - - - CCCP_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( CCCP_S1_EWR_Areas ) - - CCCP_AI_A2A_Dispatcher:SetTacticalDisplay( false ) - - CCCP_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) - CCCP_AI_A2A_Dispatcher:SetGciRadius( 100000 ) - - -- Beslan - CCCP_AI_A2A_Dispatcher:SetSquadron( "Beslan", AIRBASE.Caucasus.Beslan, CCCP_AI_A2A_Support_SU_27, 20 ) - CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Beslan", ZONE_POLYGON:New( "CCCP CAP EAST", GROUP:FindByName( "CCCP CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) - CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Beslan", 2, 180, 300 ) - CCCP_AI_A2A_Dispatcher:SetSquadronTakeoffInAir( "Beslan" ) - - -- Mozdok - CCCP_AI_A2A_Dispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, CCCP_AI_A2A_Support_SU_27, 20 ) - CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Mozdok", 800, 1200 ) - - CCCP_AI_A2A_Dispatcher:SetSquadron( "Nalchik", AIRBASE.Caucasus.Nalchik, CCCP_AI_A2A_Support_MIG_29S, 20 ) - CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Nalchik", ZONE_POLYGON:New( "CCCP CAP WEST", GROUP:FindByName( "CCCP CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) - CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Nalchik", 2, 180, 300 ) - CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Nalchik", 800, 1200 ) - -end - -do -- CCCP Destroy Patriots - - local CCCP_M1 = MISSION - :New( CCCP_HQ, - "Destroy Patriots", - "Primary", - "Destroy Patriot batteries.", - coalition.side.RED - ) - :AddScoring( Score ) - - -- Define the Recce groups that will detect the upcoming ground forces. - local CCCP_M1_RecceSet = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Recce" ):FilterStart() - - CCCP_M1_Spawn_SU25MR = SPAWN - :New( "M1 CCCP Recce SU-25MR" ) - :InitLimit( 1, 5 ) - :SpawnScheduled( 300, 0.5 ) - - - CCCP_M1_ReccePatrolArray = {} - CCCP_M1_RecceSpawn = SPAWN - :New( "M1 CCCP Recce MI-28N" ) - :InitLimit( 2, 10 ) - :SpawnScheduled( 60, 0.4 ) - :OnSpawnGroup( - function( SpawnGroup ) - local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 RU Patrol Zone@ZONE" ) - local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) - local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) - CCCP_M1_ReccePatrolArray[#CCCP_M1_ReccePatrolArray+1] = M1_ReccePatrol - - M1_ReccePatrol:SetControllable( SpawnGroup ) - M1_ReccePatrol:__Start( 20 ) -- It takes a bit of time for the Recce to start - end - ) - - - -- Define the detection method, we'll use here AREA detection. - local CCCP_M1_DetectionAreas = DETECTION_AREAS:New( CCCP_M1_RecceSet, 1000 ) - --M1_DetectionAreas_US:BoundDetectedZones() - - local CCCP_M1_Attack = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Attack" ):FilterStart() - CCCP_M1_Attack:Flush() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - CCCP_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( CCCP_M1, CCCP_M1_Attack, CCCP_M1_DetectionAreas ) - -end - -do -- CCCP Transport Task Engineers - - local CCCP_M4_SA6 = MISSION - :New( CCCP_HQ, - "Engineers SA-6", - "Operational", - "Transport 3 engineering teams to three strategical SA-6 launch sites. " .. - "The launch sites are not yet complete and need some special launch codes to be delivered. " .. - "The engineers have the knowledge to install these launch codes. ", - coalition.side.RED ) - :AddScoring( Score ) - - local CCCP_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 CCCP SA6 Transport" ):FilterStart() - - local CCCP_M4_SA6_SetCargo = SET_CARGO:New():FilterTypes( { "SA6 Engineers" } ):FilterStart() - - local EngineersCargoAlpha = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Alpha" ), "SA6 Engineers", "Team Alpha", 500 ) - local EngineersCargoBeta = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Beta" ), "SA6 Engineers", "Team Beta", 500 ) - local EngineersCargoGamma = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Gamma" ), "SA6 Engineers", "Team Gamma", 500 ) - - CCCP_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( CCCP_M4_SA6, CCCP_M4_HeloSetGroup ) - - local CCCP_M4_Cargo_Transport_TaskName = CCCP_M4_Cargo_Transport_Dispatcher:AddTransportTask( - "Transport SA-6 Engineers", - CCCP_M4_SA6_SetCargo, - "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the SA-6 launchers. " .. - "Deployment zones have been defined at each SA-6 location." - ) - - -- These are the groups of the SA-6 batteries. - local SA6_1 = GROUP:FindByName( "M4 CCCP SA6 Kub Moskva" ):SetAIOff() - local SA6_2 = GROUP:FindByName( "M4 CCCP SA6 Kub Niznij" ):SetAIOff() - local SA6_3 = GROUP:FindByName( "M4 CCCP SA6 Kub Yaroslavl" ):SetAIOff() - - -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! - local Zone_SA6_1 = ZONE_GROUP:New( "SA6 Moskva", SA6_1, 500 ) - local Zone_SA6_2 = ZONE_GROUP:New( "SA6 Niznij", SA6_2, 500 ) - local Zone_SA6_3 = ZONE_GROUP:New( "SA6 Yaroslavl", SA6_3, 500 ) - - CCCP_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( CCCP_M4_Cargo_Transport_TaskName, { Zone_SA6_1, Zone_SA6_2, Zone_SA6_3 } ) - local CCCP_M4_Cargo_Transport_Task = CCCP_M4_Cargo_Transport_Dispatcher:GetTransportTask( CCCP_M4_Cargo_Transport_TaskName ) - - --- OnAfter Transition Handler for Event CargoDeployed. - -- This event will handle after deployment the activation of the SA-6 site. - -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed - -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT 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 TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. - -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. - -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. - function CCCP_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - - self:E( { From, Event, To, TaskUnit:GetName(), Cargo:GetName(), DeployZone:GetName() } ) - - local DeployZoneName = DeployZone:GetName() - local CargoName = Cargo:GetName() - - - CCCP_HQ:MessageToCoalition( - string.format( "Engineers %s are successfully transported to SA-6 site %s.", - CargoName, - DeployZoneName - ) - ) - - if DeployZoneName == Zone_SA6_1:GetName() then - if SA6_1 and not SA6_1:IsAlive() then - self:E( { GroupActivated = SA6_1:GetName() } ) - local Template = SA6_1:GetTemplate() - Template.lateActivation = false - Template.Visible = false - SA6_1:Respawn(Template) - --SA6_1:SetAIOn() - end - end - - if DeployZoneName == Zone_SA6_2:GetName() then - if SA6_2 and not SA6_2:IsAlive() then - self:E( { GroupActivated = SA6_2:GetName() } ) - local Template = SA6_2:GetTemplate() - Template.lateActivation = false - Template.Visible = false - SA6_2:Respawn(Template) - --SA6_2:SetAIOn() - end - end - - if DeployZoneName == Zone_SA6_3:GetName() then - if SA6_3 and not SA6_3:IsAlive() then - self:E( { GroupActivated = SA6_3:GetName() } ) - local Template = SA6_3:GetTemplate() - Template.lateActivation = false - Template.Visible = false - SA6_3:Respawn(Template) - --SA6_3:SetAIOn() - end - end - - if self:IsAllCargoTransported() then - self:Success() - CCCP_M4_SA6:Complete() - end - end - -end - -MissileTrainer = MISSILETRAINER:New( 100, "Helps with missile tracking" ) - - - +--- Gori Valley designed with the MOOSE framework for DCS World. +-- Author: FlightControl + +-- Define the headquarters. + +NATO_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ NATO Gori" ), "Gori" ) +CCCP_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ CCCP Tskinvali" ), "Tskinvali" ) + + +-- Define the scoring object. + +Score = SCORING:New( "Gori Valley" ) + +Score:SetScaleDestroyScore( 40 ) +Score:SetScaleDestroyPenalty( 80 ) +Score:SetFratricide( 80 ) +Score:SetMessagesHit( false ) + + +--- Cargo Dispatching + +do + + local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() + local SetHelicopter = SET_GROUP:New():FilterPrefixes( "US CH-47D@RAMP Troop Deployment" ):FilterStart() + local SetDeployZones = SET_ZONE:New():FilterPrefixes( "US Troops Landing Zone" ):FilterStart() + + NATO_AI_Cargo_Dispatcher_Helicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetDeployZones ) + NATO_AI_Cargo_Dispatcher_Helicopter:SetPickupRadius( 50, 25 ) + NATO_AI_Cargo_Dispatcher_Helicopter:SetDeployRadius( 1000, 500 ) + NATO_AI_Cargo_Dispatcher_Helicopter:Start() + +end + +-- CCCP COALITION UNITS + +-- Russian helicopters engaging the battle field in Gori Valley +Spawn_RU_KA50 = SPAWN + :New( "RU KA-50@HOT-Patriot Attack" ) + :InitLimit( 1, 24 ) + :InitRandomizeRoute( 1, 1, 8000 ) + :InitCleanUp( 180 ) + :SpawnScheduled( 1200, 0.2 ) + +-- Russian ground troops attacking Gori Valley +Spawn_RU_Troops = + { 'RU Attack Gori 1', + 'RU Attack Gori 2', + 'RU Attack Gori 3', + 'RU Attack Gori 4', + 'RU Attack Gori 5', + 'RU Attack Gori 6', + 'RU Attack Gori 7', + 'RU Attack Gori 8', + 'RU Attack Gori 9', + 'RU Attack Gori 10' + } + + +Spawn_RU_Troops_Left = SPAWN + :New( "RU Attack Gori Left" ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_RU_Troops ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 349, 30, 20, 6 * 20 ) + :SpawnScheduled( 120, 1 ) + +Spawn_RU_Troops_Middle = SPAWN + :New( "RU Attack Gori Middle" ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_RU_Troops ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 260, 50, 20, 6 * 20 ) + :SpawnScheduled( 120, 1 ) + +Spawn_RU_Troops_Right = SPAWN + :New( "RU Attack Gori Right" ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_RU_Troops ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 238, 50, 20, 6 * 20 ) + :SpawnScheduled( 120, 1 ) + + +-- NATO Tank Platoons invading Tskinvali + +Spawn_US_Platoon = + { 'US Tank Platoon 1', + 'US Tank Platoon 2', + 'US Tank Platoon 3', + 'US Tank Platoon 4', + 'US Tank Platoon 5', + 'US Tank Platoon 6', + 'US Tank Platoon 7', + 'US Tank Platoon 8', + 'US Tank Platoon 9', + 'US Tank Platoon 10', + 'US Tank Platoon 11', + 'US Tank Platoon 12', + 'US Tank Platoon 13' + } + +Spawn_US_Platoon_Left = SPAWN + :New( 'US Tank Platoon Left' ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_US_Platoon ) + :InitRandomizeRoute( 3, 1, 2000 ) + --:InitArray( 76, 20, 15, 15*6 ) + :SpawnScheduled( 120, 1 ) + +Spawn_US_Platoon_Middle = SPAWN + :New( 'US Tank Platoon Middle' ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_US_Platoon ) + :InitRandomizeRoute( 3, 1, 2000 ) + --:InitArray( 160, 20, 15, 15*6 ) + :SpawnScheduled( 120, 1 ) + +Spawn_US_Platoon_Right = SPAWN + :New( 'US Tank Platoon Right' ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_US_Platoon ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 90, 20, 15, 15*6 ) + :SpawnScheduled( 120, 1 ) + + + +do -- NATO Air Patrol Support Mission + + + local NATO_S1 = MISSION + :New( NATO_HQ, "Intercept Intruders","Support","Intercept any intruders invading airspace from the North!", coalition.side.BLUE ) + :AddScoring( Score ) + + -- Define the Recce groups that will detect the upcoming ground forces. + local NATO_S1_EWR = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "AI NATO EWR A2A" ):FilterStart() + + -- Define the detection method, we'll use here AREA detection. + local NATO_S1_EWR_Areas = DETECTION_AREAS:New( NATO_S1_EWR, 20000 ) + NATO_S1_EWR_Areas:SetFriendliesRange( 80000 ) + NATO_S1_EWR_Areas:SetRefreshTimeInterval( 30 ) + NATO_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets within 250km. + + local NATO_S1_Task = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "S1 NATO Air Patrol" ):FilterStart() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + NATO_S1_A2A = TASK_A2A_DISPATCHER:New( NATO_S1, NATO_S1_Task, NATO_S1_EWR_Areas ) + + + local NATO_AI_A2A_Support_East = { + "AI NATO Air Support East F-16A A", + "AI NATO Air Support East F-16A B", + } + + local NATO_AI_A2A_Support_West = { + "AI NATO Air Support West F-16A A", + "AI NATO Air Support West F-16A B", + } + + NATO_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( NATO_S1_EWR_Areas ) + + NATO_AI_A2A_Dispatcher:SetTacticalDisplay( false ) + + NATO_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) + NATO_AI_A2A_Dispatcher:SetGciRadius( 140000 ) + + NATO_AI_A2A_Dispatcher:SetSquadron( "Kutaisi", AIRBASE.Caucasus.Kutaisi, NATO_AI_A2A_Support_West, 20 ) + NATO_AI_A2A_Dispatcher:SetSquadronCap( "Kutaisi", ZONE_POLYGON:New( "NATO CAP EAST", GROUP:FindByName( "NATO CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) + NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Kutaisi", 2, 180, 300 ) + + NATO_AI_A2A_Dispatcher:SetSquadronGci( "Kutaisi", 800, 1200 ) + + NATO_AI_A2A_Dispatcher:SetSquadron( "Vaziani", AIRBASE.Caucasus.Vaziani, NATO_AI_A2A_Support_East, 20 ) + NATO_AI_A2A_Dispatcher:SetSquadronCap( "Vaziani", ZONE_POLYGON:New( "NATO CAP WEST", GROUP:FindByName( "NATO CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) + NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Vaziani", 2, 180, 300 ) + + NATO_AI_A2A_Dispatcher:SetSquadronGci( "Vaziani", 800, 1200 ) + +end + + +do -- NATO Mission 1 + + + local NATO_M1 = MISSION + :New( NATO_HQ, "Destroy SAM-6","Primary","Destroy SAM-6 batteries", coalition.side.BLUE ) + :AddScoring( Score ) + + + -- Define the Recce groups that will detect the upcoming ground forces. + local NATO_M1_RecceSet = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "M1 NATO Recce" ):FilterStart() + + NATO_M1_Spawn_Reaper = SPAWN + :New( "M1 NATO Recce Reaper" ) + :InitLimit( 1, 5 ) + :SpawnScheduled( 300, 0 ) + + + NATO_M1_ReccePatrolArray = {} + NATO_M1_RecceSpawn_US = SPAWN + :New( "M1 NATO Recce AH-64" ) + :InitLimit( 2, 10 ) + :SpawnScheduled( 60, 0.4 ) + :InitCleanUp( 300 ) + :OnSpawnGroup( + function( SpawnGroup ) + NATO_M1_RecceSpawn_US:E( SpawnGroup.ControllableName ) + local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 US Patrol Zone@ZONE" ) + local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) + local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) + NATO_M1_ReccePatrolArray[#NATO_M1_ReccePatrolArray+1] = M1_ReccePatrol + + M1_ReccePatrol:SetControllable( SpawnGroup ) + M1_ReccePatrol:__Start( 30 ) -- It takes a bit of time for the Recce to start + end + ) + + + -- Define the detection method, we'll use here AREA detection. + local NATO_M1_DetectionAreas = DETECTION_AREAS:New( NATO_M1_RecceSet, 1000 ) + --M1_DetectionAreas:BoundDetectedZones() + + local NATO_M1_Attack = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "M1 NATO Attack" ):FilterStart() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + NATO_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( NATO_M1, NATO_M1_Attack, NATO_M1_DetectionAreas ) + + NATO_M1_Designate = DESIGNATE:New( NATO_HQ, NATO_M1_DetectionAreas, NATO_M1_Attack, NATO_M1 ) + + +end + + +do -- NATO Transport Task Engineers + + local NATO_M4_Patriots = MISSION + :New( NATO_HQ, + "Engineers Patriots", + "Operational", + "Transport 3 engineering teams to three strategical Patriot launch sites. " .. + "The launch sites are not yet complete and need some special launch codes to be delivered. " .. + "The engineers have the knowledge to install these launch codes. ", + coalition.side.BLUE ) + + local NATO_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 NATO Patriot Transport" ):FilterStart() + + local NATO_M4_SetCargo = SET_CARGO:New():FilterTypes( { "Patriot Engineers" } ):FilterStart() + + local EngineersCargo1 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Bear" ), "Patriot Engineers", "Team Bear", 500 ):RespawnOnDestroyed(true) + local EngineersCargo2 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Moose" ), "Patriot Engineers", "Team Moose", 500 ):RespawnOnDestroyed(true) + local EngineersCargo3 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Falcon" ), "Patriot Engineers", "Team Falcon", 500 ):RespawnOnDestroyed(true) + + + -- These are the groups of the SA-6 batteries. + local Patriots1 = GROUP:FindByName( "M4 NATO Patriot North" ):SetAIOff() + local Patriots2 = GROUP:FindByName( "M4 NATO Patriot West" ):SetAIOff() + local Patriots3 = GROUP:FindByName( "M4 NATO Patriot East" ):SetAIOff() + + -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! + local Zone_Patriots1 = ZONE_GROUP:New( "Patriots North", Patriots1, 600 ) + local Zone_Patriots2 = ZONE_GROUP:New( "Patriots West", Patriots2, 600 ) + local Zone_Patriots3 = ZONE_GROUP:New( "Patriots East", Patriots3, 600 ) + + NATO_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( NATO_M4_Patriots, NATO_M4_HeloSetGroup ) + + local NATO_M4_Cargo_Transport_TaskName = NATO_M4_Cargo_Transport_Dispatcher:AddTransportTask( + "Activate Patriot Batteries", + NATO_M4_SetCargo, + "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the Patriot launchers. " .. + "Deployment zones have been defined at each Patriot location." + ) + + NATO_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( NATO_M4_Cargo_Transport_TaskName, { Zone_Patriots1, Zone_Patriots2, Zone_Patriots3 } ) + + local NATO_M4_Cargo_Transport_Task = NATO_M4_Cargo_Transport_Dispatcher:GetTransportTask( NATO_M4_Cargo_Transport_TaskName ) + + + --- OnAfter Transition Handler for Event CargoDeployed. + -- This event will handle after deployment the activation of the SA-6 site. + -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed + -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT 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 TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. + -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. + -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. + function NATO_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + self:E( { From, Event, To, TaskUnit, Cargo, DeployZone } ) + + local DeployZoneName = DeployZone:GetName() + local CargoName = Cargo:GetName() + + + NATO_HQ:MessageToCoalition( + string.format( "Engineers %s are successfully transported to patriot site %s.", + CargoName, + DeployZoneName + ) + ) + + if DeployZoneName == Zone_Patriots1:GetName() then + if Patriots1 and not Patriots1:IsAlive() then + local Template = Patriots1:GetTemplate() + Template.lateActivation = false + Template.Visible = false + Patriots1:Respawn(Template) + --Patriots1:SetAIOn() + end + end + + if DeployZoneName == Zone_Patriots2:GetName() then + if Patriots2 and not Patriots2:IsAlive() then + local Template = Patriots2:GetTemplate() + Template.lateActivation = false + Template.Visible = false + Patriots2:Respawn(Template) + --Patriots2:SetAIOn() + end + end + + if DeployZoneName == Zone_Patriots3:GetName() then + if Patriots3 and not Patriots3:IsAlive() then + local Template = Patriots3:GetTemplate() + Template.lateActivation = false + Template.Visible = false + Patriots3:Respawn(Template) + --Patriots3:SetAIOn() + end + end + + if self:IsAllCargoTransported() then + self:Success() + NATO_M4_Patriots:Complete() + end + end + +end + + + + + + +do -- CCCP Air Patrol Support Functions + + + local CCCP_S1 = MISSION + :New( CCCP_HQ, "Provide Air Support","Support","Intercept any bogeys invading airspace from the South or East!", coalition.side.RED ) + :AddScoring( Score ) + + -- Define the Recce groups that will detect the upcoming A2A intruders. + local CCCP_S1_EWR_Groups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "AI CCCP EWR" ):FilterStart() + + -- Define the detection method, we'll use here AREA detection. + local CCCP_S1_EWR_Areas = DETECTION_AREAS:New( CCCP_S1_EWR_Groups, 30000 ) + CCCP_S1_EWR_Areas:SetFriendliesRange( 80000 ) + CCCP_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets that are within 250km from detection. + --M1_DetectionAreas_US:BoundDetectedZones() + + local CCCP_S1_SupportGroups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "S1 CCCP Air Defense" ):FilterStart() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + CCCP_S1_A2A_Task_Dispatcher = TASK_A2A_DISPATCHER:New( CCCP_S1, CCCP_S1_SupportGroups, CCCP_S1_EWR_Areas ) + + + CCCP_AI_A2A_Support_SU_27 = { + "AI CCCP Air Support SU-27 A", + "AI CCCP Air Support SU-27 B", + "AI CCCP Air Support SU-27 C", + "AI CCCP Air Support SU-27 D" + } + + CCCP_AI_A2A_Support_MIG_29S = { + "AI CCCP Air Support MIG-29S A", + "AI CCCP Air Support MIG-29S B", + "AI CCCP Air Support MIG-29S C", + "AI CCCP Air Support MIG-29S D" + } + + + CCCP_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( CCCP_S1_EWR_Areas ) + + CCCP_AI_A2A_Dispatcher:SetTacticalDisplay( false ) + + CCCP_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) + CCCP_AI_A2A_Dispatcher:SetGciRadius( 100000 ) + + -- Beslan + CCCP_AI_A2A_Dispatcher:SetSquadron( "Beslan", AIRBASE.Caucasus.Beslan, CCCP_AI_A2A_Support_SU_27, 20 ) + CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Beslan", ZONE_POLYGON:New( "CCCP CAP EAST", GROUP:FindByName( "CCCP CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) + CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Beslan", 2, 180, 300 ) + CCCP_AI_A2A_Dispatcher:SetSquadronTakeoffInAir( "Beslan" ) + + -- Mozdok + CCCP_AI_A2A_Dispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, CCCP_AI_A2A_Support_SU_27, 20 ) + CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Mozdok", 800, 1200 ) + + CCCP_AI_A2A_Dispatcher:SetSquadron( "Nalchik", AIRBASE.Caucasus.Nalchik, CCCP_AI_A2A_Support_MIG_29S, 20 ) + CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Nalchik", ZONE_POLYGON:New( "CCCP CAP WEST", GROUP:FindByName( "CCCP CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) + CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Nalchik", 2, 180, 300 ) + CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Nalchik", 800, 1200 ) + +end + +do -- CCCP Destroy Patriots + + local CCCP_M1 = MISSION + :New( CCCP_HQ, + "Destroy Patriots", + "Primary", + "Destroy Patriot batteries.", + coalition.side.RED + ) + :AddScoring( Score ) + + -- Define the Recce groups that will detect the upcoming ground forces. + local CCCP_M1_RecceSet = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Recce" ):FilterStart() + + CCCP_M1_Spawn_SU25MR = SPAWN + :New( "M1 CCCP Recce SU-25MR" ) + :InitLimit( 1, 5 ) + :SpawnScheduled( 300, 0.5 ) + + + CCCP_M1_ReccePatrolArray = {} + CCCP_M1_RecceSpawn = SPAWN + :New( "M1 CCCP Recce MI-28N" ) + :InitLimit( 2, 10 ) + :SpawnScheduled( 60, 0.4 ) + :OnSpawnGroup( + function( SpawnGroup ) + local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 RU Patrol Zone@ZONE" ) + local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) + local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) + CCCP_M1_ReccePatrolArray[#CCCP_M1_ReccePatrolArray+1] = M1_ReccePatrol + + M1_ReccePatrol:SetControllable( SpawnGroup ) + M1_ReccePatrol:__Start( 20 ) -- It takes a bit of time for the Recce to start + end + ) + + + -- Define the detection method, we'll use here AREA detection. + local CCCP_M1_DetectionAreas = DETECTION_AREAS:New( CCCP_M1_RecceSet, 1000 ) + --M1_DetectionAreas_US:BoundDetectedZones() + + local CCCP_M1_Attack = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Attack" ):FilterStart() + CCCP_M1_Attack:Flush() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + CCCP_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( CCCP_M1, CCCP_M1_Attack, CCCP_M1_DetectionAreas ) + +end + +do -- CCCP Transport Task Engineers + + local CCCP_M4_SA6 = MISSION + :New( CCCP_HQ, + "Engineers SA-6", + "Operational", + "Transport 3 engineering teams to three strategical SA-6 launch sites. " .. + "The launch sites are not yet complete and need some special launch codes to be delivered. " .. + "The engineers have the knowledge to install these launch codes. ", + coalition.side.RED ) + :AddScoring( Score ) + + local CCCP_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 CCCP SA6 Transport" ):FilterStart() + + local CCCP_M4_SA6_SetCargo = SET_CARGO:New():FilterTypes( { "SA6 Engineers" } ):FilterStart() + + local EngineersCargoAlpha = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Alpha" ), "SA6 Engineers", "Team Alpha", 500 ) + local EngineersCargoBeta = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Beta" ), "SA6 Engineers", "Team Beta", 500 ) + local EngineersCargoGamma = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Gamma" ), "SA6 Engineers", "Team Gamma", 500 ) + + CCCP_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( CCCP_M4_SA6, CCCP_M4_HeloSetGroup ) + + local CCCP_M4_Cargo_Transport_TaskName = CCCP_M4_Cargo_Transport_Dispatcher:AddTransportTask( + "Transport SA-6 Engineers", + CCCP_M4_SA6_SetCargo, + "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the SA-6 launchers. " .. + "Deployment zones have been defined at each SA-6 location." + ) + + -- These are the groups of the SA-6 batteries. + local SA6_1 = GROUP:FindByName( "M4 CCCP SA6 Kub Moskva" ):SetAIOff() + local SA6_2 = GROUP:FindByName( "M4 CCCP SA6 Kub Niznij" ):SetAIOff() + local SA6_3 = GROUP:FindByName( "M4 CCCP SA6 Kub Yaroslavl" ):SetAIOff() + + -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! + local Zone_SA6_1 = ZONE_GROUP:New( "SA6 Moskva", SA6_1, 500 ) + local Zone_SA6_2 = ZONE_GROUP:New( "SA6 Niznij", SA6_2, 500 ) + local Zone_SA6_3 = ZONE_GROUP:New( "SA6 Yaroslavl", SA6_3, 500 ) + + CCCP_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( CCCP_M4_Cargo_Transport_TaskName, { Zone_SA6_1, Zone_SA6_2, Zone_SA6_3 } ) + local CCCP_M4_Cargo_Transport_Task = CCCP_M4_Cargo_Transport_Dispatcher:GetTransportTask( CCCP_M4_Cargo_Transport_TaskName ) + + --- OnAfter Transition Handler for Event CargoDeployed. + -- This event will handle after deployment the activation of the SA-6 site. + -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed + -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT 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 TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. + -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. + -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. + function CCCP_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + + self:E( { From, Event, To, TaskUnit:GetName(), Cargo:GetName(), DeployZone:GetName() } ) + + local DeployZoneName = DeployZone:GetName() + local CargoName = Cargo:GetName() + + + CCCP_HQ:MessageToCoalition( + string.format( "Engineers %s are successfully transported to SA-6 site %s.", + CargoName, + DeployZoneName + ) + ) + + if DeployZoneName == Zone_SA6_1:GetName() then + if SA6_1 and not SA6_1:IsAlive() then + self:E( { GroupActivated = SA6_1:GetName() } ) + local Template = SA6_1:GetTemplate() + Template.lateActivation = false + Template.Visible = false + SA6_1:Respawn(Template) + --SA6_1:SetAIOn() + end + end + + if DeployZoneName == Zone_SA6_2:GetName() then + if SA6_2 and not SA6_2:IsAlive() then + self:E( { GroupActivated = SA6_2:GetName() } ) + local Template = SA6_2:GetTemplate() + Template.lateActivation = false + Template.Visible = false + SA6_2:Respawn(Template) + --SA6_2:SetAIOn() + end + end + + if DeployZoneName == Zone_SA6_3:GetName() then + if SA6_3 and not SA6_3:IsAlive() then + self:E( { GroupActivated = SA6_3:GetName() } ) + local Template = SA6_3:GetTemplate() + Template.lateActivation = false + Template.Visible = false + SA6_3:Respawn(Template) + --SA6_3:SetAIOn() + end + end + + if self:IsAllCargoTransported() then + self:Success() + CCCP_M4_SA6:Complete() + end + end + +end + +MissileTrainer = MISSILETRAINER:New( 100, "Helps with missile tracking" ) + + + diff --git a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz b/other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz similarity index 100% rename from DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz rename to other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz diff --git a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx b/other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx similarity index 100% rename from DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx rename to other/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx diff --git a/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua b/other/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua similarity index 100% rename from DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua rename to other/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua diff --git a/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz b/other/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz similarity index 100% rename from DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz rename to other/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz