A zone is a named polygonal region defined in an area. Zones are used to provide script triggers based on player or entity movement. Zones can have a limited height or can ignore the up axis entirely. Each entity is considered to be in at most one zone at a time. If multiple zones overlapped an entity is considers only in the first zone (by the order stored in the area file).
Zones can have an associated ambiance, fog distance and/or fog-color, which will be activated when the player enters the zone as if the
zoneparam ambiance command was called. Leaving a zone does not restore the original ambiance or fog settings.
A zone can have a controlling entity (set using
setcontrolledzone and removed using
unsetcontrolledzone) which will receive
controlledzone_leave events when any entity enters or leaves that zone, with the entity ID as the first parameter and the zone name as the second parameter.
controlledzone_enter events are repeated when the visibility for an entity already inside a zone changes.
controlledzone_leave events are not sent when an entity inside a zone becomes mega-hidden.