I have made a wagon with a sit animation and script and I also put a follower script in it, but the results are not what I would like. I am new to scripting and I am sure there is a way to do what I am looking to do. The script I have follows me everywhere, spinning around like a slow spinning top nor can I get it to stop following me. Here is the script that I am using:
default
{
state_entry()
{
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);
}
}
I have just started trying my hand at scripts and hope to be doing more and more as I learn more. What I am hoping for is a touch command to follow and then a touch command to stop. There are many command to use and have not found a MoveWith command. Oh yes, I placed the follower script in the handle of the wagon. Of course I guess another option to to do a push script and have the ava in the wagon guide the direction to go. Thanks for any information.