Advertisement
Gayngel

Untitled

Jan 23rd, 2015
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. //This script changes texture on a timer and in order. Change the float of llSetTimerEvent to increase or decrease the time between texture changes. To order you textures name them chronologically or alphabetically.
  2.  
  3. integer numberTextures = 0;
  4. integer currentTexture = 0;
  5.  
  6.  
  7. ChangeTexture ()
  8. {
  9. llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, currentTexture), ALL_SIDES);
  10. if (currentTexture < numberTextures -1)
  11. currentTexture++;
  12. else
  13. currentTexture = 0;
  14. }
  15. default
  16. {
  17. state_entry ()
  18. {
  19. numberTextures = llGetInventoryNumber(INVENTORY_TEXTURE);
  20. llAllowInventoryDrop (TRUE);
  21. llSetTimerEvent (20.0);
  22. ChangeTexture ();
  23. }
  24. timer ()
  25. {
  26. ChangeTexture ();
  27. }
  28. touch_start (integer touches)
  29. {
  30. ChangeTexture ();
  31. }
  32. changed (integer Change)
  33. {
  34. if (Change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
  35. ChangeTexture ();
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement