mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2026-08-23 02:08:06 +00:00
Add files via upload
This commit is contained in:
@@ -1,32 +1,31 @@
|
|||||||
---
|
---
|
||||||
-- Name: ZON-400 - Radius Zone
|
-- Name: ZON-400 - Radius Zone
|
||||||
-- Author: FlightControl
|
-- Author: FlightControl
|
||||||
-- Date Created: 21 Feb 2017
|
-- Date Created: 21 Feb 2017
|
||||||
--
|
--
|
||||||
-- # Situation:
|
-- # Situation:
|
||||||
--
|
--
|
||||||
-- A ZONE_RADIUS has been defined, which boundaries are smoking.
|
-- A ZONE_RADIUS has been defined, which boundaries are smoking.
|
||||||
-- A vehicle is driving through the zone perimeters.
|
-- 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.
|
-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location.
|
||||||
--
|
--
|
||||||
-- # Test cases:
|
-- # Test cases:
|
||||||
--
|
--
|
||||||
-- 1. Observe the polygon perimeter smoke.
|
-- 1. Observe the polygon perimeter smoke.
|
||||||
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
|
-- 2. Observe the vehicle smoking a red smoke when driving through the zone.
|
||||||
|
|
||||||
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
||||||
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
||||||
|
|
||||||
House = STATIC:FindByName( "House" )
|
House = STATIC:FindByName( "House" )
|
||||||
ZoneA = ZONE_RADIUS:New( "Zone A", House:GetVec2(), 300 )
|
ZoneA = ZONE_RADIUS:New( "Zone A", House:GetVec2(), 300 )
|
||||||
ZoneA:SmokeZone( SMOKECOLOR.White, 90 )
|
ZoneA:SmokeZone(SMOKECOLOR.White,90)
|
||||||
|
|
||||||
Messager = SCHEDULER:New( nil,
|
Messager = SCHEDULER:New( nil,
|
||||||
function()
|
function()
|
||||||
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
|
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
|
||||||
if GroupInside:IsCompletelyInZone( ZoneA ) then
|
if GroupInside:IsCompletelyInZone( ZoneA ) then
|
||||||
GroupInside:GetUnit(1):SmokeRed()
|
GroupInside:GetUnit(1):SmokeRed()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{}, 0, 1 )
|
{}, 0, 1 )
|
||||||
|
|
||||||
Binary file not shown.
Reference in New Issue
Block a user