wing flap script.lsl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // :CATEGORY:Follower
  2. // :NAME:Keyframe Follower
  3. // :AUTHOR:Ferd Frederix
  4. // :KEYWORDS:
  5. // :CREATED:2014-12-04 12:15:10
  6. // :EDITED:2014-12-04
  7. // :ID:1058
  8. // :NUM:1687
  9. // :REV:1
  10. // :WORLD:Second Life
  11. // :DESCRIPTION:
  12. // Wing flap script for a X-wing uses a special texture, 1/4 wing upperl left, 1/4 wing lower right
  13. // :CODE:
  14. default
  15. {
  16. state_entry()
  17. {
  18. llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 1, 2, 0.0, 2.0, 5);
  19. }
  20. link_message(integer sender, integer num, string str, key id)
  21. {
  22. // llOwnerSay(str);
  23. if (str=="up"){
  24. llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 1, 2, 0.0, 2.0, 5);
  25. llSetTimerEvent(0.5);
  26. }
  27. else if (str=="down") {
  28. llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 1, 2, 0.0, 2.0, 2);
  29. llSetTimerEvent(0.7);
  30. }
  31. else if (str=="land") {
  32. llSetTimerEvent(0);
  33. llStopSound();
  34. }
  35. }
  36. timer()
  37. {
  38. llTriggerSound("wing4", 0.5);
  39. }
  40. on_rez(integer p)
  41. {
  42. llResetScript();
  43. }
  44. }