Difference between revisions of "MIST GetNextGroupId"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.getNextGroupId| |vNum = Mist 3.3 |desc= Returns the next unused groupId for use with spawning units via coalition.addGroup(). This function...")
 
(No difference)

Latest revision as of 06:42, 12 April 2018


mist.getNextGroupId

Added with: Mist 3.3
Description
Returns the next unused groupId for use with spawning units via coalition.addGroup(). This function automatically iterates the global value mist.nextGroupId.
Syntax
number mist.getNextGroupId(nothing nothing )
Valid Input Values:
nothing is required
Return value:
number
Return example:
29
Usage Examples:

do

local newGroup = {}
newGroup.groupId = mist.getNextGroupId()

end

Notes:
Iterates from the highest groupId from the mission file. The nextGroupId is also accessible globally via mist.nextGroupId. If you access it via the global variable it is recommended to iterate it yourself. All groups spawned by mist.dynAdd have a groupId starting at 7000.

The intention for this function is to provide easy access to a next available groupId if you prefer using coalition.addGroup() instead of mist.dynAdd().

Related Functions
dynAdd, dynAddStatic, groupTableCheck, getNextUnitId, getNextGroupId, respawnGroup, respawnInZone, cloneGroup, cloneInZone, teleportGroup, teleportInZone, teleportToPoint, spawnRandomizedGroup

Scripting Engine

MIST Root Page