Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

targetting an avatar

Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
03-16-2005 18:47
I want to rez an object from and have it go to a certain avatar. Here's what I have so far:

state_entry()
{
llSensor("","",AGENT,10,PI);
}

sensor(integer detected)
{
integer i;
for (i = 0; i < detected; i++)
{
targets += llDetectedKey(i);
}
shuffled = llListRandomize(targets,1);
target = llList2Key(shuffled,0);

How do I get an object to rez and go to the avatar "target" ?
Lance LeFay
is a Thug
Join date: 1 May 2003
Posts: 1,488
03-16-2005 19:12
Here's what you could do-


In your rezzer, have it take the name using llGetSubString, or llParseString2List (If I just do it for you, you wont learn ;P). Have it rez the object using llRezObject, which will trigger the event object_rez(). have this say the name on a channel, which the rezzed object will pick up (with llListen, and and the event listen()). Then call llSensor, or llSensorRepeat, depending, using the name as the first argument. Under sensor(), use a while loop with llSetPos(pos).


www.secondlife.com/badgeo for anything you don't understand.
_____________________
"Hoochie Hair is high on my list" - Andrew Linden
"Adorable is 'they pay me to say you are cute'" -Barnesworth Anubis
Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
03-16-2005 19:33
Ok, lemme try