Jump to content

Cycling Textures in a squence


You are about to reply to a thread that has been inactive for 4145 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 comment
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 comment
Share on other sites

You are about to reply to a thread that has been inactive for 4145 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...