Jump to content

SpawnPOI

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (SpawnPOI – created via PowerShell script (2025-11-11T21:12:07Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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
POIActive POI table entry containing at least vec3, radius and dir.
UnitTypesArray of unit type names to spawn.
SpreadIf less than 1, treated as a percentage of the POI radius; otherwise interpreted as metres.
CoalCoalition identifier (1 = RED, 2 = BLUE). Defaults to RED if omitted or invalid.
UseCoalBullsEyeWhen 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: