Jump to content

Script for uploading & rotating pictures in picture frame


rachel435
 Share

You are about to reply to a thread that has been inactive for 4202 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

There are a couple of ways to put a texture on a prim.  The simplest is llSetTexture.  If you write your script with a timer event that sets a new texture every time it is triggered, that should do the trick.  All you have to do is grab a new texture from your object's Contents with llGetInventoryName(INVENTORY_TEXTURE,i), where you change i each time the timer fires.  Just remember to reset i to zero when you have displayed the last texture in inventory.

Link to comment
Share on other sites

integer amount_of_textures_in_inventory()

{

    string name; integer amount;

    do

    {

        name = llGetInventoryName(INVENTORY_TEXTURE,amount);

        amount++;

    }

    while(name != "");    return (amount-1);

}//amount_of_textures_in_inventory

 

integer i;

 

default

{

    state_entry()

    {

       llSetTimerEvent(5);

    }

 

    touch_start(integer total_number)

    {

        

    }

    

    timer()

    {

       

        llSetTexture(llGetInventoryName( INVENTORY_TEXTURE, i ),0);

        i++;

        if(i>=amount_of_textures_in_inventory())

        {i=0;}

    

    

    }

    

}

 

 

This program might help you.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4202 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...