Fixed #614 - Implemented an implementation with or without {}....

See documentation of SetBorderZone.
This commit is contained in:
FlightControl
2017-07-12 20:42:06 +02:00
parent 60681d7e23
commit c1bee3a9b0
15 changed files with 133 additions and 98 deletions
+11 -3
View File
@@ -1047,7 +1047,7 @@ But you can also define other zone types instead, like moving zones.</p>
-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
-- Any enemy crossing this border will be engaged.
CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
A2ADispatcher:SetBorderZone( { CCCPBorderZone } )
A2ADispatcher:SetBorderZone( CCCPBorderZone )
-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly
-- without an assignment within 100km radius from a detected target, will engage that target.
@@ -2523,7 +2523,7 @@ If a hot war is chosen then <strong>no borders</strong> actually need to be defi
<li>
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> BorderZone </em></code>:
An object derived from ZONE_BASE, that defines a zone between</p>
An object derived from ZONE<em>BASE, or a list of objects derived from ZONE</em>BASE.</p>
</li>
</ul>
@@ -2534,9 +2534,17 @@ An object derived from ZONE_BASE, that defines a zone between</p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set a polygon zone as the border for the A2A dispatcher.
-- Set one ZONE_POLYGON object as the border for the A2A dispatcher.
local BorderZone = ZONE_POLYGON( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -- The GROUP object is a late activate helicopter unit.
Dispatcher:SetBorderZone( BorderZone )
or
-- Set two ZONE_POLYGON objects as the border for the A2A dispatcher.
local BorderZone1 = ZONE_POLYGON( "CCCP Border1", GROUP:FindByName( "CCCP Border1" ) ) -- The GROUP object is a late activate helicopter unit.
local BorderZone2 = ZONE_POLYGON( "CCCP Border2", GROUP:FindByName( "CCCP Border2" ) ) -- The GROUP object is a late activate helicopter unit.
Dispatcher:SetBorderZone( { BorderZone1, BorderZone2 } )
</code></pre>
</dd>