llGetAgentList
Revision as of 22:04, 23 March 2012 by Strife Onizuka (talk | contribs)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Pre-release Documentation Warning! | |
This function is not available yet. This documentation was written prior to its final release so it may not match the final implementation. |
Summary
Function: list llGetAgentList( integer scope, list options );0 | Forced Delay |
0 | Energy |
Requests a list of agents currently in the region, limited by the scope parameter.
Returns a list [key id0, key id1, ..., key idn] or [string error_msg] - returns avatar keys for all agents in the region limited to the area(s) specified by scope
• integer | scope | – | selection scope
|
|
• list | options | – | Unused. |
Caveats
- There is no guaranteed understandable order or randomness to the list returned.
- Will only return up to 100 agents.
Examples
<lsl>//Displays up to 100 avatar key: name pairs detected in the entire region list gaAgents;
default {
touch_start(integer total_number) { integer i; integer liCount;
gaAgents = llGetAgentList(AGENT_LIST_REGION, []); liCount = llGetListLength(gaAgents); if (liCount > 0) if (llGetListEntryType(gaAgents,0) == TYPE_STRING) llOwnerSay("Error: "+llList2String(gaAgents,0)); else for (i=0; i < liCount; ++i) llOwnerSay(llList2String(gaAgents,i)+": "+llKey2Name(llList2String(gaAgents,i))); }}</lsl>