Zones
Used to create and manage polyzones
lib.zones.register
Create a new zone
lib.zones.register(id, data)Parameter
Type
Required
Description
name
String
Unique zone reference
Zone Examples
lib.zone.register("exampleZone", {
type = "circle",
pos = vector3(0, 0, 0),
radius = 5.0,
onEnter = function(data)
lib.print("debug", "Entered Zone")
end,
onExit = function(data)
lib.print("debug", "Exited Zone")
end,
})lib.zone.register("exampleZone", {
type = "circle2D",
pos = vector2(0, 0),
radius = 5.0,
onEnter = function(data)
lib.print("debug", "Entered Zone")
end,
onExit = function(data)
lib.print("debug", "Exited Zone")
end,
})lib.zones.get
Get zone information
Parameter
Type
Required
Description
name
String
Unique zone reference
lib.zones.delete
Remove a created zone
Parameter
Type
Required
Description
name
String
Unique zone reference
lib.zones.isInsideZone
Check whether a position lies inside a zone(s)
Parameter
Type
Required
Description
name
StringObject
Unique zone reference(s)
pos
Vector3
Position to be checked
Data Structure
This is the data structure of a blip and the valid options
Some zones have different requirements, see below:
Last updated