GetZone: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) m GetZone – created via PowerShell script (2026-01-01T06:03:46Z) Tag: Reverted |
Ozdeadmeat (talk | contribs) m getZone – created via PowerShell script (2026-02-11T01:16:02Z) Tags: Manual revert Reverted |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= | {{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.}} | ||
Revision as of 14:16, 10 February 2026
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | getZone | |
| Function Description: | 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. | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.getZone( string ZoneName ) | |
| Return Value: | table or nil | |
| Parameters: | Name | Description |
| ZoneName | Name of a zone defined in the mission editor. | |
| Example: | local weaponsRange = CMM.getZone("WeaponsRange02") | |
| Example Description: | 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 Functions: | ||
| Notes: | ||