Advertisement
Guest User

Untitled

a guest
Oct 28th, 2024
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list slides = [];
  2.  
  3. getSlides()
  4. {
  5.     integer ii;
  6.     integer iiMax = llGetInventoryNumber(INVENTORY_MATERIAL);
  7.     string name;
  8.  
  9.     for (ii = 0; ii < iiMax; ii++)
  10.     {
  11.         name = llGetInventoryName(INVENTORY_MATERIAL, ii);
  12.         slides += [name];
  13.     }
  14. }
  15.  
  16. integer index;
  17.  
  18. newSlide()
  19. {
  20.     string material = llList2String(slides, index);
  21.     llSetRenderMaterial(material, 1);
  22.     index++;
  23.     if (index >= llGetListLength(slides))
  24.         index = 0;
  25. }
  26.  
  27. default
  28.  
  29. {
  30.     state_entry()
  31.     {
  32.         getSlides();
  33.         llSetTimerEvent(15);
  34.         index = 0;
  35.         newSlide();
  36.     }
  37.  
  38.     /*        touch_start(integer num)
  39.         {
  40.             index = 0;
  41.             newSlide();
  42.             llSay(0,"Starting slide show over");
  43.         }*/
  44.  
  45.     timer()
  46.     {
  47.         newSlide();
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement