FindNearestAirbase: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) m FindNearestAirbase – created via PowerShell script (2026-01-01T06:02:35Z) |
Ozdeadmeat (talk | contribs) m FindNearestAirbase – created via PowerShell script (2026-02-11T01:15:37Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= FindNearestAirbase|fDescription= |parentFile= cmm.AirBaseFunctions.lua|syntax= CMM.FindNearestAirbase(<vec3>, <coal>)|return= table or nil,table|returnDesc= Returns two tables, first one is the Airbase object, second is a table with keys distance (meters), name, and id; or nil if the input is invalid.|example= CMM.FindNearestAirbase({x=0, y=0, z=1000}, 1)|exampleDesc= Finds the closest airbase to the given point within the specified coalition (or any if omitted) and logs the result.|related= |note= |envType= CMM|par1= table vec3|reqType1= table|reqName1= vec3|desc1= A 3‑D position vector ({x, y, z}) used as the reference point.|par2= number or nil coal|optType2= number or nil|optName2= coal|desc2= Optional coalition number (1 = Red, 2 = Blue). Defaults to –1 meaning “any”.}} | {{Template:FunctionInfo|fName= FindNearestAirbase|fDescription= |parentFile= cmm.AirBaseFunctions.lua|syntax= CMM.FindNearestAirbase(<vec3>, <coal>)|return= table or nil, table or nil|returnDesc= Returns two tables, first one is the Airbase object, second is a table with keys distance (meters), name, and id; or nil if the input is invalid.|example= CMM.FindNearestAirbase({x=0, y=0, z=1000}, 1)|exampleDesc= Finds the closest airbase to the given point within the specified coalition (or any if omitted) and logs the result.|related= |note= |envType= CMM|par1= table vec3|reqType1= table|reqName1= vec3|desc1= A 3‑D position vector ({x, y, z}) used as the reference point.|par2= number or nil coal|optType2= number or nil|optName2= coal|desc2= Optional coalition number (1 = Red, 2 = Blue). Defaults to –1 meaning “any”.}} | ||
Latest revision as of 14:15, 10 February 2026
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | FindNearestAirbase | |
| Function Description: | ||
| File Location: | cmm.AirBaseFunctions.lua | |
| Syntax: | CMM.FindNearestAirbase( table vec3 , number or nil coal ) | |
| Return Value: | table or nil, table or nil | |
| Parameters: | Name | Description |
| vec3 | A 3‑D position vector ({x, y, z}) used as the reference point. | |
| coal | Optional coalition number (1 = Red, 2 = Blue). Defaults to –1 meaning “any”. | |
| Example: | CMM.FindNearestAirbase({x=0, y=0, z=1000}, 1) | |
| Example Description: | Finds the closest airbase to the given point within the specified coalition (or any if omitted) and logs the result. | |
| Related Functions: | ||
| Notes: | ||