GetCoalitionGroundInRange
Appearance
| 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 |
| Position | vec3 position to search from | |
| Coalition | Coalition ID (0=NEUTRAL, 1=RED, 2=BLUE) | |
| Range | Range 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 | |