Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A script for following me

Perl Hallstrom
Registered User
Join date: 12 Jun 2007
Posts: 33
06-29-2007 02:40
I want to have a script to get an other avatar to follow me when I go away. Or even better also when I fly. The best would be a one where we could hold hands.

Anyone know an example of that. Or can help me with what functions I need to use.

/Perl
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-29-2007 03:55
I think there are a bunch of products that do more or less what's desired, and (hint) for the holding hands part, one might check the stores of animators.

To script this, one might start with llMoveToTarget() called within an attachment worn by the follower, and a way of selecting which avatar's position to follow, the key of whom you might get by selecting among results of llSensor() for an agent within a reasonably close range. Or, I suppose, one could hard-code one's own key into the script, to be followed by whomever wears it. Either way, the location of that particular lead avatar must be tracked, perhaps with an llSensorRepeat() specific to the lead avatar's key, and target some offset from llDetectedPos(), probably as a function of llDetectedRot() and/or possibly llDetectedVel().

Ultimately follower scripts are never entirely satisfactory because of the limited accuracy of keeping up with the target (a function of update frequency, lag, etc) and even worse, the fact that a script cannot directly control the rotation of an unseated avatar--so the followers may sometimes be pulled backwards in the wake of their leader.
Perl Hallstrom
Registered User
Join date: 12 Jun 2007
Posts: 33
The best animator store
06-29-2007 04:23
Wher can I find the best animator store? I havent seen so many yet.

/Per