SpawnPOI
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | SpawnPOI | |
| Function Description: | Spawns a group of ground units at the specified POI, optionally spreading them around the POI centre and orienting them toward a bullseye point or the POI’s own heading. The spread may be given as a fraction of the POI radius (≤ 1) or an absolute distance in metres. | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.SpawnPOI( table POI , table UnitTypes , number Spread , number or nil Coal , boolean or nil UseCoalBullsEye ) | |
| Return Value: | nil | |
| Parameters: | Name | Description |
| POI | Active POI table entry containing at least vec3, radius and dir. | |
| UnitTypes | Array of unit type names to spawn. | |
| Spread | If less than 1, treated as a percentage of the POI radius; otherwise interpreted as metres. | |
| Coal | Coalition identifier (1 = RED, 2 = BLUE). Defaults to RED if omitted or invalid. | |
| UseCoalBullsEye | When true, units are oriented toward the main reference point of the specified coalition instead of the POI’s heading. | |
| Example: | CMM.SpawnPOI(CMM.ACTIVEPOI[1], {"BTR-80","BMP-2"}, 0.5, 1) | |
| Example Description: | Spawns a mixed BTR/BMP group at the first active POI, spread 50 % of its radius, on REDFOR | |
| Related Functions: | ||
| Notes: | ||