Add useful options to llGetAgentList()
tracked
Oggy Fink
Currently llGetAgentList() as an options parameter that is unused and the wiki warns of "possible stack/heap collision errors" because of the potential size of the returned list.
This is like walking on a razors edge and sometimes forces us to use an extra script just to collect data of the parcel, with asynchronous message exchange with the main script, resulting in lots of complications just to
try
to avoid this.As already suggested in the wiki itself, there is room for improvement to limit the size of the returned list and hence the risk of stack/heap collisions.
My first suggestion is of course to add an option to limit the size of the returned list:
AGENTLIST_MAXNUM, with an integer value, 0 (no limit) being the default.
Then an option to order the list is of course desirable:
AGENTLIST_SORT, with an integer value:
AGENTLIST_SORT_BYDISTANCE : sort agents by distance from the scripted object
AGENTLIST_SORT_BYNAME : sort agents by (legacy) name
AGENTLIST_SORT_BYAGE : sort them by age
(to be completed)
And an associated option to specify the sorting order:
AGENTLIST_SORTINGORDER, with integer value: 0 (default) for ascending, 1 for descending order
Other options to filter the list may also be useful: by minimum aga, by maximum age, by minimum distance, by maximum distance, by payment info .... (and possibly other filters).
Log In
Nexii Malthus
Likewise the other way around is that currently
systems can break or have undefined behavior when regions go beyond 100 agents
, because llGetAgentList is capped at 100 agents.Also as others have chimed in, it would be super cool to be able to run llGetAgentList and be able to limit output based on axis aligned bounding box and/or sphere (distance).
Inoue Katsu
I would like to add to this to have an option that just returns the agents either inside a box by specifying 2 vectors, which will probably be resource intensive for the sim, or between 2 altitudes, which is probably easier to implement.
Currently a lot of scripts using llGetAgentList will bug out on sims that have 70+ people due to scripting engine limitations. Limiting to an altitude block could relieve this issue.
Splitting a sim into multiple parcels tends to give issues with available prims.
This tends to be mainly a problem for roleplay sims.
Certified Lunasea
Would be nice if the list returned was based on the order in which the avatars entered the region too rather than being seemingly random. Then it might be easier to implement some parameters like a starting index and ending index so that we can process the data by slicing it into more manageable chunks than we currently might get.
Andromeda Quonset
Might be useful to return an int of the number of agents in a list, then set out to get agents 0-5, then 5-10, and so on until the number of agents is slowly processed.
Kimpa Tammas
Currently, llGetAgentList returns a maximum list of 100 UUIDs. So you know the maximum size to reserve in the script.
SL Feedback
Hello, and thank you for your detailed feature request regarding enhancements to llGetAgentList(). This idea has been brought up in the past and is currently tracked. We understand the importance of improving this function to avoid stack/heap collisions and to provide more useful options for sorting and filtering the returned list. While we have no estimate on when these improvements may be implemented, please keep an eye on future updates. We appreciate your input and hope you continue to share your ideas to help improve Second Life. Thank you!
SL Feedback
tracked