Top Free Scripts
Script ID : 4
Audience : Default
Version 1.00.03
Published Date: 2006/10/13 5:20:15
Reads : 38609
Texture

Drop up to 10 different textures into an object and this script. It will change to the next texture automatically.

It will change textures in the order that they appear in the object's contents, (alphabetical,) so rename them to choose the order.

Currently it will change the texture on all sides. For just one side change "ALL_SIDES" whenver it appears to the side number you want. llSetTexture(name, 1) for example.

integer number;
string name;
integer choice 0;

default
{
    
state_entry()
    {
        
llSetTimerEvent(2.5); //How many seconds inbetween textures
        
number llGetInventoryNumber(INVENTORY_TEXTURE);
    }
    
timer()
    {
        if (
choice number)
        {
            
name llGetInventoryName(INVENTORY_TEXTUREchoice);
            if (
name != "")
            
llSetTexture(nameALL_SIDES);
            
choice choice 1;
        }
        else
        {
            
name llGetInventoryName(INVENTORY_TEXTUREchoice);
            if (
name != "")
            
llSetTexture(nameALL_SIDES);
            
choice 0;
        }
    }
    
changed(integer change)
    {
        if (
change CHANGED_INVENTORY
        {
            
llResetScript();
        }
    }
}

0
|  Links 
Printer Friendly Page Send this Script to a Friend
Search for Help
New Product
Free Item
Sponsor

Site Info
Total Hits