GetCoalitionGroundInRange: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) GetCoalitionGroundInRange – created via PowerShell script (2025-11-11T21:12:11Z) Tag: Recreated |
Ozdeadmeat (talk | contribs) m GetCoalitionGroundInRange – created via PowerShell script (2026-06-24T22:26:41Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= GetCoalitionGroundInRange|fDescription= Returns a table of ground units within a specified range of a given position and coalition.|parentFile= cmm.DCSFunctions.lua|syntax= CMM.GetCoalitionGroundInRange(Position <TBL>, Coalition <number>, Range <number>)|return= table|returnDesc= Returns a table of ground units within the specified range and coalition|example= CMM.GetCoalitionGroundInRange({x=0,y=0,z=0}, 1, 1000)|exampleDesc= 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= |note= --TODO Function is in MVP state, needs finalizing|envType= CMM|par1= table Position|reqType1= table|reqName1= Position|desc1= vec3 position to search from|par2= number Coalition|reqType2= number|reqName2= Coalition|desc2= Coalition ID (0=NEUTRAL, 1=RED, 2=BLUE)|par3= number Range|reqType3= number|reqName3= Range|desc3= Range in meters; capped at 1500 meters if greater}} | {{Template:FunctionInfo|fName= GetCoalitionGroundInRange|fDescription= Returns a table of ground units within a specified range of a given position and coalition.|parentFile= cmm.DCSFunctions.lua|syntax= CMM.GetCoalitionGroundInRange(Position <TBL>, Coalition <number>, Range <number>)|return= table or nil|returnDesc= Returns a table of ground units within the specified range and coalition|example= CMM.GetCoalitionGroundInRange({x=0,y=0,z=0}, 1, 1000)|exampleDesc= 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= |note= --TODO Function is in MVP state, needs finalizing|envType= CMM|par1= table Position|reqType1= table|reqName1= Position|desc1= vec3 position to search from|par2= number Coalition|reqType2= number|reqName2= Coalition|desc2= Coalition ID (0=NEUTRAL, 1=RED, 2=BLUE)|par3= number Range|reqType3= number|reqName3= Range|desc3= Range in meters; capped at 1500 meters if greater}} | ||
Latest revision as of 12:26, 24 June 2026
| 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 or nil | |
| 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 | |