Skip to main content

Points

The Point library provides a distance-based point system. Points trigger callbacks when the player enters or exits their radius.

Side: Client

Functions

Create

Creates a new point that monitors player distance.

local point = Bridge.Point.Create(options)
-- Returns: point object

Options

local point = Bridge.Point.Create({
id = 'my_point',
coords = vector3(100.0, 200.0, 30.0),
distance = 10.0,
onEnter = function(self)
print('Player entered point')
end,
onExit = function(self)
print('Player left point')
end,
nearby = function(self)
-- Called each frame while nearby
end
})

Remove

Removes a point by ID.

Bridge.Point.Remove(id)
ParameterTypeDescription
idstringPoint ID

Get

Returns a point object by ID.

local point = Bridge.Point.Get(id)
-- Returns: point object | nil
ParameterTypeDescription
idstringPoint ID

GetAll

Returns all registered points.

local points = Bridge.Point.GetAll()
-- Returns: table

GetNearby

Returns all points the player is currently inside.

local nearby = Bridge.Point.GetNearby()
-- Returns: table