FindNearestGroup: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) FindNearestGroup – created via PowerShell script (2025-11-11T21:12:10Z) Tag: Recreated |
Ozdeadmeat (talk | contribs) m FindNearestGroup – created via PowerShell script (2026-06-24T22:26:40Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= FindNearestGroup|fDescription= Returns the nearest group to a given position, optionally filtered by coalition or group category.-- TODO Function incomplete|parentFile= cmm.DCSFunctions.lua|syntax= CMM.FindNearestGroup(Position <TBL>, CoalitionID <number|nil>, CategoryID <number|nil>)|return= table or nil|returnDesc= The nearest group table, or nil if none found|example= CMM.FindNearestGroup({x=0,y=0,z=0}, 1, 2)|exampleDesc= 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= |note= |envType= CMM|par1= table position|reqType1= table|reqName1= position|desc1= vec3 position to search from|par2= number or nil | {{Template:FunctionInfo|fName= FindNearestGroup|fDescription= Returns the nearest group to a given position, optionally filtered by coalition or group category.-- TODO Function incomplete|parentFile= cmm.DCSFunctions.lua|syntax= CMM.FindNearestGroup(Position <TBL>, CoalitionID <number|nil>, CategoryID <number|nil>)|return= table or nil|returnDesc= The nearest group table, or nil if none found|example= CMM.FindNearestGroup({x=0,y=0,z=0}, 1, 2)|exampleDesc= 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= |note= |envType= CMM|par1= table position|reqType1= table|reqName1= position|desc1= vec3 position to search from|par2= number or nil radius|optType2= number or nil|optName2= radius|desc2= radius in meters to limit the search (default is 2500m)}} | ||
Latest revision as of 12:26, 24 June 2026
| 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 radius ) | |
| Return Value: | table or nil | |
| Parameters: | Name | Description |
| position | vec3 position to search from | |
| radius | radius in meters to limit the search (default is 2500m) | |
| 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: | ||