GetNewUnitID
Appearance
| 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: | ||