llStopMoveToTarget
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llStopMoveToTarget( );71 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Stops critically damped motion
Use in conjunction with llMoveToTarget
To stop rotation movement use llStopLookAt
Caveats
Examples
integer gLockPrimInPlace;
default
{
on_rez(integer sp)
{
llResetScript();
}
state_entry()
{
llStopMoveToTarget();
llSetStatus(STATUS_PHYSICS, TRUE);
}
touch_start(integer total_number)
{
if (llDetectedKey(0) != llGetOwner())
{
return;
}
if (!llGetStatus(STATUS_PHYSICS))
{
llOwnerSay("Locking or unlocking position works only for physical objects.");
return;
}
gLockPrimInPlace = !gLockPrimInPlace;
if (gLockPrimInPlace)
{
llMoveToTarget(llGetPos(), 0.05);
llOwnerSay("Locked in place.");
}
else
{
llStopMoveToTarget();
llOwnerSay("Unlocked.");
}
}
}