Jump to content

ValidGroundSpawnOnRoadInZone

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (ValidGroundSpawnOnRoadInZone – created via PowerShell script (2025-11-11T21:12:02Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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
ZoneDataTable of points that makes a polygon or Zone String
SizeSize of area you want to verify does not have other objects
RoadTypeValid 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: