Jump to content

SelectZonePOI

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (SelectZonePOI – created via PowerShell script (2025-11-11T21:12:06Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: SelectZonePOI
Function Description: Chooses a single Point‑of‑Interest from the specified zone, optionally filtering by grid and POI type; the function first ensures the zone’s POI list is loaded (caching it in CMM.ZONEPOI), then builds a selection list that matches the supplied GRID array (or all grids if omitted) and the requested POItype; a random entry from this list is returned, and a visual marker/text is placed on the F10 map.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.SelectZonePOI( string ZoneName , number POItype , string or table or nil GRID )
Return Value: table or nil
Parameters: Name Description
ZoneNameName of the zone (must exist in CMM.ZONEPOI or be retrievable via CMM.GetZonePOI)
POItype0 = Any type, 1 = Large, 2 = LargeFlat, 3 = Small, 4 = SmallFlat
GRIDSpecific grid(s) to limit selection to (e.g. "FK", { "DK66", "DK67" }). If omitted, all grids are accepted.
Example: local poi = CMM.SelectZonePOI("WeaponsRange02", {"DK66","DK67"}, 0)
Example Description: Randomly selects a POI from the WeaponsRange02 zone that lies on grid DK66 or DK67, regardless of size/flatness.
Related Functions:
Notes: