Jump to content

GetZone: Difference between revisions

From CMM Wiki
getZone – created via PowerShell script (2025-11-11T21:12:07Z)
Tag: Recreated
 
m GetZone – created via PowerShell script (2026-02-11T01:16:53Z)
Tag: Manual revert
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:FunctionInfo|fName=          getZone|fDescription=  Returns a detailed zone table for the given zone name, augmenting the mission’s trigger‑zone data with a vec3 field (x, y = terrain height, z) and optional 3‑D vertex list (verticies3).  If the zone cannot be found or the input is not a string, the function logs an error and returns nil.|parentFile=    cmm.DCSFunctions.lua|syntax=        CMM.getZone(<string>)|return=        table or nil|returnDesc=    returns a table containing centre, radius, vertices and terrain height for the zone or nil if not found|example=        local weaponsRange = CMM.getZone("WeaponsRange02")|exampleDesc=    The example shows how to obtain all relevant data for "WeaponsRange02", including the ground elevation at its centre (vec3.y) and the 3‑D coordinates of each vertex in verticies3.|related=        |note=          |envType= CMM|par1=        string ZoneName|reqType1=    string|reqName1=    ZoneName|desc1=      Name of a zone defined in the mission editor.}}
{{Template:FunctionInfo|fName=          GetZone|fDescription=  Returns a zone table by its name|parentFile=    cmm.ZoneFunctions.lua|syntax=        CMM.GetZone(<string>)|return=        table or nil|returnDesc=    Returns a zone table if found, otherwise nil.|example=        CMM.GetZone("Zone15",1000)|exampleDesc=    Returns a zone table for the zone named "Zone15", or nil if not found.|related=        |note=          |envType= CMM|par1=        string zoneName|reqType1=    string|reqName1=    zoneName|desc1=      Name of the zone as defined in the mission editor.}}

Latest revision as of 14:16, 10 February 2026

Return to CMM Command Reference
Environment: Mission Scripting
Function: GetZone
Function Description: Returns a zone table by its name
File Location: cmm.ZoneFunctions.lua
Syntax: CMM.GetZone( string zoneName )
Return Value: table or nil
Parameters: Name Description
zoneNameName of the zone as defined in the mission editor.
Example: CMM.GetZone("Zone15",1000)
Example Description: Returns a zone table for the zone named "Zone15", or nil if not found.
Related Functions:
Notes: