ValidGroundSpawn
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | ValidGroundSpawn | |
| Function Description: | Determines a valid spawn point within a specified zone or polygon by randomly selecting positions and checking for existing objects, ensuring the area is clear of units, weapons, statics, bases, or scenery within a defined radius. | |
| File Location: | cmm.positionFunctions.lua | |
| Syntax: | CMM.ValidGroundSpawn( string or table ZoneData , number Size ) | |
| Return Value: | table or nil or boolean | |
| Parameters: | Name | Description |
| ZoneData | Either a zone string name or a table defining a polygon; used to generate random spawn points within the area. | |
| Size | Radius in units to check for existing objects; defaults to 8 if not provided. | |
| Example: | CMM.ValidGroundSpawn("Zone1", 10) | |
| Example Description: | Finds a valid spawn point within Zone1 with a 10-unit radius clearance, ensuring no objects exist in the area. | |
| Related Functions: | ||
| Notes: | ||