Babette Bogart
Registered User
Join date: 19 May 2005
Posts: 1
|
10-08-2005 10:32
Im making a photo album that needs to cycle through the textures in a specific order. The two scripts that I have....cycle textures and textureswitcher touch....both do that randomly. Can I edit them to cycle in a specific order?
This is a very special gift for someone.
Ty Babette
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
10-08-2005 11:00
The easy way - without code changes - is to notice that scripts have to use llGetInventoryName to know what its contents are and llGetInventoryName returns its results in alphabetical order. Thus, renaming the inventory contents from { able, baker, charlie } to { 01charlie, 02able, 03baker } would change the order that the images were displayed in. You could get trickier but I don't see much reason.
|
Nathan Stewart
Registered User
Join date: 2 Feb 2005
Posts: 1,039
|
10-08-2005 13:45
I think the script you have displays in random order, heres one i just cobbled up that displays in alphabetical order integer temp;
default { state_entry() { llSetTimerEvent(5.0); }
timer() { integer number = llGetInventoryNumber(INVENTORY_TEXTURE); if (temp < number) { temp = temp + 1; } else { temp = 0; } integer choice = (integer)temp; string name = llGetInventoryName(INVENTORY_TEXTURE, choice); if (name != "") llSetTexture(name, ALL_SIDES); } }
|