Jump to content

GetZoneState

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetZoneState
Function Description: Retrieves the current state of a specified zone by counting units from both RED and BLUE sides, returning a detailed report including unit counts and zone state. Zone state -1 indicates uninitialised, 1 means empty, 2 means BLUE owns, 3 means RED owns, and 4 means combat is active.
File Location: cmm.ZoneFunctions.lua
Syntax: CMM.GetZoneState( string ZoneID )
Return Value: table
Parameters: Name Description
ZoneIDName of the zone to check, passed as a string value defined in the mission editor.
Example: CMM.GetZoneState("Zone 15")
Example Description: Returns a report for Zone 15 showing if it is empty, owned by RED or BLUE, or in combat, along with the list of units present on each side.
Related Functions:
Notes: