Jump to content

InitializePOI

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (InitializePOI – 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: InitializePOI
Function Description: Populates the global CMM.ACTIVEPOI list from a set of GRID identifiers. The function first expands the supplied GRIDS (string or table) into a list of POIs via CMM.MakePOIListFromGRIDS. If the first argument is the string "ALL" (case‑insensitive) the function activates every POI in the supplied grids. Each activated POI receives a unique marker ID, a visual circle on the F10 map, and is stored in CMM.ACTIVEPOI. The function does not return a value; it updates global state.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.InitializePOI( table or string GRIDS , number LargeFlat , number SmallFlat , number Large , number Small )
Return Value: table or nil
Parameters: Name Description
GRIDSA list of GRID identifiers (e.g. { "DK47", "DK56" }) or a single GRID string.
LargeFlatDesired count of LargeFlat – number of large flat POIs (radius > 200 & isflat == true)
SmallFlatDesired count of SmallFlat – number of small flat POIs (radius == 200 & isflat == true)
LargeDesired count of Large – number of large non‑flat POIs (radius > 200 & isflat == false)
SmallDesired count of Small – number of small non‑flat POIs (radius == 200 & isflat == false).
Example: CMM.InitializePOI({"DK47","DK56","DK57"},3,0,0,17)
Example Description: Activates 3 large flat POIs and 17 small non‑flat POIs from the grids DK47, DK56, DK57.
Related Functions:
Notes: