Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

So How do you ???

Kurt Ludd
"The Gesture maker"
Join date: 27 Sep 2005
Posts: 229
06-21-2006 17:09
I have a script that cycles thru textures on a prim, But how do u make it only cycle on one face ?

Heres the script that I am using:


//From the script library
//Writen by Strife Onizuka
//http://secondlife.com/badgeo/wakka.php?wakka=LibraryTextureSwitcher

float time = 10; //give me a value if you want time based shifting otherwise set to zero

integer total;
integer counter;

next()
{
string name = llGetInventoryName(INVENTORY_TEXTURE,counter);
if(name == "";)
{
total = llGetInventoryNumber(INVENTORY_TEXTURE);
counter = 0;
if(total < 1)
return;
else
name = llGetInventoryName(INVENTORY_TEXTURE,counter);
}
else if(counter + 1 >= total)
total = llGetInventoryNumber(INVENTORY_TEXTURE);
llSetTexture(name ,ALL_SIDES);
if(total)
counter = (counter + 1) % total;
}

default
{
state_entry()
{
total = llGetInventoryNumber(INVENTORY_TEXTURE);
next();
llSetTimerEvent(time);
}
// touch_start(integer a)
// {
// llSetTimerEvent(0);
// next();
// llSetTimerEvent(time);
// }
timer()
{
next();
}
}


Thanks for any help
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
06-21-2006 17:18
CODE
 llSetTexture(name ,ALL_SIDES);


Change ALL_SIDES to the number of the side that you want. There's a page on the Wiki that will tell you which number means what, but it might be easier to just start with 0, 1, 2, ... etc. until you find the number that matches the side you want to change textures on.
Kurt Ludd
"The Gesture maker"
Join date: 27 Sep 2005
Posts: 229
Thank YOU
06-21-2006 17:29
Thanks, New it was something simple,



TY

Kurt Ludd