Migrated Core/Zone to new repo

This commit is contained in:
kaltokri 2024-02-24 22:46:01 +01:00
parent e7b3097a0d
commit c7b55f3f83
35 changed files with 0 additions and 659 deletions

View File

@ -1,32 +0,0 @@
---
-- Name: ZON-100 - Normal Zone
-- Author: FlightControl
-- Date Created: 21 Feb 2017
--
-- # Situation:
--
-- A ZONE has been defined, which boundaries are smoking.
-- 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. Observe the zone perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
ZoneA = ZONE:New( "Zone A" )
ZoneA:SmokeZone( SMOKECOLOR.White, 90 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,43 +0,0 @@
---
-- Name: ZON-101 - Normal Zone - Random Point
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- Three zones are defined.
-- 15 points are smoked in each zone.
-- 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: The zones perimeters are also smoked in white, so you can observe the random point placement.
-- Note: At each zone an vehicle is placed, so you can view the smoking in external view.
--
-- # Test cases:
--
-- 1. Observe smoking of Blue smoke in Zone 1.
-- 2. Observe smoking of Orange smoke in Zone 2.
-- 3. Observe smoking of Red smoke in Zone 3.
Zone1 = ZONE:New( "Zone 1" )
Zone2 = ZONE:New( "Zone 2" )
Zone3 = ZONE:New( "Zone 3" )
Zone1:SmokeZone( SMOKECOLOR.White, 18 )
Zone2:SmokeZone( SMOKECOLOR.White, 18 )
Zone3:SmokeZone( SMOKECOLOR.White, 18 )
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

View File

@ -1,33 +0,0 @@
---
-- Name: ZON-100 - Normal Zone
-- Author: FlightControl
-- Date Created: 21 Feb 2017
-- Updated: 27 Oct 2023
--
-- # Situation:
--
-- A ZONE has been defined, which boundaries are smoking.
-- 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. Observe the zone perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
ZoneA = ZONE:New( "Zone A" )
ZoneA:BoundZone( 90, country.id.CHINA, false )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,34 +0,0 @@
---
-- Name: SET-102 - Test SET_GROUP object against ZONE
-- Author: FlightControl
-- Date Created: 31 Mar 2017
--
-- # Situation:
--
-- A ZONE has been defined, and the SET_GROUP object is checked against the zone.
--
-- # Test cases:
--
-- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone.
-- 2. Observe the results of the functions.
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
Zone = ZONE:New( "Zone" )
SetGroupObject:ForEachGroupCompletelyInZone( Zone,
function( GroupObject )
GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } )
end )
SetGroupObject:ForEachGroupPartlyInZone( Zone,
function( GroupObject )
GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } )
end )
SetGroupObject:ForEachGroupNotInZone( Zone,
function( GroupObject )
GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } )
end )

View File

@ -1,24 +0,0 @@
---
-- Name: ZON-103 - Test if GROUP object is in ZONE
-- Author: FlightControl
-- Date Created: 31 Mar 2017
--
-- # Situation:
--
-- A ZONE has been defined, and it is checked if a GROUP object is within the zone.
--
-- # Test cases:
--
-- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone.
-- 2. Observe the results of the functions.
GroupObject = GROUP:FindByName( "Group Object" )
Zone = ZONE:New( "Zone" )
Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } )
Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } )
Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } )

View File

