Difference between revisions of "User:Toady Nakamura/Hold Teddy Script"
Jump to navigation
Jump to search
m (put hold teddy script here) |
m (minor edit & watch) |
||
Line 1: | Line 1: | ||
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 [[User:Toady Nakamura|Toady Nakamura]] | |||
<lsl> | <lsl> | ||
string anim ="Hold"; // change this name to match the animation which is in the prim ! | |||
// | |||
default | default |
Revision as of 12:15, 14 May 2012
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>