Skip to content

Destroying a zone

Michael Afrin edited this page Aug 23, 2020 · 2 revisions

Destroying a Zone

Destroying an instance of a zone will stop any threads associated with that zone, including debug drawing, onPointInOut/onPlayerInOut helpers, etc. It will also set a destroyed flag on the zone to true. This probably makes more sense to use on an entity zone, but it can be used for any zone:

Assuming we are using the "pinkcage" zone from here, destroying it works as follows:

pinkcage:destroy()

Note: If you try to call isPointInside on a destroyed zone, it will return false, and emit a warning.