diff --git a/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua index c73a6360ea..eb75ca44ef 100644 --- a/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua +++ b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua @@ -1,32 +1,31 @@ ---- --- 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 ) - +--- +-- 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 ) \ No newline at end of file diff --git a/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz index d7d7c7c2a3..6d190304ef 100644 Binary files a/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz and b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz differ