I have three scripts in a single object:
> A script that controls the position and animation of the avatar.
> A script that sends messages to the users.
> A script that listens for commands and relays them via link message to the other scripts.
Today I observed that resetting the animation / positioning script sometimes causes llMoveToTarget to stop functioning.
When this happens:
> Code on both sides of the llMoveToTarget executes as normal, just like the line is not there.
> Rezing the object by taking it to inventory and back or logging out causes llMoveToTarget to behave normaly one again, but Teleportation does not.
This may be related to: /54/d4/78075/1.html
I would be very greatful for any ideas how I might solve this or what the cause may be. The code is rather long so I have only included an offending section:
// Globals
integer gFollowLength = 10;
integer gFollowTarget = 0;
integer gDebug = TRUE;
string gAction = "follow";
//Respond to Sensors
sensor(integer lNumber) {
vector tPosition = llDetectedPos(0);
//Continue Following
if (gAction == "follow"

vector tZPosition = llGetPos();
if( llVecDist(tPosition, tZPosition) > gFollowLength ) {
llTargetRemove(gFollowTarget);
gFollowTarget = llTarget(tPosition, gFollowLength - 0.5);
llMoveToTarget(tPosition, 3);
}
}
}
//Abandon Action If No Sensor Data
no_sensor() {
gAction = "";
llSensorRemove();
llTargetRemove(gFollowTarget);
llStopMoveToTarget();
if (gDebug) {llOwnerSay("*** Move To Target: Sensor Beyond Range."

}
//Stop At Target
at_target(integer lNumber, vector lPosition, vector lZPosition) {
llTargetRemove(gFollowTarget);
llStopMoveToTarget();
if (gDebug) {llOwnerSay("*** Move To Target: Completed."

}