Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Follow Script

Dan Colville
Registered User
Join date: 28 Jul 2006
Posts: 26
09-19-2008 23:34
Hi guys I got a follow script and was able to fix the last problem but now. with the script that i have.
default
{
state_entry()
{
//llSetBuoyancy( .75 );
vector pos = llGetPos();
llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);
llSetStatus(STATUS_PHYSICS, TRUE);
llSleep(0.1);
llMoveToTarget(pos,0.1);
key id = llGetOwner();
llSensorRepeat("",id,AGENT,20,2*PI,.4);
}

sensor(integer total_number)
{
vector pos = llDetectedPos(0);
vector offset =<-1,0,0>;
pos+=offset;
llMoveToTarget(pos,.3);
}
}

Some times when i walk around my Eve start to follow other people i don't know if they are clicking on it or something. So Is there something that i need to change to it only followers the owner.

Thanks for your help.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
09-20-2008 00:33
the functions that are called in the state entry look odd to me. but it looks like it should only be following the owner, don;t know what would make it follow someone else. what about trying this one?

From: someone

default
{
state_entry()
{
llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, TRUE);
llSetStatus(STATUS_PHYSICS, TRUE);
llSensorRepeat("",llGetOwner(),AGENT,96.0,PI,1.0);
}
sensor(integer Number)
{
vector position=llDetectedPos(0);
vector Offset=< -1.0, 0.0, 1.5>;
position+=Offset*llDetectedRot();
llSetStatus(STATUS_PHYSICS, TRUE);
llMoveToTarget(position,0.4);
llLookAt(llDetectedPos(0)+<0.0, 0.0, 1.0>,0.5,0.5);
}
}
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369