texture_test by touch.lsl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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:1454
  9. // :REV:0.50
  10. // :WORLD:Second Life, OpenSim
  11. // :DESCRIPTION:
  12. // XS Pet test code to make a pet change textures.
  13. // :CODE:
  14. // test code to make a pet change textures.
  15. // Just put this in a prim inside the pet, and touch it again and again.
  16. // The pet should change textures on any prim name that
  17. /////////////////////////////////////////////////////////////////////
  18. // This code is licensed as Creative Commons Attribution/NonCommercial/Share Alike
  19. // See http://creativecommons.org/licenses/by-nc-sa/3.0/
  20. // Noncommercial -- You may not use this work for commercial purposes
  21. // 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.
  22. // This means that you cannot sell this code but you may share this code.
  23. // You must attribute authorship to me and leave this notice intact.
  24. //
  25. // Exception: I am allowing this script to be sold inside an original build.
  26. // You are not selling the script, you are selling the build.
  27. // Ferd Frederix
  28. integer LINK_TEXTURE = 801; // ask for a new texture, or paint a color
  29. ///////// end global Link constants ////////
  30. vector colour1 = <1,1,1>;
  31. vector colour2 = <0,0,0>;
  32. integer sex = 1;
  33. integer shine = 0;
  34. float glow = 0.0;
  35. default
  36. {
  37. touch_start(integer total_number)
  38. {
  39. colour1.x = llFrand(1.0); // pick a random texture
  40. llOwnerSay("Breed Param:" + (string) colour1.x);
  41. string msg = (string) colour1 + "^" +
  42. (string) colour2 + "^" +
  43. (string) sex + "^" +
  44. (string) shine + "^" +
  45. (string) glow + "^";
  46. llMessageLinked(LINK_SET,LINK_TEXTURE,msg,NULL_KEY);
  47. }
  48. }