Jump to content

GetCoalitionGroundInRange

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetCoalitionGroundInRange
Function Description: Returns a table of ground units within a specified range of a given position and coalition.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetCoalitionGroundInRange( table Position , number Coalition , number Range )
Return Value: table
Parameters: Name Description
Positionvec3 position to search from
CoalitionCoalition ID (0=NEUTRAL, 1=RED, 2=BLUE)
RangeRange in meters; capped at 1500 meters if greater
Example: CMM.GetCoalitionGroundInRange({x=0,y=0,z=0}, 1, 1000)
Example Description: Finds all ground units belonging to the specified coalition that are within the given range of the position. Returns an empty table if no units are found or if arguments are invalid. Range is limited to a maximum of 1500 meters.
Related Functions:
Notes: --TODO Function is in MVP state, needs finalizing