/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. //
  17. default
  18. {
  19. state_entry()
  20. {
  21. llSay(0, "Touch to have Avatar use contained animation with osAvatarPlayAnimation ");
  22. }
  23. touch_end(integer num)
  24. {
  25. string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);
  26. if(anim == "")
  27. {
  28. llOwnerSay("ERROR: Animation Missing. Please drop an animation in the prim with this script");
  29. return;
  30. }
  31. else
  32. {
  33. llOwnerSay("Now Playing "+anim+" animation");
  34. osAvatarPlayAnimation(llDetectedKey(0), anim);
  35. }
  36. }
  37. }