SelectZonePOI
Appearance
| 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 |
| ZoneName | Name of the zone (must exist in CMM.ZONEPOI or be retrievable via CMM.GetZonePOI) | |
| POItype | 0 = Any type, 1 = Large, 2 = LargeFlat, 3 = Small, 4 = SmallFlat | |
| GRID | Specific 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: | ||