OsGetNpcList: Difference between revisions
From OpenSimulator
Jump to navigationJump to search
imported>Ubit No edit summary |
imported>Djphil Update Script |
||
| Line 6: | Line 6: | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
// | // | ||
// | // osGetNPCList Script Exemple | ||
// | // | ||
default | default | ||
{ | { | ||
touch_start(integer | state_entry() | ||
{ | |||
llSay(PUBLIC_CHANNEL, "Touch to see osGetNPCList usage."); | |||
} | |||
touch_start(integer number) | |||
{ | { | ||
list npcs = osGetNPCList(); | list npcs = osGetNPCList(); | ||
if (npcs == []) | if (npcs == []) | ||
llSay( | { | ||
llSay(PUBLIC_CHANNEL, "There is no NPC's in this sim currently."); | |||
} | |||
else | else | ||
llSay( | { | ||
llSay(PUBLIC_CHANNEL, "NPC's in this sim (without avatars): " + llList2CSV(npcs)); | |||
} | |||
} | } | ||
} | } | ||
Revision as of 13:08, 29 November 2020
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 | ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
| Extra Delay | 0 seconds |
| Example(s) | |
//
// osGetNPCList Script Exemple
//
default
{
state_entry()
{
llSay(PUBLIC_CHANNEL, "Touch to see osGetNPCList usage.");
}
touch_start(integer number)
{
list npcs = osGetNPCList();
if (npcs == [])
{
llSay(PUBLIC_CHANNEL, "There is no NPC's in this sim currently.");
}
else
{
llSay(PUBLIC_CHANNEL, "NPC's in this sim (without avatars): " + llList2CSV(npcs));
}
}
}
| |
| Notes | |
| This function was added in 0.9.0.1 | |