ValidGroundSpawnOnRoadInZone
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | ValidGroundSpawnOnRoadInZone | |
| Function Description: | Finds a suitable ground spawn location on a road inside the given zone, ensuring a clearance radius around the spot contains no units, weapons, static objects, bases or scenery. | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.ValidGroundSpawnOnRoadInZone( string or table ZoneData , number Size , string RoadType ) | |
| Return Value: | table or nil | |
| Parameters: | Name | Description |
| ZoneData | Table of points that makes a polygon or Zone String | |
| Size | Size of area you want to verify does not have other objects | |
| RoadType | Valid Options are "railroads" , "roads" | |
| Example: | local spawn = CMM.ValidGroundSpawnOnRoadInZone("ZoneName", 8, "roads") | |
| Example Description: | Attempts to find a clear spot on a road inside "ZoneName" with an 8‑meter clearance radius. If successful, spawn will contain the coordinates; otherwise it returns nil. | |
| Related Functions: | ||
| Notes: | ||