SHOW:
|
|
- or go back to the newest paste.
1 | - | list slides = []; |
1 | + | integer iiMax;//how many materials in the inventory. updates in getSlides below |
2 | integer index; | |
3 | getSlides() | |
4 | { | |
5 | - | integer ii; |
5 | + | |
6 | } | |
7 | - | string name; |
7 | + | |
8 | newSlide() | |
9 | - | for (ii = 0; ii < iiMax; ii++) |
9 | + | |
10 | index++; | |
11 | - | name = llGetInventoryName(INVENTORY_MATERIAL, ii); |
11 | + | if (index >= iiMax)index = 0; |
12 | - | slides += [name]; |
12 | + | string material = llGetInventoryName(INVENTORY_MATERIAL,index); |
13 | llSetRenderMaterial(material, 1); | |
14 | } | |
15 | ||
16 | default | |
17 | ||
18 | { | |
19 | state_entry() | |
20 | - | string material = llList2String(slides, index); |
20 | + | |
21 | getSlides(); | |
22 | llSetTimerEvent(15); | |
23 | - | if (index >= llGetListLength(slides)) |
23 | + | |
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 | } |