<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=MIST_units_in_polygon</id>
		<title>MIST units in polygon - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=MIST_units_in_polygon"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_units_in_polygon&amp;action=history"/>
		<updated>2026-04-24T15:35:23Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.hoggitworld.com/index.php?title=MIST_units_in_polygon&amp;diff=14594&amp;oldid=prev</id>
		<title>Grimes at 08:58, 8 November 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_units_in_polygon&amp;diff=14594&amp;oldid=prev"/>
				<updated>2023-11-08T08:58:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:58, 8 November 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot; &gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r1D= is a UnitNameTable- a table of unit names that follow a special set of rules (see the entry &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r1D= is a UnitNameTable- a table of unit names that follow a special set of rules (see the entry &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;on UnitNameTables). &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;on UnitNameTables). &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r2D= is a table of map points that defines the polygon shape (indexed numerically). See [[pointInPolygon]] for a good explanation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r2D= is a table of map points that defines the polygon shape (indexed numerically). See [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MIST_pointInPolygon|&lt;/ins&gt;pointInPolygon]] for a good explanation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r3D= is the flag number that will be set true if the conditions are met&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r3D= is the flag number that will be set true if the conditions are met&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r4D= is the radius, in meters, of all the zones drawn around each unit in zone_units. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|r4D= is the radius, in meters, of all the zones drawn around each unit in zone_units. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	<entry>
		<id>https://wiki.hoggitworld.com/index.php?title=MIST_units_in_polygon&amp;diff=1064&amp;oldid=prev</id>
		<title>Grimes at 23:12, 13 April 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_units_in_polygon&amp;diff=1064&amp;oldid=prev"/>
				<updated>2018-04-13T23:12:23Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Mission Scripting&lt;br /&gt;
&lt;br /&gt;
|fName= mist.flagFunc.units_in_polygon&lt;br /&gt;
&lt;br /&gt;
|vNum = Mist 1.0&lt;br /&gt;
&lt;br /&gt;
|desc= Sets a flag true when the a required number of units are inside of the specified polygon zone.&lt;br /&gt;
&lt;br /&gt;
|rtnType= nothing&lt;br /&gt;
&lt;br /&gt;
|reqType1= table&lt;br /&gt;
&lt;br /&gt;
|reqName1= vars&lt;br /&gt;
&lt;br /&gt;
|reqType2= &lt;br /&gt;
&lt;br /&gt;
|optType1= &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|varExamples= {{varsTable&lt;br /&gt;
&lt;br /&gt;
|r1T= UnitNameTable&lt;br /&gt;
|r1N= units&lt;br /&gt;
&lt;br /&gt;
|r2T= table&lt;br /&gt;
|r2N= zone&lt;br /&gt;
&lt;br /&gt;
|r3T= number/string&lt;br /&gt;
|r3N= flag&lt;br /&gt;
&lt;br /&gt;
|r4N= &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|o1T= number/string&lt;br /&gt;
|o1N= stopFlag&lt;br /&gt;
&lt;br /&gt;
|o2T= number&lt;br /&gt;
|o2N= maxalt&lt;br /&gt;
&lt;br /&gt;
|o3T= number&lt;br /&gt;
|o3N= req_num&lt;br /&gt;
&lt;br /&gt;
|o4T= number&lt;br /&gt;
|o4N= interval&lt;br /&gt;
&lt;br /&gt;
|o5T= boolean&lt;br /&gt;
|o5N= toggle&lt;br /&gt;
&lt;br /&gt;
|o6T= table&lt;br /&gt;
|o6N= unitTableDef&lt;br /&gt;
&lt;br /&gt;
|o7N=&lt;br /&gt;
&lt;br /&gt;
|r1D= is a UnitNameTable- a table of unit names that follow a special set of rules (see the entry &lt;br /&gt;
on UnitNameTables). &lt;br /&gt;
|r2D= is a table of map points that defines the polygon shape (indexed numerically). See [[pointInPolygon]] for a good explanation.&lt;br /&gt;
|r3D= is the flag number that will be set true if the conditions are met&lt;br /&gt;
|r4D= is the radius, in meters, of all the zones drawn around each unit in zone_units. &lt;br /&gt;
|r5D=&lt;br /&gt;
|r6D=&lt;br /&gt;
&lt;br /&gt;
|o1D=  is an optional variable that allows you to specify a flag number that, if set true, will &lt;br /&gt;
stop the process.   &lt;br /&gt;
|o2D= is an optional variable that allows you to a specify a maximum altitude (above sea level) &lt;br /&gt;
for the polygon zone. Altitude above ground level will likely be added in a future version of &lt;br /&gt;
Mist. &lt;br /&gt;
|o3D= is an optional variable that allows you to specify the minimum number of units that &lt;br /&gt;
must be in one (or more) of the zones before flag is set true. &amp;lt;ins&amp;gt; If req_num is not specified, it &lt;br /&gt;
defaults to 1. &amp;lt;/ins&amp;gt;&lt;br /&gt;
|o4D= is an optional variable that allows you to specify how often (in seconds) the in-zone &lt;br /&gt;
condition is checked; for lots of units in lots of zones (like hundreds of units in hundreds of &lt;br /&gt;
different zones), it might be desirable to increase the interval to save computer processing &lt;br /&gt;
time. &amp;lt;ins&amp;gt; If not specified, interval defaults to 1 &amp;lt;/ins&amp;gt;&lt;br /&gt;
|o5D=  is an optional variable that if present will switch the flag value to false when the &lt;br /&gt;
required conditions are not met.  If not specified toggle defaults to false.  &lt;br /&gt;
|o6D= is an optional table containing the a [[unitNameTables]] definition. If present this value will be used to modify the units checked if new units are dynamically added to the mission. This value and capability is also used if the units variable is given a unitNameTables definition.   &lt;br /&gt;
|o7D=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|rtnExamples= nothing&lt;br /&gt;
&lt;br /&gt;
|example= &amp;lt;code&amp;gt;&lt;br /&gt;
do&lt;br /&gt;
  mist.flagFunc.units_in_polygon{ &lt;br /&gt;
    units = {'[blue][vehicle]'}, &lt;br /&gt;
    zone = mist.getGroupPoints('forest1'), &lt;br /&gt;
    flag = 11 &lt;br /&gt;
  }&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|notes= Once this function is run, &amp;lt;ins&amp;gt;it will start a continuously evaluated process &amp;lt;/ins&amp;gt;that will set flag flag true &lt;br /&gt;
once units listed in units are inside the polygon zone defined by the map points listed in zone. &lt;br /&gt;
This process will keep running, and flag will keep being set true as long as the unit(s)-in-zone &lt;br /&gt;
conditions persist, unless the process is stopped with stopflag.&lt;br /&gt;
&lt;br /&gt;
'''Mist 3.5''' allows for strings to be used to define flags. &lt;br /&gt;
&lt;br /&gt;
'''Mist 4.0''' has modified this function to better adapt to added any units dynamically spawned into the mission. If units or zone_units is passed as a unitNameTable definition table then that information will be added to the optional variables unitTableDef and zUnitTableDef. Once present there will be a check whenever dynamically added units are spawned into the mission, if those units fit into the unitNameTable definition then they will also be checked by the function.&lt;br /&gt;
 &lt;br /&gt;
|funcs= {{listOfMistFlagFuncs}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
[[Category: MIST|units_in_polygon]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>