<?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_getNextUnitId</id>
		<title>MIST getNextUnitId - 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_getNextUnitId"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_getNextUnitId&amp;action=history"/>
		<updated>2026-04-29T23:09:20Z</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_getNextUnitId&amp;diff=781&amp;oldid=prev</id>
		<title>Grimes: Created page with &quot;{{Mission Scripting  |fName= mist.getNextUnitId|  |vNum = Mist 3.3  |desc= Returns the next unused unitId for use with spawning units via coalition.addGroup(). This function a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_getNextUnitId&amp;diff=781&amp;oldid=prev"/>
				<updated>2018-04-12T06:40:54Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Mission Scripting  |fName= mist.getNextUnitId|  |vNum = Mist 3.3  |desc= Returns the next unused unitId for use with spawning units via coalition.addGroup(). This function a...&amp;quot;&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.getNextUnitId|&lt;br /&gt;
&lt;br /&gt;
|vNum = Mist 3.3&lt;br /&gt;
&lt;br /&gt;
|desc= Returns the next unused unitId for use with spawning units via coalition.addGroup(). This function automatically iterates the global value mist.nextUnitId.|&lt;br /&gt;
&lt;br /&gt;
|rtnType= number&lt;br /&gt;
&lt;br /&gt;
|reqType1= nothing&lt;br /&gt;
&lt;br /&gt;
|reqName1= nothing&lt;br /&gt;
&lt;br /&gt;
|reqType2=&lt;br /&gt;
&lt;br /&gt;
|optType1= &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|varExamples= nothing is required&lt;br /&gt;
&lt;br /&gt;
|rtnExamples= 29&lt;br /&gt;
&lt;br /&gt;
|example= &amp;lt;code&amp;gt;&lt;br /&gt;
do&lt;br /&gt;
:local newGroup = {}&lt;br /&gt;
&lt;br /&gt;
:newGroup.units = {}&lt;br /&gt;
:for i = 1, 6 do&lt;br /&gt;
:: newGroup.units[i] = {}&lt;br /&gt;
:: newGroup.units[i].unitId = mist.getNextUnitId()&lt;br /&gt;
&lt;br /&gt;
:end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|notes= Iterates from the highest unitId from the mission file. The nextUnitId is also accessible globally via mist.nextUnitId. If you access it via the global variable it is recommended to iterate it yourself. All groups spawned by mist.dynAdd have a unitId starting at 7000.&lt;br /&gt;
&lt;br /&gt;
The intention for this function is to provide easy access to a next available unitId if you prefer using coalition.addGroup() instead of mist.dynAdd(). &lt;br /&gt;
&lt;br /&gt;
|funcs= {{listOfMistDynAddFuncs}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
[[Category:MIST|getNextUnitId]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>