First test mission with ZONE_POLYGON working!

This commit is contained in:
FlightControl
2016-06-05 00:03:27 +02:00
parent 2ac9e76f5c
commit d8790ad2f1
10 changed files with 1188 additions and 34729 deletions

View File

@@ -0,0 +1,27 @@
Include.File( "Zone" )
Include.File( "Group" )
Include.File( "Scheduler" )
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
local GroupPolygon = GROUP:FindByName( "Polygon A" )
local PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon )
local function Message()
end
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 0.5 )
if GroupInside:IsCompletelyInZone( PolygonZone ) then
GroupInside:GetUnit(1):SmokeWhite()
end
end,
{}, 0, 0.5 )