DEBUG prim animator timer.lsl 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // xs_prim_animator_timer
  2. // Used to debug the amimator. This makes the pet stand, wave, stand, and walk
  3. /////////////////////////////////////////////////////////////////////
  4. // This code is licensed as Creative Commons Attribution/NonCommercial/Share Alike
  5. // See http://creativecommons.org/licenses/by-nc-sa/3.0/
  6. // Noncommercial -- You may not use this work for commercial purposes
  7. // If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
  8. // This means that you cannot sell this code but you may share this code.
  9. // You must attribute authorship to me and leave this notice intact.
  10. //
  11. // Exception: I am allowing this script to be sold inside an original build.
  12. // You are not selling the script, you are selling the build.
  13. // Ferd Frederix
  14. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  15. //* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  16. //* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
  17. // in the documentationand/or other materials provided with the distribution.
  18. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  19. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
  20. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  21. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  22. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  23. // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. ////////////////////////////////////////////////////////////////////
  25. integer counter;
  26. default
  27. {
  28. state_entry()
  29. {
  30. llSetTimerEvent(5);
  31. }
  32. timer()
  33. {
  34. if (counter++ == 0)
  35. {
  36. llMessageLinked(LINK_SET,1,"stand","");
  37. llSleep(1.0);
  38. llMessageLinked(LINK_SET,1,"wave","");
  39. llSleep(1.0);
  40. llMessageLinked(LINK_SET,1,"stand","");
  41. }
  42. else if (counter == 2)
  43. {
  44. llMessageLinked(LINK_SET,1,"left","");
  45. llSleep(.5);
  46. llMessageLinked(LINK_SET,1,"right","");
  47. llSleep(.5);
  48. llMessageLinked(LINK_SET,1,"left","");
  49. llSleep(.5);
  50. llMessageLinked(LINK_SET,1,"right","");
  51. llSleep(.5);
  52. llMessageLinked(LINK_SET,1,"stand","");
  53. }
  54. else if (counter == 3)
  55. {
  56. llMessageLinked(LINK_SET,1,"sleep","");
  57. llSleep(5);
  58. }
  59. else
  60. {
  61. counter = 0;
  62. }
  63. }
  64. }