Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: texture picker see 5 at once

RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
12-06-2005 12:29
CODE


integer current_number = 0;

default
{
state_entry()
{
llSay(0,"just drop a bunch of thextures in this prim make the top of the prim small and flatten it so you see 5 sides at once then touch it");

}

touch(integer currentnumber)
{
integer number_of_textures = llGetInventoryNumber(INVENTORY_TEXTURE); // if 5 textures are in inventory, this will return 5.
string sound_name = llGetInventoryName(INVENTORY_TEXTURE, current_number); // llGetInventoryName starts counting at 0.
string sound_name1 = llGetInventoryName(INVENTORY_TEXTURE, current_number+1); // llGetInventoryName starts counting at 0.
string sound_name2 = llGetInventoryName(INVENTORY_TEXTURE, current_number +2); // llGetInventoryName starts counting at 0.
string sound_name3 = llGetInventoryName(INVENTORY_TEXTURE, current_number +3); // llGetInventoryName starts counting at 0.
string sound_name4 = llGetInventoryName(INVENTORY_TEXTURE, current_number +4); // llGetInventoryName starts counting at 0.

llSetTexture(sound_name, 0);
llWhisper(0,(string)sound_name);
llSetTexture(sound_name1, 1);
llWhisper(0,(string)sound_name1);
llSetTexture(sound_name2, 2);
llWhisper(0,(string)sound_name2);
llWhisper(0,(string)sound_name3);
llSetTexture(sound_name3, 3);
llWhisper(0,(string)sound_name4);
llSetTexture(sound_name4, 4);
current_number = current_number+5; // increment current_number.

// greater-than or equal because of staggered counting.
if (current_number >= number_of_textures)
{
current_number = 0;
}
}
}
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
12-06-2005 22:22
/15/2c/75801/1.html
_____________________
i've got nothing. ;)