Breakroom is now Sinewave Campus. Book a meeting

SScene

ServerScene
On this classConnectedAvatars
  1. Properties
  2. ConnectedAvatars
  3. Avatars
  4. Cells
  5. Parcels
Members 4
PropertyConnectedAvatarsReturns the number of Avatars connected to the region.
PropertyAvatarsReturns a table of SAvatar objects currently in the region
PropertyCellsReturns a table of SCell objects. (Not all cells are available at all times, a client on this server must be within 384m of a cell in order for it to exist.)
PropertyParcelsAccess to the SParcelManager class.

Properties​

ConnectedAvatarsRead only​

int ConnectedAvatars {get; }

Returns the number of Avatars connected to the region.

Example

Lua
numOfAvatars = Space.Scene.ConnectedAvatars
Lua
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars
Space.Log("Avatar with ID " .. id .. "has joined")
Space.Log("Number of avatars connected: " .. numOfAvatars)
end

AvatarsRead only​

Table Avatars {get; }

Returns a table of SAvatar objects currently in the region

Example

Lua
currentAvatars = Space.Scene.Avatars

CellsRead only​

Table Cells {get; }

Returns a table of SCell objects. (Not all cells are available at all times, a client on this server must be within 384m of a cell in order for it to exist.)

Example

Lua
cellsTable = Space.Scene.Cells

ParcelsRead only​

SParcelManager Parcels {get; }

Access to the SParcelManager class.

Example

Lua
Space.Scene.Parcels