Presentation Board

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Indentation)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 +
{{Quicklinks}}
 +
 
<source lang=lsl>
 
<source lang=lsl>
 
integer slidecount = 0;
 
integer slidecount = 0;
 
list inventory;
 
list inventory;
 +
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        string  name;
 +
        integer i;
 +
        integer num = llGetInventoryNumber(INVENTORY_TEXTURE);
  
default {
+
         for (i = 0; i < num; ++i)
 
+
         {
    state_entry() {
+
            name = llGetInventoryName(INVENTORY_TEXTURE, i);
    string  name;
+
            inventory += name;
    integer i;
+
        }
    integer num = llGetInventoryNumber(INVENTORY_TEXTURE);
+
    }
         for (i = 0; i < num; ++i) {
+
         name = llGetInventoryName(INVENTORY_TEXTURE, i);
+
    touch_start(integer number)
        inventory += name;
+
    {
 +
        if (slidecount == (llGetListLength(inventory)))
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "Dit was de laatste slide. Presentatie wordt herladen...");
 +
            slidecount = 0; 
 
         }
 
         }
 +
       
 +
        llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, slidecount), ALL_SIDES);
 +
        slidecount += 1;
 
     }
 
     }
   
 
    touch_start(integer num_detected) {
 
        if(slidecount == (llGetListLength(inventory))) {
 
        llSay(0,"Dit was de laatste slide. Presentatie wordt herladen...");
 
        slidecount = 0; 
 
        }       
 
    llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, slidecount), ALL_SIDES);
 
    slidecount +=1;
 
    }   
 
 
}
 
}
 
</source>
 
</source>

Latest revision as of 14:07, 28 September 2020

integer slidecount = 0;
list inventory;
 
default
{
    state_entry()
    {
        string  name;
        integer i;
        integer num = llGetInventoryNumber(INVENTORY_TEXTURE);
 
        for (i = 0; i < num; ++i)
        {
            name = llGetInventoryName(INVENTORY_TEXTURE, i);
            inventory += name;
        }
    }
 
    touch_start(integer number)
    {
        if (slidecount == (llGetListLength(inventory)))
        {
            llSay(PUBLIC_CHANNEL, "Dit was de laatste slide. Presentatie wordt herladen...");
            slidecount = 0;   
        }
 
        llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, slidecount), ALL_SIDES);
        slidecount += 1; 
    }
}
Personal tools
General
About This Wiki