ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getZoneCenter

Function

getZoneCenter

Server and clientWorldTrilogy Hub only

Returns the centre of the zone box from getZoneBounds. 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.

Syntax

float, float, float getZoneCenter(string name)

Arguments

namestring
Zone or region name.

Returns

x, y, z, or false.

Example

local x, y = getZoneCenter("Ganton")
createBlip(x, y, 0, 41)

See also