OsGetNpcList: Difference between revisions
From OpenSimulator
Jump to navigationJump to search
imported>Ferd Frederix Added details from OsGetAvatarList, Commit # e53f43, July 26,2017, |
imported>Mewtwo0641 No edit summary |
||
| Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=None | |threat_level=None | ||
|function_syntax=list | |function_syntax=list osGetNPCList() | ||
|csharp_syntax=LSL_List | |csharp_syntax=LSL_List osGetNPCList() | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
// | // | ||
// Example of | // Example of osGetNPCList. | ||
// | // | ||
default | default | ||
| Line 11: | Line 11: | ||
touch_start(integer total_number) | touch_start(integer total_number) | ||
{ | { | ||
list npcs = | list npcs = osGetNPCList(); | ||
if (npcs == []) | if (npcs == []) | ||
llSay(0, "You must be the owner. There is nobody else here who could have touched me."); | llSay(0, "You must be the owner. There is nobody else here who could have touched me."); | ||
else | else | ||
llSay(0, "NPC' | llSay(0, "NPC's in this sim (without avatars): " + llList2CSV(npcs)); | ||
} | } | ||
} | } | ||
Revision as of 23:31, 7 October 2017
list osGetNPCList()
C#: LSL_List osGetNPCList() | |
| Returns a strided list of the UUID, position, and name of each NPC in the region. Only available after 0.9 Commit # e53f43, July 26,2017
This function is similar to OsGetAvatarList. | |
| Threat Level | None |
| Permissions | No permissions specified |
| Extra Delay | No function delay specified |
| Example(s) | |
//
// Example of osGetNPCList.
//
default
{
touch_start(integer total_number)
{
list npcs = osGetNPCList();
if (npcs == [])
llSay(0, "You must be the owner. There is nobody else here who could have touched me.");
else
llSay(0, "NPC's in this sim (without avatars): " + llList2CSV(npcs));
}
}
| |