User:Toady Nakamura/Hold Teddy Script
< User:Toady Nakamura
Jump to navigation
Jump to search
Revision as of 16:30, 10 March 2012 by Toady Nakamura (talk | contribs) (put hold teddy script here)
<lsl>
// 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.
string anim ="Hold";
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>