FindNearestGroup
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | FindNearestGroup | |
| Function Description: | Returns the nearest group to a given position, optionally filtered by coalition or group category.-- TODO Function incomplete | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.FindNearestGroup( table position , number or nil coalitionID , number or nil categoryID ) | |
| Return Value: | table or nil | |
| Parameters: | Name | Description |
| position | vec3 position to search from | |
| coalitionID | Optional coalition ID to limit search (0=NEUTRAL, 1=RED, 2=BLUE) | |
| categoryID | Optional group category (0=AIRPLANE, 1=HELICOPTER, 2=GROUND, 3=SHIP, 4=TRAIN) | |
| Example: | CMM.FindNearestGroup({x=0,y=0,z=0}, 1, 2) | |
| Example Description: | Returns the nearest group to the specified position, filtered by coalition and group type. Returns nil if no group is found within the search radius. | |
| Related Functions: | ||
| Notes: | ||