Advertisement
RuthvenWillenov

Untitled

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