Jump to content

Cycling Textures in a squence


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

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

Recommended Posts

I have about 50 textures I would like to cycle on one prim face (not all sides and to many to put in a 1024x1024 texture animation)

I can get it to cycle between the items in the prims inventory (ie: pic0001,pic0002,pic0003,pic0004 etc.)

Using llSetTexture in a 'for' loop seems to work but the texture never changes from the first shown..

Any trick to this?

 

Link to post
Share on other sites

If you do a for loop, the script will change a texture every time the loop executes, cycling through all your textures faster than they can rez and certainly faster than your eye could see them change if they ever did rez.  You don't want a loop.  You want a timer, as in ....

timer(){    llSetTexture(llGetInventoryName(INVENTORY_TEXTURE,++gCount%num),face);}

 where you have defined gCount as a global integer, num as a global integer = llGetInventoryNumber(INVENTORY_TEXTURE), and face as an integer that is your face number.

In fact, though, it will take a long time for a 1024 x 1024 texture to rez, so most of the time people will see a gray or blurry screen as the script cycles the next texure into view.  (Insert the standard warning about never using 1024 x 1024 textures in SL unless absolutely necessary here.)  What you really need is a way to pre-load the textures and give people who want to see them a fighting chance.  Try this one >>> http://community.secondlife.com/t5/LSL-Library/Preloading-Slide-Viewer/td-p/1723417

 

Link to post
Share on other sites

Might be better to take this to the scripting forum but as Rolig says, the for loop method will work, are you sure you're setting the texture to show on the correct face?

You will need to use a variable of some sort in the loop or in the timer as Rolig demonstrates..

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 3001 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...