|
|
Line 1: |
Line 1: |
− | =Properties=
| + | The page has moved to: https://docs.sine.space/v/scripting/server-scripting/scene/savatar |
− | | + | |
− | {{ScriptFunction|int|ID|{ get; }|Avatar's ID|5=<pre>ID = Space.Scene.Avatars[1].ID</pre>|6=<pre>--server script that prints a list of IDs of players online whenever someone joins
| + | |
− | function OnAvatarJoin(id)
| + | |
− | local numOfAvatars = Space.Scene.ConnectedAvatars
| + | |
− | | + | |
− | for num =1 , numOfAvatars, 1 do
| + | |
− | Space.Log(Space.Scene.Avatars[num].ID)
| + | |
− | end
| + | |
− | end</pre>}}
| + | |
− | | + | |
− | {{ScriptFunction|Vector3|Position|{ get;}|Avatar's position|5=<pre>ID = Space.Scene.Avatars[1].Position</pre>|6=<pre>--server script that prints a list of Positions of players online whenever someone joins
| + | |
− | function OnAvatarJoin(id)
| + | |
− | local numOfAvatars = Space.Scene.ConnectedAvatars
| + | |
− | | + | |
− | for num =1 , numOfAvatars, 1 do
| + | |
− | Space.Log(Space.Scene.Avatars[num].Position)
| + | |
− | end
| + | |
− | end</pre>}}
| + | |
− | | + | |
− | {{ScriptFunction|Vector3|Velocity|{ get; }|Avatar's Velocity|5=<pre>ID = Space.Scene.Avatars[1].Velocity</pre>|6=<pre>--server script that prints a list of Velocitys of players online whenever someone joins
| + | |
− | function OnAvatarJoin(id)
| + | |
− | local numOfAvatars = Space.Scene.ConnectedAvatars
| + | |
− | | + | |
− | for num =1 , numOfAvatars, 1 do
| + | |
− | Space.Log(Space.Scene.Avatars[num].Velocity)
| + | |
− | end
| + | |
− | end</pre>}}
| + | |
− | | + | |
− | {{ScriptFunction|Quaternion|Rotation|{ get; }|Avatar's Rotation|5=<pre>ID = Space.Scene.Avatars[1].Quaternion </pre>|6=<pre>--server script that prints a list of Rotations of players online whenever someone joins
| + | |
− | function OnAvatarJoin(id)
| + | |
− | local numOfAvatars = Space.Scene.ConnectedAvatars
| + | |
− | | + | |
− | for num =1 , numOfAvatars, 1 do
| + | |
− | Space.Log(Space.Scene.Avatars[num].Rotation)
| + | |
− | end
| + | |
− | end</pre>}}
| + | |
− | | + | |
− | {{ScriptFunction|String|Username|{ get; }|Avatar's Username|5=<pre>ID = Space.Scene.Avatars[1].Username</pre>|6=<pre>--server script that prints a list of Usernames of players online whenever someone joins
| + | |
− | function OnAvatarJoin(id)
| + | |
− | local numOfAvatars = Space.Scene.ConnectedAvatars
| + | |
− | | + | |
− | for num =1 , numOfAvatars, 1 do
| + | |
− | Space.Log(Space.Scene.Avatars[num].Username)
| + | |
− | end
| + | |
− | end</pre>}}
| + | |
− | | + | |
− | {{ScriptFunction|String|Title|{ get; }|Avatar's Title|5=<pre>ID = Space.Scene.Avatars[1].Title</pre>|6=<pre>--server script that prints a list of Titles of players online whenever someone joins
| + | |
− | function OnAvatarJoin(id)
| + | |
− | local numOfAvatars = Space.Scene.ConnectedAvatars
| + | |
− | | + | |
− | for num =1 , numOfAvatars, 1 do
| + | |
− | Space.Log(Space.Scene.Avatars[num].Title)
| + | |
− | end
| + | |
− | end</pre>}}
| + | |
− | | + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |