- Documentation
- Shared functions
- getZoneBounds
Function
getZoneBounds
Returns the box enclosing a whole zone (all its parts) with the given name: minimum and maximum coordinates. When there is no such district it looks for a region.
Syntax
float... getZoneBounds(string name)Arguments
namestring- Zone or region name.
Returns
x1, y1, z1, x2, y2, z2, or false.
Example
local x1, y1, z1, x2, y2, z2 = getZoneBounds("Idlewood")
outputDebugString(("Idlewood: %d..%d, %d..%d"):format(x1, x2, y1, y2))
See also
getZoneCenterReturns the centre of the zone box fromgetZoneBounds. Useful e.g. to place a "Go to Idlewood" marker. The centre need not be on the ground, or inside the zone itself if its shape is irregular.isInsideZoneChecks whether a point lies in a zone or region with the given name (case-insensitive). A zone can consist of many rectangles; each of them counts.