Second Life Copybot
llGetAgentList() - Simple Radar Script - Printable Version

+- Second Life Copybot (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/forum-1.html)
+--- Forum: SCRIPTS (https://secondlifecopybot.com/forum-1022.html)
+---- Forum: SCRIPTS (https://secondlifecopybot.com/forum-8.html)
+----- Forum: Communication Scripts (https://secondlifecopybot.com/forum-46.html)
+----- Thread: llGetAgentList() - Simple Radar Script (/thread-664.html)



llGetAgentList() - Simple Radar Script - zion - 02-18-2013

PHP Code:
list gPeople = [];
list 
gDist = [];
default
{
    
state_entry()
    {
        
llSetTimerEvent(5.0);
    }

    
timer()
    {
        
gPeople llGetAgentList(AGENT_LIST_REGION, []);
        
gDist = [];
        
integer x;
        
integer num llGetListLength(gPeople);
        
vector pos llGetPos();
        for(;
x<num;x++)
            
gDist += [llVecDist(posllList2Vector(llGetObjectDetails(llList2Key(gPeoplex), [OBJECT_POS]), 0)), llKey2Name(llList2Key(gPeoplex))];
            
//gDist += [llVecDist(pos, llList2Vector(llGetObjectDetails(llList2Key(gPeople, x), [OBJECT_POS]), 0)), llGetDisplayName(llList2Key(gPeople, x))];
        
gDist llListSort(gDist21);
        
llSetText(llDumpList2String(gDist"\n"), <0,0,0>, 1.0);
    }