Jump to content
You are about to reply to a thread that has been inactive for 3196 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

So, essentially. What I'm hoping to do is write a script that reads the info of all those present in a paricular sim, including their UUID/current co-ords, and reports it in an orderly fashion from nearest to furthest. Is that possible?

Posted

And once you've used those two functions, you're going to have to learn how to manage lists. The list of agent keys (UUIDs) returned by llGetAgentList will be in random order. You want them sorted by distance from the script. So you must execute llGetObjectDetails once for every agent in the list, building another list containing the UUID, position, and distance from the script, for each agent. Distance isn't reported, so you must calculate it from both the script's position and that of each agent.

Once that list is built, you'll sort it with llListSort. That sorts on the first element of each "stride", where a stride is the sub-list of data you obtained from each agent. You select the stride size to encompass the information you've obtained/calculated from each agent. And because sorts are done on the first element of each stride, you'll want to build that llGetObjectDetails list with each agent's distance information first, followed by UUID and then position. If that's all you collect/report, your stride will be three.

 

You are about to reply to a thread that has been inactive for 3196 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...