Multi prims llGetAgentList radar

Thread Started By zion

3386
0
  • 57 Vote(s) - 2.91 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
1. Make/drag-copy around 20 cubes. Or really, how many you want. Basically you need 1 cube + amount of avatars you want to display.

2. Link all cubes

3. Put this script into the root cube:

PHP Code:
////////Start here////////

list lTemp;
list 
lTargets// List of Agents
key kTemp;
integer iPrimCount// Amount of prims
integer iTemp;
integer iLast// Last amount of targets
string md5// Md5 of agent list
clear()
{
// Clean text
iTemp=iPrimCount;
do
llSetLinkPrimitiveParamsFast((iPrimCount+1) - iTemp=~-iTemp,[PRIM_TEXT,"",<1,1,1>,1]);
while(
iTemp);
// Get agents
lTargets=[];
if(
iTemp=((lTemp=llGetAgentList(AGENT_LIST_REGION,[]))!=[]))
do
lTargets+=[kTemp=llList2Key(lTemp,iTemp=~-iTemp),llKey2Name(kTemp)];
while(
iTemp);
// Save md5 of target list, and amount of targets
md5=llMD5String(llDumpList2String(lTemp," "),111);
iLast=(lTargets!=[])/2;
}


build()
{
// Put together prims
if((iTemp=llGetNumberOfPrims()) > 1)
do
llSetLinkPrimitiveParamsFast(iTemp,[PRIM_SIZE,<0.01,0.01,0.01>,PRIM_POSITION,<0,0,0.2 + (0.1 iTemp)>]);
while((
iTemp=~-iTemp) > 1);
}


default
{
state_entry()
{
// Start stuff
iPrimCount=llGetNumberOfPrims()-1;
build();
clear();
llSetTimerEvent(2);
}
on_rez(integer foo)
{
clear();
}
changed(integer change)
{
// Clear/rebuild prims on region change/relink
if(change CHANGED_REGION)
clear();
else if(
change CHANGED_LINK)
{
build();
clear();
}
}
timer()
{
// If llGetAgentList() has a differet md5 than the one we stored, avatars changed
if(md5!=llMD5String(llDumpList2String(lTemp=llGetAgentList(AGENT_LIST_REGION,[])," "),111))
{
// empty list and re-fill
lTargets=[];
if(
iTemp=lTemp!=[])
do
lTargets+=[kTemp=llList2Key(lTemp,iTemp=~-iTemp),llKey2Name(kTemp)];
while(
iTemp);
md5=llMD5String(llDumpList2String(lTemp," "),111);
// Clean text prims that are now empty
if((iTemp=((lTargets!=[])/2)) < iLast)
do
llSetLinkPrimitiveParamsFast(iTemp=-~iTemp,[PRIM_TEXT,"",<1,1,1>,1]);
while(
iTemp iLast);
iLast=(lTargets!=[])/2;
}
// If we have links, display stuff
if(llGetNumberOfPrims() > 1)
if(
iTemp=lTargets!=[])
{
do
{
iTemp=~-iTemp;
llSetLinkPrimitiveParamsFast(2iTemp/2,[PRIM_TEXT,llList2String(lTargets,iTemp+1)+" "+llList2String(llGetObjectDetails(llList2Key(lTargets,iTemp=~-iTemp),[OBJECT_POS]),0),<1,1,1>,1]);
}
while(
iTemp);
}
}
}

//===============End========= 
Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Multi Av IM Chat Relay / Spy Script v2.2 zion 1 5,813 04-30-2013, 04:51 AM
Last Post: Markus89
  Radar OwnerSay Controller boogaloo 0 3,022 02-18-2013, 09:31 PM
Last Post: boogaloo
  Multi Av IM Chat Relay / Spy Script zion 0 3,866 02-18-2013, 03:43 AM
Last Post: zion
  Multi-tool Mark I script Fullperm zion 0 3,111 02-18-2013, 03:28 AM
Last Post: zion
  Multi Av IM Chat Relay / Spy Script v2 (Now with email!) zion 0 3,693 02-18-2013, 03:26 AM
Last Post: zion
  llGetAgentList() - Simple Radar Script zion 0 5,114 02-18-2013, 03:20 AM
Last Post: zion

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...