@ -1,34 +0,0 @@
---
-- Name: ZON-110 - ZONE declared in ME
-- Author: FlightControl
-- Date Created: 21 May 2018
--
-- # Situation:
--
-- A ZONE has been defined using the Mission Editor, which boundaries are smoking.
-- 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. Observe the zone perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside" )
GroupOutside = GROUP:FindByName( "Test Outside" )
-- Now I can find the zone instead of doing ZONE:New, because the ZONE object is already in MOOSE.
--ZoneA = ZONE:New( "Zone A" )
ZoneA = ZONE:FindByName( "Zone A" )
ZoneA:SmokeZone( SMOKECOLOR.White, 30 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,22 +0,0 @@
---
-- Name: ZON-190 - Return SCENERY objects in Zone
-- Author: FlightControl
-- Date Created: 08 Oct 2017
--
-- # Situation:
--
-- # Test cases:
--
Zone = ZONE:New( "Zone" )
Zone:Scan( Object.Category.SCENERY )
for SceneryTypeName, SceneryData in pairs( Zone: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

View File

@ -1,36 +0,0 @@
---
-- Name: ZON-200 - Group Zone
-- Author: FlightControl
-- Date Created: 21 Feb 2017
--
-- # Situation:
--
-- A ZONE_GROUP has been defined, which boundaries are smoking.
-- 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. Observe the zone perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
Tank = GROUP:FindByName( "Tank" )
ZoneA = ZONE_GROUP:New( "Zone A", Tank, 100 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )
TankZoneColoring = SCHEDULER:New( nil,
function()
ZoneA:FlareZone( FLARECOLOR.White, 90, 60 )
end,
{}, 0, 5 )

View File

@ -1,43 +0,0 @@
---
-- Name: ZON-201 - Group Zone - Random Point
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- Three zones are defined.
-- 15 points are smoked in each zone.
-- 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: The zones perimeters are also smoked in white, so you can observe the random point placement.
-- Note: At each zone an vehicle is placed, so you can view the smoking in external view.
--
-- # Test cases:
--
-- 1. Observe smoking of Blue smoke in Zone 1.
-- 2. Observe smoking of Orange smoke in Zone 2.
-- 3. Observe smoking of Red smoke in Zone 3.
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 )
Zone1:SmokeZone( SMOKECOLOR.White, 18 )
Zone2:SmokeZone( SMOKECOLOR.White, 18 )
Zone3:SmokeZone( SMOKECOLOR.White, 18 )
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

View File

@ -1,36 +0,0 @@
---
-- Name: ZON-300 - Unit Zone
-- Author: FlightControl
-- Date Created: 21 Feb 2017
--
-- # Situation:
--
-- A ZONE_UNIT has been defined, which boundaries are smoking.
-- 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. Observe the zone perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
Tank = UNIT:FindByName( "Tank" )
ZoneA = ZONE_UNIT:New( "Zone A", Tank, 100 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )
TankZoneColoring = SCHEDULER:New( nil,
function()
ZoneA:FlareZone( FLARECOLOR.White, 90, 60 )
end,
{}, 0, 5 )

View File

@ -1,43 +0,0 @@
---
-- Name: ZON-301 - Unit Zone - Random Point
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- Three zones are defined.
-- 15 points are smoked in each zone.
-- 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: The zones perimeters are also smoked in white, so you can observe the random point placement.
-- Note: At each zone an vehicle is placed, so you can view the smoking in external view.
--
-- # Test cases:
--
-- 1. Observe smoking of Blue smoke in Zone 1.
-- 2. Observe smoking of Orange smoke in Zone 2.
-- 3. Observe smoking of Red smoke in Zone 3.
Zone1 = ZONE_UNIT:New( "Zone 1", UNIT:FindByName( "Zone 1" ), 300 )
Zone2 = ZONE_UNIT:New( "Zone 2", UNIT:FindByName( "Zone 2" ), 300 )
Zone3 = ZONE_UNIT:New( "Zone 3", UNIT:FindByName( "Zone 3" ), 300 )
Zone1:SmokeZone( SMOKECOLOR.White, 18 )
Zone2:SmokeZone( SMOKECOLOR.White, 18 )
Zone3:SmokeZone( SMOKECOLOR.White, 18 )
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

View File

@ -1,32 +0,0 @@
---
-- Name: ZON-400 - Radius Zone
-- Author: FlightControl
-- Date Created: 21 Feb 2017
--
-- # Situation:
--
-- A ZONE_RADIUS has been defined, which boundaries are smoking.
-- 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. Observe the polygon perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
House = STATIC:FindByName( "House" )
ZoneA = ZONE_RADIUS:New( "Zone A", House:GetVec2(), 300 )
ZoneA:SmokeZone( SMOKECOLOR.White, 90 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,48 +0,0 @@
---
-- Name: ZON-401 - Radius Zone - Random Point
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- Three zones are defined.
-- 15 points are smoked in each zone.
-- 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: The zones perimeters are also smoked in white, so you can observe the random point placement.
-- Note: At each zone an vehicle is placed, so you can view the smoking in external view.
--
-- # Test cases:
--
-- 1. Observe smoking of Blue smoke in Zone 1.
-- 2. Observe smoking of Orange smoke in Zone 2.
-- 3. Observe smoking of Red smoke in Zone 3.
Unit1 = UNIT:FindByName( "Zone 1" )
Unit2 = UNIT:FindByName( "Zone 2" )
Unit3 = UNIT:FindByName( "Zone 3" )
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 )
Zone1:SmokeZone( SMOKECOLOR.White, 18 )
Zone2:SmokeZone( SMOKECOLOR.White, 18 )
Zone3:SmokeZone( SMOKECOLOR.White, 18 )
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

View File

@ -1,33 +0,0 @@
---
-- Name: ZON-500 - Polygon Zone
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- A ZONE_POLYGON has been defined, which boundaries are smoking.
-- 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. Observe the polygon perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
GroupPolygon = GROUP:FindByName( "Polygon A" )
PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon )
PolygonZone:SmokeZone( SMOKECOLOR.White, 20 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 )
if GroupInside:IsCompletelyInZone( PolygonZone ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,43 +0,0 @@
---
-- Name: ZON-501 - Polygon Zone - Random Point
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- Three zones are defined.
-- 15 points are smoked in each zone.
-- 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: The zones perimeters are also smoked in white, so you can observe the random point placement.
-- Note: At each zone an vehicle is placed, so you can view the smoking in external view.
--
-- # Test cases:
--
-- 1. Observe smoking of Blue smoke in Zone 1.
-- 2. Observe smoking of Orange smoke in Zone 2.
-- 3. Observe smoking of Red smoke in Zone 3.
Zone1 = ZONE_POLYGON:New( "Zone 1", GROUP:FindByName( "Zone 1" ) )
Zone2 = ZONE_POLYGON:New( "Zone 2", GROUP:FindByName( "Zone 2" ) )
Zone3 = ZONE_POLYGON:New( "Zone 3", GROUP:FindByName( "Zone 3" ) )
Zone1:SmokeZone( SMOKECOLOR.White, 4 )
Zone2:SmokeZone( SMOKECOLOR.White, 4 )
Zone3:SmokeZone( SMOKECOLOR.White, 4 )
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

View File

@ -1,33 +0,0 @@
---
-- Name: ZON-502 - Polygon Zone Boundary
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- A ZONE_POLYGON has been defined, which boundaries are tires.
-- 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. Observe the polygon perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
GroupPolygon = GROUP:FindByName( "Polygon A" )
PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon )
PolygonZone:BoundZone()
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 )
if GroupInside:IsCompletelyInZone( PolygonZone ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,32 +0,0 @@
---
-- Name: ZON-510 - ZONE_POLYGON declared in ME
-- Author: FlightControl
-- Date Created: 21 May 2018
--
-- # Situation:
--
-- A ZONE_POLYGON has been defined, within the mission editor using ~ZONE_POLYGON in the group name.
-- Its boundaries are smoking.
-- 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. Observe the polygon perimeter smoke.
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
PolygonZone = ZONE_POLYGON:FindByName( "Polygon A" )
PolygonZone:SmokeZone( SMOKECOLOR.White, 10 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 )
if GroupInside:IsCompletelyInZone( PolygonZone ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@ -1,58 +0,0 @@
---
-- 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.
---
-- 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 600 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")