Scripting/SAvatar

From sine.space Wiki
Jump to: navigation, search

The SAvatar class refers a single player avatar active within the scene. This only contains active players with a valid network connection, and does not include NPCs.

Members

Username

string Username { get; }

Returns the players current username (note: this can be changed by players for a small fee)

No example provided yet

Title

string Title { get; }

Returns the players current title

No example provided yet

ID

long ID { get; }

Returns the players user ID, please note if you store these, this is a 'long' value not a 'int'.

No example provided yet

GameObject

SGameObject GameObject { get; }

Returns a reference to the players GameObject

No example provided yet

Detach

void Detach ();

Detaches the avatar from whatever it may be attached to (only works for the player avatar), including chairs, vehicles and so forth.

No example provided yet

AttachTo

void AttachTo (SGameObject target);

Attaches the player to the target game object, keeping the avatar fixed in its current position/rotation relative to the target object (e.g. for use in Vehicles)

No example provided yet