SScene
Index
Functions Index
SGameObject Find (string name)
SGameObject FindID (string id)
void MarkObjectTemporary (SGameObject obj)
SGameObject CreateGameObject (string name) SGameObject CreateGameObject (SResource resource)
void SwitchToInstance (uint id)
void OnPlayerJoin (Closure e)
void OnPlayerLeave (Closure e)
void OnEditModeStart (Closure e)
void OnEditModeEnd (Closure e)
void OnEditModeAdd (Closure e)
void OnEditModeRemove (Closure e)
Properties Index
SAvatar PlayerAvatar get
SAvatar[] Avatars get
List< SAvatar > AllAvatars get
int Population get
SGameObject[] Objects get
string Name get
string Url get
long RegionID get
long InstanceID get
long Owner get
bool PlayerIsOwner get
bool PlayerIsAdmin get
bool PlayerIsModerator get
bool PlayerIsDeveloper get
bool PlayerIsTrusted get
bool IsInEditMode get
SGameObject[] Floors get
SLandmark[] Landmarks get
Functions
Find
SGameObject Find (string name)
Finds a single Game Object matching 'Name' and returns it. Can use '/' characters to designate a path (e.g. 'Parent/Child' returns Child with 'Parent')
FindID
SGameObject FindID (string id)
Finds a single Game Object using ID and returns it
MarkObjectTemporary
void MarkObjectTemporary (SGameObject obj)
Marks the Game Object as temporary. Temporary objects will be cleaned up automatically if the script is destroyed or reset. Can be used to handle cleanup from procedural objects created by a script.
GetAvatar
SAvatar GetAvatar (long id) SAvatar GetAvatar (string name)
Get reference to an avatar
CreateGameObject
SGameObject CreateGameObject (string name) SGameObject CreateGameObject (SResource resource)
Creates a game object from the specified resource
SwitchToInstance
void SwitchToInstance (uint id)
Switch to a shard region.
OnPlayerJoin
void OnPlayerJoin (Closure e)
Event which fires whenever a player joins the region
e
Closure (Callback)
e(SAvatar)
OnPlayerLeave
void OnPlayerLeave (Closure e)
Event which fires whenever a player leaves the region
e
Closure (Callback)
e(long)
OnEditModeStart
void OnEditModeStart (Closure e)
An event which is fired when player enters Room Edit mode
OnEditModeEnd
void OnEditModeEnd (Closure e)
An event which is fired when player exits Room Edit mode
OnEditModeAdd
void OnEditModeAdd (Closure e)
An event which is fired when object is added during Edit Mode
OnEditModeRemove
void OnEditModeRemove (Closure e)
An event which is fired when object is deleted during Edit Mode
Properties
PlayerAvatar
SAvatar PlayerAvatar get
Returns the current player avatar. If this script is calling this upon initialisation, the Player may not exist yet, and you will want to wait a few frames until the avatar is present before continuing.
Avatars
SAvatar[] Avatars get
Returns a list of Avatars in the scene
AllAvatars
List< SAvatar > AllAvatars get
Returns a list of all avatars in the scene. The player avatar that is calling this will be added to the end of the list.
Population
int Population get
Property Description
Objects
SGameObject[] Objects get
Returns a list of Objects in the scene. IMPORTANT: This function is slow, you should cache the result and avoid calling this every frame.
Name
string Name get
Returns the name of the current region
Url
string Url get
Returns the URL of the current region
RegionID
long RegionID get
Returns the region ID of current region.
InstanceID
long InstanceID get
Return the instance ID of current region.
Owner
long Owner get
Returns the avatar ID of the regions owner
PlayerIsOwner
bool PlayerIsOwner get
Returns whether the current player is the owner of the region
PlayerIsAdmin
bool PlayerIsAdmin get
Does this Player have the Admin role?
PlayerIsModerator
bool PlayerIsModerator get
Does this Player have the Moderator role?
PlayerIsDeveloper
bool PlayerIsDeveloper get
Does this Player have the Developer role?
PlayerIsTrusted
bool PlayerIsTrusted get
Does this Player have the Trusted role?
IsInEditMode
bool IsInEditMode get
Returns true if current player is in edit mode.
Floors
SGameObject[] Floors get
Return an array of all floors in the region.
Landmarks
SLandmark[] Landmarks get
Return all Landmarks in the region
Last updated
Was this helpful?

