MIST GetNextGroupId

From DCS World Wiki - Hoggitworld.com


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