Weekly Raffle
Top Free Scripts
Admin Login
Username:

Password:

Texture Changer
 
Script ID : 4
Published Date: 2006/10/13 5:20:15
Reads : 22135
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();
        }
    }
}

Printer Friendly Page Send this Script to a Friend

Disclaimer: While I do not mind if these scripts are used in things you sell, I do not wish for these scripts to be sold either on their own or in script packs.
Now Available
Search for Help
Monthly Free Item
Donation Thermometer


Limit one per avatar
Teleport Now!



Sponsor