FindNearestAirbase
Appearance
| 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: | ||