GetGroundUnits
Appearance
| 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 |
| Coal | Coalition identifier – 1 for RED, 2 for BLUE, or 3 (default) for both. | |
| Debug | When 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: | ||