PageRenderTime 26ms CodeModel.GetById 24ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/AuroraDocs/OSSLFunctions/osAvatarPlayAnimation.lsl

https://bitbucket.org/VirtualReality/software-testing
Unknown | 38 lines | 37 code | 1 blank | 0 comment | 0 complexity | 05b027aae4f3565b35cf938f3d03a555 MD5 | raw file
 1// ----------------------------------------------------------------
 2// Example / Sample Script to show function use.
 3//
 4// Script Title:    osAvatarPlayAnimation.lsl
 5// Script Author:   WhiteStar Magic
 6// Threat Level:    VeryHigh
 7// Script Source:   
 8//
 9// Notes: See Script Source reference for more detailed information
10// This sample is full opensource and available to use as you see fit and desire.
11// Threat Levels only apply to OSSL & AA Functions
12//================================================================
13// Inworld Script Line:    osAvatarPlayAnimation(key targetuuid, string anim);
14//
15// NOTE:  anim can be the Name (if contained in prim) or UUID of the animation
16//
17default
18{
19    state_entry()
20    {
21        llSay(0, "Touch to have Avatar use contained animation with osAvatarPlayAnimation ");
22    }
23   
24    touch_end(integer num)
25    {
26        string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);
27        if(anim == "") 
28        {
29            llOwnerSay("ERROR: Animation Missing. Please drop an animation in the prim with this script");
30            return;
31        }
32        else
33        {
34            llOwnerSay("Now Playing "+anim+" animation");
35            osAvatarPlayAnimation(llDetectedKey(0), anim);
36        }
37    }
38}