User:Toady Nakamura/Hold Teddy Script
Jump to navigation
Jump to search
This script is useful for things like holding teddybears or sandwiches.
- You need an animation to put in the same prim. Here I named the animation "Hold"
- You have to change the animation name to the animation you include in the prim with the script.
- Script originally from a class by Minx Mousehold, modified by Toady Nakamura
<lsl>
string anim ="Hold"; // change this name to match the animation which is in the prim !
default {
attach(key wearer) { if(wearer == NULL_KEY) { llStopAnimation(anim); llSetTimerEvent(0); } else { llRequestPermissions(wearer,PERMISSION_TRIGGER_ANIMATION); }
}
run_time_permissions(integer permissions) { if (PERMISSION_TRIGGER_ANIMATION & permissions) { llStartAnimation(anim); llSetTimerEvent(15); } }
timer() { llStartAnimation(anim); } }
}
</lsl>