Jump to content

GetNewUnitID

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (GetNewUnitID – created via PowerShell script (2025-11-11T21:12:39Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetNewUnitID
Function Description: Generates and returns a unique unit ID by incrementing a persistent counter, ensuring no duplicate IDs are assigned across unit creations.
File Location: cmm.spawnFunctions.lua
Syntax: CMM.GetNewUnitID( )
Return Value: number
Parameters: Name Description
Example: local newID = CMM.GetNewUnitID()
Example Description: Retrieves a new unique unit ID for use in unit management, initializing the counter if not already set.
Related Functions:
Notes: