prim animator timer (DEBUG).lsl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // :CATEGORY:XS Pet
  2. // :NAME:XS Pet Robot
  3. // :AUTHOR:Ferd Frederix
  4. // :KEYWORDS: Pet,XS,breed,breedable,companion,Ozimal,Meeroo,Amaretto,critter,Fennux,Pets
  5. // :CREATED:2013-09-06
  6. // :EDITED:2014-01-30 12:24:21
  7. // :ID:988
  8. // :NUM:1461
  9. // :REV:0.50
  10. // :WORLD:Second Life, OpenSim
  11. // :DESCRIPTION:
  12. // XS Pet xs_prim_animator_timer
  13. // :CODE:
  14. // xs_prim_animator_timer
  15. // Used to debug the amimator. This makes the pet stand, wave, stand, and walk
  16. // Version 0.31 12-03-2011
  17. // added ENCRYPT global variable
  18. /////////////////////////////////////////////////////////////////////
  19. // This code is licensed as Creative Commons Attribution/NonCommercial/Share Alike
  20. // See http://creativecommons.org/licenses/by-nc-sa/3.0/
  21. // Noncommercial -- You may not use this work for commercial purposes
  22. // 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.
  23. // This means that you cannot sell this code but you may share this code.
  24. // You must attribute authorship to me and leave this notice intact.
  25. //
  26. // Exception: I am allowing this script to be sold inside an original build.
  27. // You are not selling the script, you are selling the build.
  28. // Ferd Frederix
  29. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  30. //* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  31. //* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
  32. // in the documentationand/or other materials provided with the distribution.
  33. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  34. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
  35. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  36. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  37. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  38. // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. ////////////////////////////////////////////////////////////////////
  40. integer counter;
  41. default
  42. {
  43. state_entry()
  44. {
  45. llSetTimerEvent(5);
  46. }
  47. timer()
  48. {
  49. if (counter++ == 0)
  50. {
  51. llMessageLinked(LINK_SET,1,"stand","");
  52. llSleep(1.0);
  53. llMessageLinked(LINK_SET,1,"wave","");
  54. llSleep(1.0);
  55. llMessageLinked(LINK_SET,1,"stand","");
  56. }
  57. else if (counter == 2)
  58. {
  59. llMessageLinked(LINK_SET,1,"left","");
  60. llSleep(.5);
  61. llMessageLinked(LINK_SET,1,"right","");
  62. llSleep(.5);
  63. llMessageLinked(LINK_SET,1,"left","");
  64. llSleep(.5);
  65. llMessageLinked(LINK_SET,1,"right","");
  66. llSleep(.5);
  67. llMessageLinked(LINK_SET,1,"stand","");
  68. }
  69. else if (counter == 3)
  70. {
  71. llMessageLinked(LINK_SET,1,"sleep","");
  72. llSleep(.5);
  73. }
  74. else
  75. {
  76. counter = 0;
  77. }
  78. }
  79. }