CODE
integer SIDE = 1;
float INCREMENT = 0.001; // slow
//float INCREMENT = 0.01; // fast
integer g_iTotal;
integer g_iPosition;
makeFader(integer iSide, float fDecremento)
{
vector vColor = llGetColor(iSide);
while((vColor.x > 0.0) && (vColor.y > 0.0) && (vColor.z > 0.0)) {
if (vColor.x > fDecremento) {
vColor.x -= fDecremento;
} else {
vColor.x = 0.0;
} // if
if (vColor.y > fDecremento) {
vColor.y -= fDecremento;
} else {
vColor.y = 0.0;
} // if
if (vColor.z > fDecremento) {
vColor.z -= fDecremento;
} else {
vColor.z = 0.0;
} // if
llSetColor(vColor, iSide);
} // while
} // makeFader
makeUnFader(integer iSide, float fIncremento)
{
vector vColor = llGetColor(iSide);
while((vColor.x < 1.0) && (vColor.y < 1.0) && (vColor.z < 1.0)) {
if (vColor.x < (1.0 - fIncremento)) {
vColor.x += fIncremento;
} else {
vColor.x = 1.0;
} // if
if (vColor.y < (1.0 - fIncremento)) {
vColor.y += fIncremento;
} else {
vColor.y = 1.0;
} // if
if (vColor.z < (1.0 - fIncremento)) {
vColor.z += fIncremento;
} else {
vColor.z = 1.0;
} // if
llSetColor(vColor, iSide);
} // while
} // makeUnFader
default {
state_entry() {
g_iTotal = llGetInventoryNumber(INVENTORY_TEXTURE);
llOwnerSay("Starting ... There are " + (string) g_iTotal + " textures");
g_iPosition = 0;
if (g_iTotal > 0) {
llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, g_iPosition), SIDE);
g_iPosition = (g_iPosition + 1) % g_iTotal;
} // if
} // state_entry
on_rez(integer start_param) {
llResetScript();
} // on_rez
changed(integer change) {
if (change == CHANGED_INVENTORY) {
llResetScript();
} // if
} // changed
touch_start(integer total_number) {
if (g_iTotal > 0) {
makeFader(SIDE, INCREMENT);
llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, g_iPosition), SIDE);
g_iPosition = (g_iPosition + 1) % g_iTotal;
makeUnFader(SIDE, INCREMENT);
// You can use this lines instead makeUnFader()
//vector vColor = <1.0, 1.0, 1.0>;
//llSetColor(vColor, SIDE);
} else {
llOwnerSay("Not found textures in inventary");
} // if
} // touch_start
} // default
but is it possible to make it so that it goes through the pics automatically?been trying but im not a scripter at all