diff --git a/Core/Beacon/010-Beacons/RAD-010-Beacons.lua b/Core/Beacon/010-Beacons/RAD-010-Beacons.lua index 79a05fc..026b532 100644 --- a/Core/Beacon/010-Beacons/RAD-010-Beacons.lua +++ b/Core/Beacon/010-Beacons/RAD-010-Beacons.lua @@ -1,46 +1,46 @@ ---- --- Author: FlightControl --- Created: 20.10.2018 --- Contributors: kaltokri --- Modified: 22.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Beacon.html --- --- # Description: --- --- This test mission demonstrates the BEACON class. --- The goal is to activate 2 types of beacons: --- - One TACAN beacon attach to an aircraft. --- - And one generic radio beacon attach to a ground UNIT (ADF). --- --- The player aircraft needs to be ASM and TACAN compatible. --- Please replace the A-10CII by an aircraft you own and that is able receive TACAN signals. --- --- Please note that we added the Morse.ogg file with a SOUND TO COUNTRY action and the first MISSION START trigger. --- Because there is no unit from Bulgaria in the mission, nobody will hear the sound. But ths way the file is part of --- the mission file and we can use it with MOOSE. - --- # Guide: --- 1. Enter A-10CII. --- 2. Tune in 252 on UHF radio. You will hear the morse code. --- 2. Switch UHF mode to ADF --- 3. Needle 1 will move to ~ 150° on HSI. --- 4. Switch back to BOTH and frequency 252 to avoid the beacon sound. --- 5. Set TACAN to A/A REC and channel to 4Y. --- 6. On NMSP activate TCN. --- 7. HSI should point to the moving aircraft. - --- Create our UNIT objects on which we'll attach a BEACON. -local Aircraft = UNIT:FindByName("Unit1") -local LandUnit = UNIT:FindByName("Unit2") - --- Now, let's start with the TACAN Beacon. --- This particular TACAN can be homed on. -local BeaconAircraft = Aircraft:GetBeacon() -BeaconAircraft:ActivateTACAN(4, "Y", "UNIT1", true) - --- And let's setup the ground based radio beacon (ADF). --- Notice how this beacon will stop in 320 sec (last parameter). -local BeaconLand = LandUnit:GetBeacon() -BeaconLand:RadioBeacon("Morse.ogg", 252, radio.modulation.AM, 100, 320) -- File, frequency, modulation, power, timeout +--- +-- Author: FlightControl +-- Created: 20.10.2018 +-- Contributors: kaltokri +-- Modified: 22.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Beacon.html +-- +-- # Description: +-- +-- This test mission demonstrates the BEACON class. +-- The goal is to activate 2 types of beacons: +-- - One TACAN beacon attach to an aircraft. +-- - And one generic radio beacon attach to a ground UNIT (ADF). +-- +-- The player aircraft needs to be ASM and TACAN compatible. +-- Please replace the A-10CII by an aircraft you own and that is able receive TACAN signals. +-- +-- Please note that we added the Morse.ogg file with a SOUND TO COUNTRY action and the first MISSION START trigger. +-- Because there is no unit from Bulgaria in the mission, nobody will hear the sound. But ths way the file is part of +-- the mission file and we can use it with MOOSE. + +-- # Guide: +-- 1. Enter A-10CII. +-- 2. Tune in 252 on UHF radio. You will hear the morse code. +-- 2. Switch UHF mode to ADF +-- 3. Needle 1 will move to ~ 150° on HSI. +-- 4. Switch back to BOTH and frequency 252 to avoid the beacon sound. +-- 5. Set TACAN to A/A REC and channel to 4Y. +-- 6. On NMSP activate TCN. +-- 7. HSI should point to the moving aircraft. + +-- Create our UNIT objects on which we'll attach a BEACON. +local Aircraft = UNIT:FindByName("Unit1") +local LandUnit = UNIT:FindByName("Unit2") + +-- Now, let's start with the TACAN Beacon. +-- This particular TACAN can be homed on. +local BeaconAircraft = Aircraft:GetBeacon() +BeaconAircraft:ActivateTACAN(4, "Y", "UNIT1", true) + +-- And let's setup the ground based radio beacon (ADF). +-- Notice how this beacon will stop in 320 sec (last parameter). +local BeaconLand = LandUnit:GetBeacon() +BeaconLand:RadioBeacon("Morse.ogg", 252, radio.modulation.AM, 100, 320) -- File, frequency, modulation, power, timeout diff --git a/Core/Beacon/010-Beacons/RAD-010-Beacons.miz b/Core/Beacon/010-Beacons/RAD-010-Beacons.miz index da88e28..3cee41d 100644 Binary files a/Core/Beacon/010-Beacons/RAD-010-Beacons.miz and b/Core/Beacon/010-Beacons/RAD-010-Beacons.miz differ diff --git a/Core/Zone/100-Normal-Zone/ZON-100-Normal-Zone.miz b/Core/Zone/100-Normal-Zone/ZON-100-Normal-Zone.miz index 23239be..5961914 100644 Binary files a/Core/Zone/100-Normal-Zone/ZON-100-Normal-Zone.miz and b/Core/Zone/100-Normal-Zone/ZON-100-Normal-Zone.miz differ diff --git a/Core/Zone/101-Normal-Zone-Random-Point/ZON-101-Normal-Zone-Random-Point.miz b/Core/Zone/101-Normal-Zone-Random-Point/ZON-101-Normal-Zone-Random-Point.miz index 0da279e..8df6d35 100644 Binary files a/Core/Zone/101-Normal-Zone-Random-Point/ZON-101-Normal-Zone-Random-Point.miz and b/Core/Zone/101-Normal-Zone-Random-Point/ZON-101-Normal-Zone-Random-Point.miz differ diff --git a/Core/Zone/102-Normal-Zone-Boundary/ZON-102-Normal-Zone-Boundary.miz b/Core/Zone/102-Normal-Zone-Boundary/ZON-102-Normal-Zone-Boundary.miz index 620f50d..8865de7 100644 Binary files a/Core/Zone/102-Normal-Zone-Boundary/ZON-102-Normal-Zone-Boundary.miz and b/Core/Zone/102-Normal-Zone-Boundary/ZON-102-Normal-Zone-Boundary.miz differ diff --git a/Core/Zone/103-Test-if-GROUP-object-is-in-ZONE/ZON-103-Test-if-GROUP-object-is-in-ZONE.miz b/Core/Zone/103-Test-if-GROUP-object-is-in-ZONE/ZON-103-Test-if-GROUP-object-is-in-ZONE.miz index 93299fd..847dbcc 100644 Binary files a/Core/Zone/103-Test-if-GROUP-object-is-in-ZONE/ZON-103-Test-if-GROUP-object-is-in-ZONE.miz and b/Core/Zone/103-Test-if-GROUP-object-is-in-ZONE/ZON-103-Test-if-GROUP-object-is-in-ZONE.miz differ diff --git a/Core/Zone/104-Test-if-GROUP-SET-is-in-ZONE/ZON-104-Test-if-GROUP-SET-is-in-ZONE.miz b/Core/Zone/104-Test-if-GROUP-SET-is-in-ZONE/ZON-104-Test-if-GROUP-SET-is-in-ZONE.miz index b38c1ec..641b03a 100644 Binary files a/Core/Zone/104-Test-if-GROUP-SET-is-in-ZONE/ZON-104-Test-if-GROUP-SET-is-in-ZONE.miz and b/Core/Zone/104-Test-if-GROUP-SET-is-in-ZONE/ZON-104-Test-if-GROUP-SET-is-in-ZONE.miz differ diff --git a/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.lua b/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.lua index c71aae5..1bb0b1e 100644 --- a/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.lua +++ b/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.lua @@ -1,39 +1,39 @@ ---- --- Author: FlightControl --- Created: 21.05.2018 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A ZONE has been defined in mission editor. It's boundaries are marked with white smoke. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving within the zone, a red smoke is placed at the vehicle location. --- --- # Guide: --- --- 1. Start the mission. --- 2. Observe the zone perimeter. It should be marked with white smoke. --- 3. Observe the vehicle. It should place red smoke when driving through the zone. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Now I can find the zone instead of doing ZONE:New, because the ZONE object is already in MOOSE. -ZoneA = ZONE:FindByName( "Zone" ) -ZoneA:SmokeZone( SMOKECOLOR.White, 30 ) - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupApc:IsCompletelyInZone( ZoneA ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) +--- +-- Author: FlightControl +-- Created: 21.05.2018 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A ZONE has been defined in mission editor. It's boundaries are marked with white smoke. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving within the zone, a red smoke is placed at the vehicle location. +-- +-- # Guide: +-- +-- 1. Start the mission. +-- 2. Observe the zone perimeter. It should be marked with white smoke. +-- 3. Observe the vehicle. It should place red smoke when driving through the zone. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Now I can find the zone instead of doing ZONE:New, because the ZONE object is already in MOOSE. +ZoneA = ZONE:FindByName( "Zone" ) +ZoneA:SmokeZone( SMOKECOLOR.White, 30 ) + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupApc:IsCompletelyInZone( ZoneA ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) diff --git a/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.miz b/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.miz index 76d9b37..dcc451a 100644 Binary files a/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.miz and b/Core/Zone/110-ZONE-declared-in-ME/ZON-110-ZONE-declared-in-ME.miz differ diff --git a/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.lua b/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.lua index a4194cb..10e8cdd 100644 --- a/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.lua +++ b/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.lua @@ -1,33 +1,33 @@ ---- --- Author: FlightControl --- Created: 08.10.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- This test mission demonstrates how to get all SCENERY objects within a given zone. --- --- # Guide: --- --- 1. Start the mission and watch the messages with the informations of the found objects. --- --- Note: You can resice and move the zone in mission editor to inspect different locations. --- Important: IDs of SCENERY objects often change on terrain updates! - -ZoneToScan = ZONE:New( "Zone" ) -ZoneToScan:DrawZone() -- Show the zone in F10 map, so it is easy to see. - --- Scan for all objects which are of category SCENERY -ZoneToScan:Scan( Object.Category.SCENERY ) - --- Process the result of the scan and print a message for each object. -for SceneryTypeName, SceneryData in pairs( ZoneToScan:GetScannedScenery() ) do - for SceneryName, SceneryObject in pairs( SceneryData ) do - local SceneryObject = SceneryObject -- Wrapper.Scenery#SCENERY - MESSAGE:NewType( "Scenery: " .. SceneryObject:GetTypeName() .. ", Coord LL DMS: " .. SceneryObject:GetCoordinate():ToStringLLDMS(), MESSAGE.Type.Information ):ToAll() - end -end +--- +-- Author: FlightControl +-- Created: 08.10.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- This test mission demonstrates how to get all SCENERY objects within a given zone. +-- +-- # Guide: +-- +-- 1. Start the mission and watch the messages with the informations of the found objects. +-- +-- Note: You can resice and move the zone in mission editor to inspect different locations. +-- Important: IDs of SCENERY objects often change on terrain updates! + +ZoneToScan = ZONE:New( "Zone" ) +ZoneToScan:DrawZone() -- Show the zone in F10 map, so it is easy to see. + +-- Scan for all objects which are of category SCENERY +ZoneToScan:Scan( Object.Category.SCENERY ) + +-- Process the result of the scan and print a message for each object. +for SceneryTypeName, SceneryData in pairs( ZoneToScan:GetScannedScenery() ) do + for SceneryName, SceneryObject in pairs( SceneryData ) do + local SceneryObject = SceneryObject -- Wrapper.Scenery#SCENERY + MESSAGE:NewType( "Scenery: " .. SceneryObject:GetTypeName() .. ", Coord LL DMS: " .. SceneryObject:GetCoordinate():ToStringLLDMS(), MESSAGE.Type.Information ):ToAll() + end +end diff --git a/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.miz b/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.miz index a1cf233..de825ca 100644 Binary files a/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.miz and b/Core/Zone/190-Return-SCENERY-objects-in-Zone/ZON-190-Return-SCENERY-objects-in-Zone.miz differ diff --git a/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.lua b/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.lua index 29c9f2e..418dd6a 100644 --- a/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.lua +++ b/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.lua @@ -1,51 +1,51 @@ ---- --- Author: FlightControl --- Created: 21.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A group of trucks will move straigth into one direction. --- We define a ZONE_GROUP which is a round zone around a group. It will move with the group leader. --- To make the zone visible in the mission we use FlareZone. --- --- An APC is driving zigzags through the terrain. If it is within the moving zone red smoke will be deployed. --- --- # Guide: --- --- 1. Start the mission and watch the moving truck convoy. --- 2. See the recurring deployed flare to get an idea of the actual zone bounderies. --- 3. Watch the APC driving trough the zone, a red smoke will be deployed. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Get object of moving truck convoi. -GroupTrucks = GROUP:FindByName( "Trucks" ) - --- Get a zone attached to the group. -ZoneA = ZONE_GROUP:New( "ZoneA", GroupTrucks, 100 ) - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupApc:IsCompletelyInZone( ZoneA ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) - --- Start a scheduler to deploy a flare every 5 seconds to give you an idea of the actual zone bounderies. -TrucksZoneColoring = SCHEDULER:New( nil, - function() - ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) - end, - {}, 0, 5 -) +--- +-- Author: FlightControl +-- Created: 21.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A group of trucks will move straigth into one direction. +-- We define a ZONE_GROUP which is a round zone around a group. It will move with the group leader. +-- To make the zone visible in the mission we use FlareZone. +-- +-- An APC is driving zigzags through the terrain. If it is within the moving zone red smoke will be deployed. +-- +-- # Guide: +-- +-- 1. Start the mission and watch the moving truck convoy. +-- 2. See the recurring deployed flare to get an idea of the actual zone bounderies. +-- 3. Watch the APC driving trough the zone, a red smoke will be deployed. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Get object of moving truck convoi. +GroupTrucks = GROUP:FindByName( "Trucks" ) + +-- Get a zone attached to the group. +ZoneA = ZONE_GROUP:New( "ZoneA", GroupTrucks, 100 ) + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupApc:IsCompletelyInZone( ZoneA ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) + +-- Start a scheduler to deploy a flare every 5 seconds to give you an idea of the actual zone bounderies. +TrucksZoneColoring = SCHEDULER:New( nil, + function() + ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) + end, + {}, 0, 5 +) diff --git a/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.miz b/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.miz index eb0dbb8..e9f72c6 100644 Binary files a/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.miz and b/Core/Zone/200-Group-Zone/ZON-200-Group-Zone.miz differ diff --git a/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.lua b/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.lua index b6471e4..888cfd8 100644 --- a/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.lua +++ b/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.lua @@ -1,52 +1,52 @@ ---- --- Author: FlightControl --- Created: 18.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- Three groups of firefighters are placed. --- We define a ZONE_GROUP for each group, mark the border with white smoke and place 15 smokes inside of each zone. --- We use different methods to choose a random point: --- - The first 15 points are blue smoked using the GetRandomVec2() API. --- - The second 15 points are orange smoked using the GetRandomPointVec2() API. --- - The third 15 points are red smoked using the GetRandomPointVec3() API. --- --- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). --- --- # Guide: --- --- 1. Start the mission. Zoom out and switch position with F7. --- 2. Observe smoking of Blue smoke in Zone 1. --- 3. Observe smoking of Orange smoke in Zone 2. --- 4. Observe smoking of Red smoke in Zone 3. - --- Get all three ZONE_GROUPs: -Zone1 = ZONE_GROUP:New( "Zone 1", GROUP:FindByName( "Zone 1" ), 300 ) -Zone2 = ZONE_GROUP:New( "Zone 2", GROUP:FindByName( "Zone 2" ), 300 ) -Zone3 = ZONE_GROUP:New( "Zone 3", GROUP:FindByName( "Zone 3" ), 300 ) - --- Add white smoke to the borders of the zones: -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - --- Mark 15 random points with smock inside each zone. -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end +--- +-- Author: FlightControl +-- Created: 18.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- Three groups of firefighters are placed. +-- We define a ZONE_GROUP for each group, mark the border with white smoke and place 15 smokes inside of each zone. +-- We use different methods to choose a random point: +-- - The first 15 points are blue smoked using the GetRandomVec2() API. +-- - The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- - The third 15 points are red smoked using the GetRandomPointVec3() API. +-- +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). +-- +-- # Guide: +-- +-- 1. Start the mission. Zoom out and switch position with F7. +-- 2. Observe smoking of Blue smoke in Zone 1. +-- 3. Observe smoking of Orange smoke in Zone 2. +-- 4. Observe smoking of Red smoke in Zone 3. + +-- Get all three ZONE_GROUPs: +Zone1 = ZONE_GROUP:New( "Zone 1", GROUP:FindByName( "Zone 1" ), 300 ) +Zone2 = ZONE_GROUP:New( "Zone 2", GROUP:FindByName( "Zone 2" ), 300 ) +Zone3 = ZONE_GROUP:New( "Zone 3", GROUP:FindByName( "Zone 3" ), 300 ) + +-- Add white smoke to the borders of the zones: +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +-- Mark 15 random points with smock inside each zone. +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.miz b/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.miz index 4280891..563698d 100644 Binary files a/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.miz and b/Core/Zone/201-Group-Zone-Random-Point/ZON-201-Group-Zone-Random-Point.miz differ diff --git a/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.lua b/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.lua index e899d2e..652e18d 100644 --- a/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.lua +++ b/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.lua @@ -1,51 +1,51 @@ ---- --- Author: FlightControl --- Created: 21.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A single truck will move straigth into one direction. --- We define a ZONE_UNIT which is a round zone around a unit. It will move with the unit. --- To make the zone visible in the mission we use FlareZone. --- --- An APC is driving zigzags through the terrain. If it is within the moving zone red smoke will be deployed. --- --- # Guide: --- --- 1. Start the mission and watch the moving truck. --- 2. See the recurring deployed flare to get an idea of the actual zone bounderies. --- 3. Watch the APC driving trough the zone, a red smoke will be deployed. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Get object of moving truck. -Truck = UNIT:FindByName( "Truck" ) - --- Get a zone attached to the unit. -ZoneA = ZONE_UNIT:New( "Zone A", Truck, 100 ) - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupApc:IsCompletelyInZone( ZoneA ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) - --- Start a scheduler to deploy a flare every 5 seconds to give you an idea of the actual zone bounderies. -TankZoneColoring = SCHEDULER:New( nil, - function() - ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) - end, - {}, 0, 5 -) +--- +-- Author: FlightControl +-- Created: 21.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A single truck will move straigth into one direction. +-- We define a ZONE_UNIT which is a round zone around a unit. It will move with the unit. +-- To make the zone visible in the mission we use FlareZone. +-- +-- An APC is driving zigzags through the terrain. If it is within the moving zone red smoke will be deployed. +-- +-- # Guide: +-- +-- 1. Start the mission and watch the moving truck. +-- 2. See the recurring deployed flare to get an idea of the actual zone bounderies. +-- 3. Watch the APC driving trough the zone, a red smoke will be deployed. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Get object of moving truck. +Truck = UNIT:FindByName( "Truck" ) + +-- Get a zone attached to the unit. +ZoneA = ZONE_UNIT:New( "Zone A", Truck, 100 ) + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupApc:IsCompletelyInZone( ZoneA ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) + +-- Start a scheduler to deploy a flare every 5 seconds to give you an idea of the actual zone bounderies. +TankZoneColoring = SCHEDULER:New( nil, + function() + ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) + end, + {}, 0, 5 +) diff --git a/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.miz b/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.miz index a8d8928..f159604 100644 Binary files a/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.miz and b/Core/Zone/300-Unit-Zone/ZON-300-Unit-Zone.miz differ diff --git a/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.lua b/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.lua index 0f54c28..e380fd7 100644 --- a/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.lua +++ b/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.lua @@ -1,52 +1,52 @@ ---- --- Author: FlightControl --- Created: 18.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- Three firefighters are placed. --- We define a ZONE_UNIT for each firefighter, mark the border with white smoke and place 15 smokes inside of each zone. --- We use different methods to choose a random point: --- - The first 15 points are blue smoked using the GetRandomVec2() API. --- - The second 15 points are orange smoked using the GetRandomPointVec2() API. --- - The third 15 points are red smoked using the GetRandomPointVec3() API. --- --- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). --- --- # Guide: --- --- 1. Start the mission. Zoom out and switch position with F7. --- 2. Observe smoking of Blue smoke in Zone 1. --- 3. Observe smoking of Orange smoke in Zone 2. --- 4. Observe smoking of Red smoke in Zone 3. - --- Get all three ZONE_UNITs: -Zone1 = ZONE_UNIT:New( "Zone 1", UNIT:FindByName( "Unit1" ), 300 ) -Zone2 = ZONE_UNIT:New( "Zone 2", UNIT:FindByName( "Unit2" ), 300 ) -Zone3 = ZONE_UNIT:New( "Zone 3", UNIT:FindByName( "Unit3" ), 300 ) - --- Add white smoke to the borders of the zones: -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - --- Mark 15 random points with smock inside each zone. -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end +--- +-- Author: FlightControl +-- Created: 18.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- Three firefighters are placed. +-- We define a ZONE_UNIT for each firefighter, mark the border with white smoke and place 15 smokes inside of each zone. +-- We use different methods to choose a random point: +-- - The first 15 points are blue smoked using the GetRandomVec2() API. +-- - The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- - The third 15 points are red smoked using the GetRandomPointVec3() API. +-- +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). +-- +-- # Guide: +-- +-- 1. Start the mission. Zoom out and switch position with F7. +-- 2. Observe smoking of Blue smoke in Zone 1. +-- 3. Observe smoking of Orange smoke in Zone 2. +-- 4. Observe smoking of Red smoke in Zone 3. + +-- Get all three ZONE_UNITs: +Zone1 = ZONE_UNIT:New( "Zone 1", UNIT:FindByName( "Unit1" ), 300 ) +Zone2 = ZONE_UNIT:New( "Zone 2", UNIT:FindByName( "Unit2" ), 300 ) +Zone3 = ZONE_UNIT:New( "Zone 3", UNIT:FindByName( "Unit3" ), 300 ) + +-- Add white smoke to the borders of the zones: +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +-- Mark 15 random points with smock inside each zone. +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.miz b/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.miz index 1fbe3ac..5cb3b5b 100644 Binary files a/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.miz and b/Core/Zone/301-Unit-Zone-Random-Point/ZON-301-Unit-Zone-Random-Point.miz differ diff --git a/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.lua b/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.lua index f3717cc..9d40603 100644 --- a/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.lua +++ b/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.lua @@ -1,41 +1,41 @@ ---- --- Author: FlightControl --- Created: 21.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A ZONE_RADIUS has been defined. It's boundaries are marked with white smoke. --- Center of the zone is placed on the postion of a bunker. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving inside of the zone, a red smoke is placed on the vehicle location. --- --- # Test cases: --- --- 1. Watch the APC driving trough the zone, a red smoke will be deployed. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Get object of the bunker. -Bunker = STATIC:FindByName( "Bunker" ) - --- Get a zone around the bunker object and mark it with smoke. -ZoneA = ZONE_RADIUS:New( "Zone A", Bunker:GetVec2(), 300 ) -ZoneA:SmokeZone( SMOKECOLOR.White, 90 ) - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupApc:IsCompletelyInZone( ZoneA ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) +--- +-- Author: FlightControl +-- Created: 21.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A ZONE_RADIUS has been defined. It's boundaries are marked with white smoke. +-- Center of the zone is placed on the postion of a bunker. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving inside of the zone, a red smoke is placed on the vehicle location. +-- +-- # Test cases: +-- +-- 1. Watch the APC driving trough the zone, a red smoke will be deployed. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Get object of the bunker. +Bunker = STATIC:FindByName( "Bunker" ) + +-- Get a zone around the bunker object and mark it with smoke. +ZoneA = ZONE_RADIUS:New( "Zone A", Bunker:GetVec2(), 300 ) +ZoneA:SmokeZone( SMOKECOLOR.White, 90 ) + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupApc:IsCompletelyInZone( ZoneA ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) diff --git a/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.miz b/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.miz index a40a09e..0a1a39e 100644 Binary files a/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.miz and b/Core/Zone/400-Radius-Zone/ZON-400-Radius-Zone.miz differ diff --git a/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.lua b/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.lua index f36f026..297a20c 100644 --- a/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.lua +++ b/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.lua @@ -1,58 +1,58 @@ ---- --- Author: FlightControl --- Created: 18.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- Three firefighters are placed. --- We define a ZONE_RADIUS and use the position of the units (GetVec2) as center. --- We mark the border of each zone with white smoke and place 15 smokes inside of each zone. --- We use different methods to choose a random point: --- - The first 15 points are blue smoked using the GetRandomVec2() API. --- - The second 15 points are orange smoked using the GetRandomPointVec2() API. --- - The third 15 points are red smoked using the GetRandomPointVec3() API. --- --- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). --- --- # Guide: --- --- 1. Start the mission. Zoom out and switch position with F7. --- 2. Observe smoking of Blue smoke in Zone 1. --- 3. Observe smoking of Orange smoke in Zone 2. --- 4. Observe smoking of Red smoke in Zone 3. - --- Get all three UNITs: -Unit1 = UNIT:FindByName( "Unit1" ) -Unit2 = UNIT:FindByName( "Unit2" ) -Unit3 = UNIT:FindByName( "Unit3" ) - --- Get all three ZONE_RADIUS on unit positions: -Zone1 = ZONE_RADIUS:New( "Zone 1", Unit1:GetVec2(), 300 ) -Zone2 = ZONE_RADIUS:New( "Zone 2", Unit2:GetVec2(), 300 ) -Zone3 = ZONE_RADIUS:New( "Zone 3", Unit3:GetVec2(), 300 ) - --- Add white smoke to the borders of the zones: -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - --- Mark 15 random points with smock inside each zone. -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end +--- +-- Author: FlightControl +-- Created: 18.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- Three firefighters are placed. +-- We define a ZONE_RADIUS and use the position of the units (GetVec2) as center. +-- We mark the border of each zone with white smoke and place 15 smokes inside of each zone. +-- We use different methods to choose a random point: +-- - The first 15 points are blue smoked using the GetRandomVec2() API. +-- - The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- - The third 15 points are red smoked using the GetRandomPointVec3() API. +-- +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). +-- +-- # Guide: +-- +-- 1. Start the mission. Zoom out and switch position with F7. +-- 2. Observe smoking of Blue smoke in Zone 1. +-- 3. Observe smoking of Orange smoke in Zone 2. +-- 4. Observe smoking of Red smoke in Zone 3. + +-- Get all three UNITs: +Unit1 = UNIT:FindByName( "Unit1" ) +Unit2 = UNIT:FindByName( "Unit2" ) +Unit3 = UNIT:FindByName( "Unit3" ) + +-- Get all three ZONE_RADIUS on unit positions: +Zone1 = ZONE_RADIUS:New( "Zone 1", Unit1:GetVec2(), 300 ) +Zone2 = ZONE_RADIUS:New( "Zone 2", Unit2:GetVec2(), 300 ) +Zone3 = ZONE_RADIUS:New( "Zone 3", Unit3:GetVec2(), 300 ) + +-- Add white smoke to the borders of the zones: +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +-- Mark 15 random points with smock inside each zone. +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.miz b/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.miz index f8138cd..06a92f2 100644 Binary files a/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.miz and b/Core/Zone/401-Radius-Zone-Random-Point/ZON-401-Radius-Zone-Random-Point.miz differ diff --git a/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.lua b/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.lua index 14a6b54..b01477c 100644 --- a/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.lua +++ b/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.lua @@ -1,42 +1,42 @@ ---- --- Author: FlightControl --- Created: 18.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A ZONE_POLYGON has been defined, which boundaries are smoking. --- The polygon is defined by the waypoint of a BTR-80, whith activated 'LATE ACTIVATION' --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Start the mission and watch the APC driving trough the zone. --- 2. A red smoke will be deployed within the zone. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Get object of the unit with waypoints. -GroupPolygon = GROUP:FindByName( "Polygon" ) - --- Get a polygon zone and smoke the borders. -PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) -PolygonZone:SmokeZone( SMOKECOLOR.White, 20 ) - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) - if GroupApc:IsCompletelyInZone( PolygonZone ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) +--- +-- Author: FlightControl +-- Created: 18.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A ZONE_POLYGON has been defined, which boundaries are smoking. +-- The polygon is defined by the waypoint of a BTR-80, whith activated 'LATE ACTIVATION' +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Start the mission and watch the APC driving trough the zone. +-- 2. A red smoke will be deployed within the zone. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Get object of the unit with waypoints. +GroupPolygon = GROUP:FindByName( "Polygon" ) + +-- Get a polygon zone and smoke the borders. +PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) +PolygonZone:SmokeZone( SMOKECOLOR.White, 20 ) + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) + if GroupApc:IsCompletelyInZone( PolygonZone ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) diff --git a/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.miz b/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.miz index 3053ff3..a92723e 100644 Binary files a/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.miz and b/Core/Zone/500-Polygon-Zone/ZON-500-Polygon-Zone.miz differ diff --git a/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.lua b/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.lua index d81d774..c9985c2 100644 --- a/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.lua +++ b/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.lua @@ -1,52 +1,52 @@ ---- --- Author: FlightControl --- Created: 18.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- Three firefighters are placed. --- We define a ZONE_POLYGON for each and use the waypoints as the shape. --- We use different methods to choose a random point: --- - The first 15 points are blue smoked using the GetRandomVec2() API. --- - The second 15 points are orange smoked using the GetRandomPointVec2() API. --- - The third 15 points are red smoked using the GetRandomPointVec3() API. --- --- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). --- --- # Guide: --- --- 1. Start the mission. Zoom out and switch position with F7. --- 2. Observe smoking of Blue smoke in Zone 1. --- 3. Observe smoking of Orange smoke in Zone 2. --- 4. Observe smoking of Red smoke in Zone 3. - --- Get all three ZONE_POLYGON from the groups: -Zone1 = ZONE_POLYGON:New( "Zone 1", GROUP:FindByName( "GroupA" ) ) -Zone2 = ZONE_POLYGON:New( "Zone 2", GROUP:FindByName( "GroupB" ) ) -Zone3 = ZONE_POLYGON:New( "Zone 3", GROUP:FindByName( "GroupC" ) ) - --- Add white smoke to the borders of the zones: -Zone1:SmokeZone( SMOKECOLOR.White, 4 ) -Zone2:SmokeZone( SMOKECOLOR.White, 4 ) -Zone3:SmokeZone( SMOKECOLOR.White, 4 ) - --- Mark 15 random points with smock inside each zone. -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end +--- +-- Author: FlightControl +-- Created: 18.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- Three firefighters are placed. +-- We define a ZONE_POLYGON for each and use the waypoints as the shape. +-- We use different methods to choose a random point: +-- - The first 15 points are blue smoked using the GetRandomVec2() API. +-- - The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- - The third 15 points are red smoked using the GetRandomPointVec3() API. +-- +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view (F7). +-- +-- # Guide: +-- +-- 1. Start the mission. Zoom out and switch position with F7. +-- 2. Observe smoking of Blue smoke in Zone 1. +-- 3. Observe smoking of Orange smoke in Zone 2. +-- 4. Observe smoking of Red smoke in Zone 3. + +-- Get all three ZONE_POLYGON from the groups: +Zone1 = ZONE_POLYGON:New( "Zone 1", GROUP:FindByName( "GroupA" ) ) +Zone2 = ZONE_POLYGON:New( "Zone 2", GROUP:FindByName( "GroupB" ) ) +Zone3 = ZONE_POLYGON:New( "Zone 3", GROUP:FindByName( "GroupC" ) ) + +-- Add white smoke to the borders of the zones: +Zone1:SmokeZone( SMOKECOLOR.White, 4 ) +Zone2:SmokeZone( SMOKECOLOR.White, 4 ) +Zone3:SmokeZone( SMOKECOLOR.White, 4 ) + +-- Mark 15 random points with smock inside each zone. +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.miz b/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.miz index d8edcc7..cb90544 100644 Binary files a/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.miz and b/Core/Zone/501-Polygon-Zone-Random-Point/ZON-501-Polygon-Zone-Random-Point.miz differ diff --git a/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.lua b/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.lua index 4194274..cec65f7 100644 --- a/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.lua +++ b/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.lua @@ -1,42 +1,42 @@ ---- --- Author: FlightControl --- Created: 18.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A ZONE_POLYGON has been defined, which boundaries are marked with tires. --- The polygon is defined by the waypoint of a BTR-80, whith activated 'LATE ACTIVATION' --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Start the mission and watch the APC driving trough the zone. --- 2. A red smoke will be deployed within the zone. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Get object of the unit with waypoints. -GroupPolygon = GROUP:FindByName( "Polygon" ) - --- Get a polygon zone and mark the with tires (see F10 map). -PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) -PolygonZone:BoundZone() - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) - if GroupApc:IsCompletelyInZone( PolygonZone ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) +--- +-- Author: FlightControl +-- Created: 18.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A ZONE_POLYGON has been defined, which boundaries are marked with tires. +-- The polygon is defined by the waypoint of a BTR-80, whith activated 'LATE ACTIVATION' +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Start the mission and watch the APC driving trough the zone. +-- 2. A red smoke will be deployed within the zone. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Get object of the unit with waypoints. +GroupPolygon = GROUP:FindByName( "Polygon" ) + +-- Get a polygon zone and mark the with tires (see F10 map). +PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) +PolygonZone:BoundZone() + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) + if GroupApc:IsCompletelyInZone( PolygonZone ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) diff --git a/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.miz b/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.miz index 1484a1a..1504dbb 100644 Binary files a/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.miz and b/Core/Zone/502-Polygon-Zone-Boundary/ZON-502-Polygon-Zone-Boundary.miz differ diff --git a/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.lua b/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.lua index 8165a0f..f1e5e9c 100644 --- a/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.lua +++ b/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.lua @@ -1,39 +1,39 @@ ---- --- Author: FlightControl --- Created: 21.05.2018 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- --- # Description: --- --- A ZONE_POLYGON has been defined, which boundaries are smoking. --- The polygon is defined by the waypoints of a BTR-80, whith activated 'LATE ACTIVATION' --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Start the mission and watch the APC driving trough the zone. --- 2. A red smoke will be deployed within the zone. - --- Get object for APC. -GroupApc = GROUP:FindByName( "APC" ) - --- Get a polygon zone and smoke the borders. This time with function FindByName! -PolygonZone = ZONE_POLYGON:FindByName( "Polygon A" ) -PolygonZone:SmokeZone( SMOKECOLOR.White, 10 ) - --- Start a scheduler to test every second if the APC is inside of the zone. --- Post a message with the result and deploy smoke if APC is within the zone. -Messager = SCHEDULER:New( nil, - function() - GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) - if GroupApc:IsCompletelyInZone( PolygonZone ) then - GroupApc:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 -) +--- +-- Author: FlightControl +-- Created: 21.05.2018 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- +-- # Description: +-- +-- A ZONE_POLYGON has been defined, which boundaries are smoking. +-- The polygon is defined by the waypoints of a BTR-80, whith activated 'LATE ACTIVATION' +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Start the mission and watch the APC driving trough the zone. +-- 2. A red smoke will be deployed within the zone. + +-- Get object for APC. +GroupApc = GROUP:FindByName( "APC" ) + +-- Get a polygon zone and smoke the borders. This time with function FindByName! +PolygonZone = ZONE_POLYGON:FindByName( "Polygon A" ) +PolygonZone:SmokeZone( SMOKECOLOR.White, 10 ) + +-- Start a scheduler to test every second if the APC is inside of the zone. +-- Post a message with the result and deploy smoke if APC is within the zone. +Messager = SCHEDULER:New( nil, + function() + GroupApc:MessageToAll( ( GroupApc:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) + if GroupApc:IsCompletelyInZone( PolygonZone ) then + GroupApc:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 +) diff --git a/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.miz b/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.miz index 2aacb34..efca924 100644 Binary files a/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.miz and b/Core/Zone/510-ZONE_POLYGON-declared-in-ME/ZON-510-ZONE_POLYGON-declared-in-ME.miz differ diff --git a/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.lua b/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.lua index 1e5defd..9e72806 100644 --- a/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.lua +++ b/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.lua @@ -1,70 +1,70 @@ ---- --- Author: Applevangelist --- Created: 13.05.2021 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Point.html --- --- # Description: --- --- This demo mission illustrates how to draw zones (circular and polygon) defined in the Mission Editor on the F10 map. --- Furthermore, it shows how to create cicles, rectangled, lines, arrows and text at arbitrary coordinates on the F10 map. --- --- # Guide: --- 1. Start the mission and join as Observer. --- 2. Zoom out and find all the different drawings. - --- Circular zone defined in the ME. -local circzone=ZONE:New("Circular Zone") - --- Draw the zone on the F10 map. Colors are taken from the ME settings. -circzone:DrawZone() - --- Quad-point zone defined in the ME. -local quadzone=ZONE:New("Quad Zone") --Core.Zone#ZONE_POLYGON_BASE - --- Draw the zone on the F10 map. Colors are taken from the ME settings. -quadzone:DrawZone() - --- After 500 seconds, the drawing is removed. -quadzone:UndrawZone(500) - - --- Polygon zone defined by waypoints of the group "Rotary-1". This surrounds a lake near Poti. -local polyzone=ZONE_POLYGON:NewFromGroupName("Rotary-1") - --- Draw the zone. Line color is green, fill color is turquoise with 50% alpha. Line type is dashed. -polyzone:DrawZone(-1, {0,1,0}, 1.0, {0,1,1}, 0.5, 2) - - --- Get coordinates of some airbases of the map. -local coordBatumi=AIRBASE:FindByName("Batumi"):GetCoordinate() -local coordKobuleti=AIRBASE:FindByName("Kobuleti"):GetCoordinate() -local coordGudauta=AIRBASE:FindByName(AIRBASE.Caucasus.Gudauta):GetCoordinate() -local coordKrymsk=AIRBASE:FindByName(AIRBASE.Caucasus.Krymsk):GetCoordinate() -local coordBeslan=AIRBASE:FindByName(AIRBASE.Caucasus.Beslan):GetCoordinate() -local coordNalchik=AIRBASE:FindByName(AIRBASE.Caucasus.Nalchik):GetCoordinate() -local coordMinVody=AIRBASE:FindByName(AIRBASE.Caucasus.Mineralnye_Vody):GetCoordinate() -local coordMozdok=AIRBASE:FindByName(AIRBASE.Caucasus.Mozdok):GetCoordinate() - - --- Draw a circle with 15 km radius around Krymsk Airbase. -coordKrymsk:CircleToAll(15000) - --- Draw a rectancle. First corner is Gudauta. Opposite corner is 30000 meters in heading 135 degrees. -coordGudauta:RectToAll(coordGudauta:Translate(30000, 135)) - --- Draw a quad-point shape. Corners are defined by the airbases. -coordBeslan:QuadToAll(coordNalchik, coordMinVody, coordMozdok, nil, {1,0,1}, nil, {0,1,0}, 0.8, 4) - --- Draw a blue line from Mozdok to Krymsk. -coordMozdok:LineToAll(coordKrymsk, nil, {0,0,1}) - --- Draw a green arrow from Batumi to a ship group called "Naval-1". This arrow is only visible to the blue coalition. -coordBatumi:ArrowToAll(GROUP:FindByName("Naval-1"):GetCoordinate(), 2, {0,1,0}) - --- Write text "Target Warehouse" at position of a static warehouse. -STATIC:FindByName("Static Warehouse-1"):GetCoordinate():TextToAll("Target Warehouse") +--- +-- Author: Applevangelist +-- Created: 13.05.2021 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Zone.html +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Point.html +-- +-- # Description: +-- +-- This demo mission illustrates how to draw zones (circular and polygon) defined in the Mission Editor on the F10 map. +-- Furthermore, it shows how to create cicles, rectangled, lines, arrows and text at arbitrary coordinates on the F10 map. +-- +-- # Guide: +-- 1. Start the mission and join as Observer. +-- 2. Zoom out and find all the different drawings. + +-- Circular zone defined in the ME. +local circzone=ZONE:New("Circular Zone") + +-- Draw the zone on the F10 map. Colors are taken from the ME settings. +circzone:DrawZone() + +-- Quad-point zone defined in the ME. +local quadzone=ZONE:New("Quad Zone") --Core.Zone#ZONE_POLYGON_BASE + +-- Draw the zone on the F10 map. Colors are taken from the ME settings. +quadzone:DrawZone() + +-- After 500 seconds, the drawing is removed. +quadzone:UndrawZone(500) + + +-- Polygon zone defined by waypoints of the group "Rotary-1". This surrounds a lake near Poti. +local polyzone=ZONE_POLYGON:NewFromGroupName("Rotary-1") + +-- Draw the zone. Line color is green, fill color is turquoise with 50% alpha. Line type is dashed. +polyzone:DrawZone(-1, {0,1,0}, 1.0, {0,1,1}, 0.5, 2) + + +-- Get coordinates of some airbases of the map. +local coordBatumi=AIRBASE:FindByName("Batumi"):GetCoordinate() +local coordKobuleti=AIRBASE:FindByName("Kobuleti"):GetCoordinate() +local coordGudauta=AIRBASE:FindByName(AIRBASE.Caucasus.Gudauta):GetCoordinate() +local coordKrymsk=AIRBASE:FindByName(AIRBASE.Caucasus.Krymsk):GetCoordinate() +local coordBeslan=AIRBASE:FindByName(AIRBASE.Caucasus.Beslan):GetCoordinate() +local coordNalchik=AIRBASE:FindByName(AIRBASE.Caucasus.Nalchik):GetCoordinate() +local coordMinVody=AIRBASE:FindByName(AIRBASE.Caucasus.Mineralnye_Vody):GetCoordinate() +local coordMozdok=AIRBASE:FindByName(AIRBASE.Caucasus.Mozdok):GetCoordinate() + + +-- Draw a circle with 15 km radius around Krymsk Airbase. +coordKrymsk:CircleToAll(15000) + +-- Draw a rectancle. First corner is Gudauta. Opposite corner is 30000 meters in heading 135 degrees. +coordGudauta:RectToAll(coordGudauta:Translate(30000, 135)) + +-- Draw a quad-point shape. Corners are defined by the airbases. +coordBeslan:QuadToAll(coordNalchik, coordMinVody, coordMozdok, nil, {1,0,1}, nil, {0,1,0}, 0.8, 4) + +-- Draw a blue line from Mozdok to Krymsk. +coordMozdok:LineToAll(coordKrymsk, nil, {0,0,1}) + +-- Draw a green arrow from Batumi to a ship group called "Naval-1". This arrow is only visible to the blue coalition. +coordBatumi:ArrowToAll(GROUP:FindByName("Naval-1"):GetCoordinate(), 2, {0,1,0}) + +-- Write text "Target Warehouse" at position of a static warehouse. +STATIC:FindByName("Static Warehouse-1"):GetCoordinate():TextToAll("Target Warehouse") diff --git a/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.miz b/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.miz index 9d443f3..76d1564 100644 Binary files a/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.miz and b/Core/Zone/520-Draw-Zones-and-Shapes/ZON-520-Draw-Zones-and-Shapes.miz differ diff --git a/Other/000-Template/000-Template.miz b/Other/000-Template/000-Template.miz index b4cd63e..c8e883a 100644 Binary files a/Other/000-Template/000-Template.miz and b/Other/000-Template/000-Template.miz differ diff --git a/Sound/MSRS/001-Play-internal-Sound-file/MSRS-001-Play-internal-Sound-file.miz b/Sound/MSRS/001-Play-internal-Sound-file/MSRS-001-Play-internal-Sound-file.miz index 9c9f6f8..5bb0a33 100644 Binary files a/Sound/MSRS/001-Play-internal-Sound-file/MSRS-001-Play-internal-Sound-file.miz and b/Sound/MSRS/001-Play-internal-Sound-file/MSRS-001-Play-internal-Sound-file.miz differ diff --git a/Sound/MSRS/002-Play-external-Sound-file/MSRS-002-Play-external-Sound-file.miz b/Sound/MSRS/002-Play-external-Sound-file/MSRS-002-Play-external-Sound-file.miz index 717d8aa..f082f55 100644 Binary files a/Sound/MSRS/002-Play-external-Sound-file/MSRS-002-Play-external-Sound-file.miz and b/Sound/MSRS/002-Play-external-Sound-file/MSRS-002-Play-external-Sound-file.miz differ diff --git a/Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.miz b/Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.miz index 7402494..23109af 100644 Binary files a/Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.miz and b/Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.miz differ diff --git a/Sound/MSRS/010-Windows-TTS-via-config-file/MSRS-010-Windows-TTS-via-config-file.miz b/Sound/MSRS/010-Windows-TTS-via-config-file/MSRS-010-Windows-TTS-via-config-file.miz index cdd3266..65c9199 100644 Binary files a/Sound/MSRS/010-Windows-TTS-via-config-file/MSRS-010-Windows-TTS-via-config-file.miz and b/Sound/MSRS/010-Windows-TTS-via-config-file/MSRS-010-Windows-TTS-via-config-file.miz differ diff --git a/Sound/Radio/000-Transmission-from-Static/RAD-000-Transmission-from-Static.miz b/Sound/Radio/000-Transmission-from-Static/RAD-000-Transmission-from-Static.miz index 2e32a09..5901681 100644 Binary files a/Sound/Radio/000-Transmission-from-Static/RAD-000-Transmission-from-Static.miz and b/Sound/Radio/000-Transmission-from-Static/RAD-000-Transmission-from-Static.miz differ diff --git a/Sound/Radio/001-Transmission-from-UNIT-or-GROUP/RAD-001-Transmission-from-UNIT-or-GROUP.miz b/Sound/Radio/001-Transmission-from-UNIT-or-GROUP/RAD-001-Transmission-from-UNIT-or-GROUP.miz index 4362091..94e4552 100644 Binary files a/Sound/Radio/001-Transmission-from-UNIT-or-GROUP/RAD-001-Transmission-from-UNIT-or-GROUP.miz and b/Sound/Radio/001-Transmission-from-UNIT-or-GROUP/RAD-001-Transmission-from-UNIT-or-GROUP.miz differ diff --git a/Sound/Radio/002-Transmission-Tips-and-Tricks/RAD-002-Transmission-Tips-and-Tricks.miz b/Sound/Radio/002-Transmission-Tips-and-Tricks/RAD-002-Transmission-Tips-and-Tricks.miz index 8197eb9..f214825 100644 Binary files a/Sound/Radio/002-Transmission-Tips-and-Tricks/RAD-002-Transmission-Tips-and-Tricks.miz and b/Sound/Radio/002-Transmission-Tips-and-Tricks/RAD-002-Transmission-Tips-and-Tricks.miz differ diff --git a/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.lua b/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.lua index e2e172a..7e148c0 100644 --- a/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.lua +++ b/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.lua @@ -1,33 +1,33 @@ ---- --- Author: FlightControl --- Created: 21.02.2017 --- Contributors: kaltokri --- Modified: 23.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html --- --- # Description: --- --- In this demo mission we will show how to use the method IsAlive() on group level. --- Two ground forces GROUPS are shooting each other (T-80 vs M2A2). --- --- # Guide: --- --- 1. Run the mission and check the messages. --- 2. If a unit is dead the returned value will be nil - --- Create Spawn Groups: -local GroupBlue = GROUP:FindByName( "Blue" ) -local GroupRed = GROUP:FindByName( "Red" ) -local GroupObserver = GROUP:FindByName( "Observer" ) - --- Start a scheduler to test every second if the groups are alive and post a status message. -local Schedule, ScheduleID = SCHEDULER:New( nil, - function( GroupBlue, GroupRed ) - local IsAliveBlue = GroupBlue:IsAlive() - local IsAliveRed = GroupRed:IsAlive() - - GroupObserver:MessageToAll( "IsAliveBlue=" .. tostring(IsAliveBlue) .. " ----- IsAliveRed=" .. tostring(IsAliveRed), 1 ) - end, { GroupBlue, GroupRed }, 1, 1 -) +--- +-- Author: FlightControl +-- Created: 21.02.2017 +-- Contributors: kaltokri +-- Modified: 23.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html +-- +-- # Description: +-- +-- In this demo mission we will show how to use the method IsAlive() on group level. +-- Two ground forces GROUPS are shooting each other (T-80 vs M2A2). +-- +-- # Guide: +-- +-- 1. Run the mission and check the messages. +-- 2. If a unit is dead the returned value will be nil + +-- Create Spawn Groups: +local GroupBlue = GROUP:FindByName( "Blue" ) +local GroupRed = GROUP:FindByName( "Red" ) +local GroupObserver = GROUP:FindByName( "Observer" ) + +-- Start a scheduler to test every second if the groups are alive and post a status message. +local Schedule, ScheduleID = SCHEDULER:New( nil, + function( GroupBlue, GroupRed ) + local IsAliveBlue = GroupBlue:IsAlive() + local IsAliveRed = GroupRed:IsAlive() + + GroupObserver:MessageToAll( "IsAliveBlue=" .. tostring(IsAliveBlue) .. " ----- IsAliveRed=" .. tostring(IsAliveRed), 1 ) + end, { GroupBlue, GroupRed }, 1, 1 +) diff --git a/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.miz b/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.miz index 687d028..dd5f1ec 100644 Binary files a/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.miz and b/Wrapper/Group/100-IsAlive/GRP-100-IsAlive.miz differ diff --git a/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.lua b/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.lua index 41eed7c..b6ad5f0 100644 --- a/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.lua +++ b/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.lua @@ -1,51 +1,51 @@ ---- --- Author: FlightControl --- Created: 20.10.2018 --- Contributors: kaltokri --- Modified: 24.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html --- --- # Description: --- --- In this mission one Ka-50 (HeliGroup) will attack a group of trucks. --- As you can see below the code to accomplish this is not trivial. --- But it is good way to understand the details of task assignment in DCS. --- A better way is to use new new Ops.Auftrag class. --- --- # Test cases: --- --- 1. Start the mission and watch the APC driving trough the zone. --- 2. A red smoke will be deployed within the zone. - --- Get objects of the groups we need: -local HeliGroup = GROUP:FindByName( "Helicopter" ) -local TargetGroup = GROUP:FindByName( "Targets" ) - --- Get all units of the target group -local TargetUnits = TargetGroup:GetUnits() - --- Create an empty list of tasks for the HeliGroup. -local HeliTasks = {} - --- Loop through all units of TargetGroup. --- #TargetUnits is the number of elements of TargetUnits. -for i = 1, #TargetUnits do - local TargetUnit = TargetGroup:GetUnit( i ) - -- Add an attack task to the HeliTasks table for each target unit. - HeliTasks[#HeliTasks+1] = HeliGroup:TaskAttackUnit( TargetUnit ) -end - --- As the last task add a function -HeliTasks[#HeliTasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) - --- This is a very simple function, which only prints only a message. --- But you can do very complex things in such a method. --- @param Wrapper.Group#GROUP HeliGroup -function _Resume( HeliGroup ) - HeliGroup:MessageToAll( "All tasks completed.", 10, "Info") -- Show an info message for 10 seconds. -end - --- Push the list with all tasks to the HeliGroup with a delay of 10 seconds. -HeliGroup:PushTask( HeliGroup:TaskCombo( HeliTasks ), 10 ) +--- +-- Author: FlightControl +-- Created: 20.10.2018 +-- Contributors: kaltokri +-- Modified: 24.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html +-- +-- # Description: +-- +-- In this mission one Ka-50 (HeliGroup) will attack a group of trucks. +-- As you can see below the code to accomplish this is not trivial. +-- But it is good way to understand the details of task assignment in DCS. +-- A better way is to use new new Ops.Auftrag class. +-- +-- # Test cases: +-- +-- 1. Start the mission and watch the APC driving trough the zone. +-- 2. A red smoke will be deployed within the zone. + +-- Get objects of the groups we need: +local HeliGroup = GROUP:FindByName( "Helicopter" ) +local TargetGroup = GROUP:FindByName( "Targets" ) + +-- Get all units of the target group +local TargetUnits = TargetGroup:GetUnits() + +-- Create an empty list of tasks for the HeliGroup. +local HeliTasks = {} + +-- Loop through all units of TargetGroup. +-- #TargetUnits is the number of elements of TargetUnits. +for i = 1, #TargetUnits do + local TargetUnit = TargetGroup:GetUnit( i ) + -- Add an attack task to the HeliTasks table for each target unit. + HeliTasks[#HeliTasks+1] = HeliGroup:TaskAttackUnit( TargetUnit ) +end + +-- As the last task add a function +HeliTasks[#HeliTasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) + +-- This is a very simple function, which only prints only a message. +-- But you can do very complex things in such a method. +-- @param Wrapper.Group#GROUP HeliGroup +function _Resume( HeliGroup ) + HeliGroup:MessageToAll( "All tasks completed.", 10, "Info") -- Show an info message for 10 seconds. +end + +-- Push the list with all tasks to the HeliGroup with a delay of 10 seconds. +HeliGroup:PushTask( HeliGroup:TaskCombo( HeliTasks ), 10 ) diff --git a/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.miz b/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.miz index c3a9500..948a5de 100644 Binary files a/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.miz and b/Wrapper/Group/101-TaskAttackUnit/GRP-101-TaskAttackUnit.miz differ diff --git a/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.lua b/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.lua index 13cab92..68e8d99 100644 --- a/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.lua +++ b/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.lua @@ -1,36 +1,36 @@ ---- --- Author: FlightControl --- Created: 20.10.2018 --- Contributors: kaltokri --- Modified: 24.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Point.html --- --- # Description: --- --- In this two planes will be spawned. --- The second one will follow the first one. --- --- # Guide: --- --- 1. Start the mission and watch the planes moving. - --- Create spawn objects from groups: -local SpawnPlane1 = SPAWN:New("Plane 1") -local SpawnPlane2 = SPAWN:New("Plane 2") - --- Spawn the groups into the world: -local GroupPlane1 = SpawnPlane1:Spawn() -local GroupPlane2 = SpawnPlane2:Spawn() - ---Create a task for Plane 2 (follow GroupPlane1 at Vec3 offset): -local PointVec3 = POINT_VEC3:New( 100, 0, -100 ) -- This is a Vec3 class. -local FollowDCSTask = GroupPlane2:TaskFollow( GroupPlane1, PointVec3:GetVec3() ) - --- Activate Task with 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. --- We use SetTask this time: -GroupPlane2:SetTask( FollowDCSTask, 1 ) +--- +-- Author: FlightControl +-- Created: 20.10.2018 +-- Contributors: kaltokri +-- Modified: 24.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Point.html +-- +-- # Description: +-- +-- In this two planes will be spawned. +-- The second one will follow the first one. +-- +-- # Guide: +-- +-- 1. Start the mission and watch the planes moving. + +-- Create spawn objects from groups: +local SpawnPlane1 = SPAWN:New("Plane 1") +local SpawnPlane2 = SPAWN:New("Plane 2") + +-- Spawn the groups into the world: +local GroupPlane1 = SpawnPlane1:Spawn() +local GroupPlane2 = SpawnPlane2:Spawn() + +--Create a task for Plane 2 (follow GroupPlane1 at Vec3 offset): +local PointVec3 = POINT_VEC3:New( 100, 0, -100 ) -- This is a Vec3 class. +local FollowDCSTask = GroupPlane2:TaskFollow( GroupPlane1, PointVec3:GetVec3() ) + +-- Activate Task with 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. +-- We use SetTask this time: +GroupPlane2:SetTask( FollowDCSTask, 1 ) diff --git a/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.miz b/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.miz index 6831542..6b9a1ed 100644 Binary files a/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.miz and b/Wrapper/Group/200-Follow-Group/GRP-200-Follow-Group.miz differ diff --git a/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.lua b/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.lua index 52dede4..fdb09aa 100644 --- a/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.lua +++ b/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.lua @@ -1,33 +1,33 @@ ---- --- Author: FlightControl --- Created: 20.10.2018 --- Contributors: kaltokri --- Modified: 24.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html --- --- # Description: --- --- In this mission one Ka-50 (HeliGroup) will start from a FARP. --- Normally it would fly a big polygon shaped patrol around the FARP. --- At the end it will land back on the FARP. --- But in the code below we change the route dynamically. --- So instead of flying to waypoint 2, it will fly to the last waypoint 7. --- --- # Guide: --- --- 1. Start the mission and watch the Ka-50 flying around. - --- Get a group object of the Ka-50: -HeliGroup = GROUP:FindByName( "Helicopter" ) - --- Route it 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, 7 ) - HeliGroup:SetCommand( CommandRTB ) - HeliGroup:MessageToAll("We lose fuel: RTB.", 20) - end, { HeliGroup }, 60 -) +--- +-- Author: FlightControl +-- Created: 20.10.2018 +-- Contributors: kaltokri +-- Modified: 24.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html +-- +-- # Description: +-- +-- In this mission one Ka-50 (HeliGroup) will start from a FARP. +-- Normally it would fly a big polygon shaped patrol around the FARP. +-- At the end it will land back on the FARP. +-- But in the code below we change the route dynamically. +-- So instead of flying to waypoint 2, it will fly to the last waypoint 7. +-- +-- # Guide: +-- +-- 1. Start the mission and watch the Ka-50 flying around. + +-- Get a group object of the Ka-50: +HeliGroup = GROUP:FindByName( "Helicopter" ) + +-- Route it 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, 7 ) + HeliGroup:SetCommand( CommandRTB ) + HeliGroup:MessageToAll("We lose fuel: RTB.", 20) + end, { HeliGroup }, 60 +) diff --git a/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.miz b/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.miz index 2e22f44..1de2f7f 100644 Binary files a/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.miz and b/Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.miz differ diff --git a/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.lua b/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.lua index f0c7230..52bc068 100644 --- a/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.lua +++ b/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.lua @@ -1,46 +1,46 @@ ---- --- Author: FlightControl --- Created: 25.03.2017 --- Contributors: kaltokri --- Modified: 24.02.2024 --- --- # Documentation: --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html --- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Scheduler.html --- --- # Description: --- --- A ground unit is moving. --- Using the command CommandStopRoute it will be stopped and starts moving again. --- --- # Guide: --- --- 1. Start the mission --- 2. Observe the group is moving --- 3. After 10 seconds it will stop. --- 4. After additional 10 seconds it will move again. --- 5. This will be repeated endless. - --- Function to stop movement. ---- @param Wrapper.Group#GROUP MyGroup -function StopMove( MyGroup ) - MyGroup:MessageToAll("StopMove") - local Command = MyGroup:CommandStopRoute( true ) - MyGroup:SetCommand(Command) -end - --- Function to start movement. ---- @param Wrapper.Group#GROUP MyGroup -function StartMove( MyGroup ) - MyGroup:MessageToAll("StartMove") - local Command = MyGroup:CommandStopRoute( false ) - MyGroup:SetCommand(Command) -end - --- Get an object of the group: -GroundGroup = GROUP:FindByName( "Ground" ) - --- Run two schedulers every 20 seconds, but with different start delays: -Scheduler = SCHEDULER:New( nil ) -ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 ) -- 10 seconds delay from mission start -ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 ) -- 20 seconds delay from mission start +--- +-- Author: FlightControl +-- Created: 25.03.2017 +-- Contributors: kaltokri +-- Modified: 24.02.2024 +-- +-- # Documentation: +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html +-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Scheduler.html +-- +-- # Description: +-- +-- A ground unit is moving. +-- Using the command CommandStopRoute it will be stopped and starts moving again. +-- +-- # Guide: +-- +-- 1. Start the mission +-- 2. Observe the group is moving +-- 3. After 10 seconds it will stop. +-- 4. After additional 10 seconds it will move again. +-- 5. This will be repeated endless. + +-- Function to stop movement. +--- @param Wrapper.Group#GROUP MyGroup +function StopMove( MyGroup ) + MyGroup:MessageToAll("StopMove") + local Command = MyGroup:CommandStopRoute( true ) + MyGroup:SetCommand(Command) +end + +-- Function to start movement. +--- @param Wrapper.Group#GROUP MyGroup +function StartMove( MyGroup ) + MyGroup:MessageToAll("StartMove") + local Command = MyGroup:CommandStopRoute( false ) + MyGroup:SetCommand(Command) +end + +-- Get an object of the group: +GroundGroup = GROUP:FindByName( "Ground" ) + +-- Run two schedulers every 20 seconds, but with different start delays: +Scheduler = SCHEDULER:New( nil ) +ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 ) -- 10 seconds delay from mission start +ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 ) -- 20 seconds delay from mission start diff --git a/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.miz b/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.miz index 45e135a..b457f9f 100644 Binary files a/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.miz and b/Wrapper/Group/310-Command-StopRoute/GRP-310-Command-StopRoute.miz differ