Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sensor detect to make List

Cryas Tokhes
Great Googley Moogley...
Join date: 8 Feb 2006
Posts: 124
05-20-2007 14:52
I am seeming to be having trouble with a script that I am working on. What I am attempting on doing is having a sensor detect all persons (AGENT) in a 20m radius (PI) and put these UUIDs to a List.

I know that I will have to do some type of Do/while, or For loops to list all llDetectKeys and put this to a list.

My next thing is after this is all done, and all members are detected and the list is formed, the list of UUIDs are compiled into a list of names using llKey2Name. This list of names is then used in a llDialog to allow me to select an individual person from the list... The rest of the programming I can do. I am just having an issue with the generation of the list from the sensor and then having the llDialog come up AFTER the list has been generated.

Oh yeah, and this has to either all be done in the

If a script can be shown to me I can pick it apart and get it to work. I may be missing it, but I thought that when a llSensor is called, that it has to complete before it executes the next line under the llSensor request. If they run parallel then that would be a headache.

Any ideas of how I can complete this goal?
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
05-20-2007 15:59
CODE

sensor(integer num_detected)
{
in teger x;
do
{
list += llDetectedKey(x);
}
while (++x < num_detected);
}


something like that... havent tested it might be off abit
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-21-2007 00:07
Try this thread for an example
_____________________
I'm back......