Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Target

shenanigan Oh
Registered User
Join date: 28 Apr 2007
Posts: 13
12-19-2008 17:05
I been working on a script where when you touch the object it sets a Dialog to you with avatars name witch are in the sims or close by, but I'm suck on what I need to do next. I'm a n00b scripted so be kinda to me:)

CODE

key target;
vector offset = <0.55,0,-0.2>;
rotation rot = <0,0,0,1>;
default
{
on_rez(integer n)
{
llResetScript();
}

state_entry()
{

}


touch_start(integer total_number)
{
target = llDetectedName(0);
llListen(9889,"",target,"");
llSensor("",NULL_KEY,AGENT,96,PI);
}


no_sensor()
{
llSay(0,"but there's nobody here :(");
}

sensor(integer num)
{
list targets;
integer i;
if(num > 12)
num = 12;
for(i=0;i<num;i++)
{
targets += [llDetectedName(i)];
}
llDialog(target,"Select your target",targets,9889);
}



listen(integer channel, string name, key id, string message)
{
llSetPos(llDetectedPos(0));
llSetRot(llDetectedRot(0));
}
}
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
12-19-2008 18:13
i think (it looks like)you need to store all the positions in your sensor event id use a strided list
the listen event dosent know what position you chose just the name from dialog
_____________________
L$ is the root of all evil
videos work! thanks SL :)