Change font size
It is currently Thu Nov 22, 2018 5:40 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 1 post ]
Author Message
 Post subject: Timed Texture Changer
PostPosted: Wed Mar 18, 2009 7:09 pm 
Furious Typer
User avatar

Joined: Sun Aug 31, 2008 4:34 pm
Posts: 107
Walls or Slide shows
{L_CODE}:
//drop in prim contents with textures
float time = 30; //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);
    }

    timer()
    {
        next();
    }
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 1 post ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net