#SL Scripting llGetAgentList()

Kelly Linden announced Monday in the Scripting UG and again in the Tuesday Server/Sim/Scripting Ug that he has progressed far enough on the function that it is now in QA and winding its way to a Release Channel. It is probably two weeks away from a roll out on an RC.

You can find pre-release information in the wiki: llGetAgentList(). The page was posted 3/20.

This function will return a list of the agents in a specified area within a single region.  The areas you can specify are;

  • AGENT_LIST_PARCEL – returns only agents on the same parcel where the script is running.
  • AGENT_LIST_PARCEL_OWNER – returns only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object.
  • AGENT_LIST_REGION – returns any/all agents in the region.

The function will return a list of avatar keys. The limit is 100 avatars per the wiki. There is no discernible order or randomness to the list.

There is some difference between what the wiki says and Kelly says. Kelly describes the function as:

llGetAgentList(integer max_agents, integer flags)

The wiki describes the function as:

llGetAgentList( integer scope, list options )

I expect to hear more before the release to an RC. I suspect Kelly’s is correct.

If one requests a higher max_agents than 200, a list with a single error message is returned. The hard coded limit is 200 per Kelly. Simon Linden says they’ll be happy to adjust the limit, after they figure out how to get more avatars in a region. However, for now they recommend you plan on using a smaller limit, like 100 or whatever is a reasonable max expectation for your area.

There is no delay or throttle on this function. Since it only can consume the script time, they do not see it being a problem.

One can already do what this script accomplishes with sensors. This will replace the need for some sensor use and be more efficient.

See SVC-5488 – llGetRegionAgents() for the inspiration for llGetAgentList().

Summary

Another new function added to the Linden Scripting Language. I suspect we will start to see better traffic counters. I can think of several new counters that region, parcel, club, and shop owners might find of interest.

One thought on “#SL Scripting llGetAgentList()

  1. LOL Too Cute!

    Maybe more of their smatt ideas will appear from here , just like this one.
    http://opensimulator.org/wiki/Category:OSSL_Functions

Leave a Reply

Your email address will not be published. Required fields are marked *