Skip to main content

Objects

All the pool object related functions.

GetAll

Function

local Pools = WXSCore.Pools
Pools.Objects:GetAll()

Returns

NameTypeDescription
objectsnumber[]A table of all the object handles.

Example

local Pools = WXSCore.Pools
local objects = Pools.Objects:GetAll()

GetInArea

Function

local Pools = WXSCore.Pools
Pools.Objects:GetInArea(coords, radius)

Parameters

NameTypeDescription
coordsvector3The coordinates of the area.
radiusfloatThe radius of the area.

Returns

NameTypeDescription
objectsnumber[]A table of all the object handles in the area.

Example

local Pools = WXSCore.Pools
local objects = Pools.Objects:GetInArea(vector3(0.0, 0.0, 0.0), 100.0)

GetClosest

Function

local Pools = WXSCore.Pools
Pools.Objects:GetClosest(coords)

Parameters

NameTypeDescription
coordsvector3The coordinates of the area.

Returns

NameTypeDescription
objectnumberThe object handle of the closest object.
distancefloatThe distance between the object and the coordinates.

Example

local Pools = WXSCore.Pools
local object, distance = Pools.Objects:GetClosest(vector3(0.0, 0.0, 0.0))