OsGetAvatarList
From OpenSimulator
(Difference between revisions)
m (XEngine to OSSL) |
m (Indentation) |
||
Line 8: | Line 8: | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
// | // | ||
− | // | + | // osGetAvatarList Script Example |
// | // | ||
+ | |||
default | default | ||
{ | { | ||
− | touch_start(integer | + | 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( | + | { |
+ | llSay(PUBLIC_CHANNEL, "You must be the owner. There is nobody else here who could have touched me."); | ||
+ | } | ||
+ | |||
else | else | ||
− | llSay( | + | { |
+ | llSay(PUBLIC_CHANNEL, "Avatars in this sim (without the owner): " + llList2CSV(avatars)); | ||
+ | } | ||
} | } | ||
} | } |
Latest revision as of 11: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 |