Jump to content

GetGroundUnits

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (GetGroundUnits – created via PowerShell script (2025-11-11T21:12:07Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetGroundUnits
Function Description: Returns a table of all ground units belonging to the specified coalition (1 = RED, 2 = BLUE, 3 = ALL). If Debug is true, a log entry with the unit count(s) is written.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetGroundUnits( number Coal , boolean or nil Debug )
Return Value: table
Parameters: Name Description
CoalCoalition identifier – 1 for RED, 2 for BLUE, or 3 (default) for both.
DebugWhen true, writes a debug message with the counts of units returned.
Example: local allUnits = CMM.GetGroundUnits(3, true)
Example Description: Gets every ground unit while enabling debug output that reports how many units were found for each coalition.
Related Functions:
Notes: