Jump to content
Sign in to follow this  
rachel435

Script for uploading & rotating pictures in picture frame

Recommended Posts

How can I write a script or acquire a script so users can upload multiple photos to a picture frame and the frame automatically rotates between the pipctures?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...