mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
- MESSAGE class finished and now properly documented. Changed New() function API. - Reworked Include.File lines. No Include.File line anymore in the Modules. All included in Moose.lua for dynamic loading.
22 lines
601 B
Lua
22 lines
601 B
Lua
|
|
|
|
|
|
|
|
|
|
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 ):SmokeZone( POINT_VEC3.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 )
|
|
|