OsGetAvatarList

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Indentation)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|threat_level=None
|- valign="top"
+
|permissions=${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|'''Threat Level''' || None
+
|delay=0
 
+
|additional_info=This function was added in 0.7
|- valign="top"
+
|function_syntax=list osGetAvatarList()
|'''Function Syntax''' || <source lang="lsl">
+
|csharp_syntax=LSL_List osGetAvatarList()
LSL: list osGetAvatarList()  
+
|ossl_example=<source lang="lsl">
C#: LSL_List osGetAvatarList()
+
</source>
+
|- valign="top"
+
|'''Example(s)||<source lang="lsl">
+
 
//
 
//
// Example of osGetAvatarList.
+
// osGetAvatarList Script Example
 
//
 
//
 +
 
default
 
default
 
{
 
{
     touch_start(integer total_number)
+
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see osGetAvatarList usage.");
 +
    }
 +
 
 +
     touch_start(integer number)  
 
     {
 
     {
 
         list avatars = osGetAvatarList();
 
         list avatars = osGetAvatarList();
 +
 
         if (avatars == [])
 
         if (avatars == [])
             llSay(0, "You must be the owner. There is nobody else here who could have touched me.");
+
        {
 +
             llSay(PUBLIC_CHANNEL, "You must be the owner. There is nobody else here who could have touched me.");
 +
        }
 +
           
 
         else
 
         else
             llSay(0, "Avatars in this sim (without the owner): " + llList2CSV(avatars));
+
        {
 +
             llSay(PUBLIC_CHANNEL, "Avatars in this sim (without the owner): " + llList2CSV(avatars));
 +
        }
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
 
+
|description=Returns a strided list of the UUID, position, and name of each avatar in the region except the owner.
|}
+
Returns a strided list of the UUID, position, and name of each avatar in the region except the owner.
+
  
 
This function is similar to [[osGetAgents]] but returns enough info for a radar.  
 
This function is similar to [[osGetAgents]] but returns enough info for a radar.  
[[Category:OSSL Functions]]
+
|
 +
}}

Latest revision as of 12:56, 24 November 2020

list osGetAvatarList()
C#: LSL_List osGetAvatarList()
Returns a strided list of the UUID, position, and name of each avatar in the region except the owner.

This function is similar to osGetAgents but returns enough info for a radar.

Threat Level None
Permissions ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
//
// osGetAvatarList Script Example
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osGetAvatarList usage.");
    }
 
    touch_start(integer number) 
    {
        list avatars = osGetAvatarList();
 
        if (avatars == [])
        {
            llSay(PUBLIC_CHANNEL, "You must be the owner. There is nobody else here who could have touched me.");
        }
 
        else
        {
            llSay(PUBLIC_CHANNEL, "Avatars in this sim (without the owner): " + llList2CSV(avatars));
        }
    }
}
Notes
This function was added in 0.7
Personal tools
General
About This Wiki