So what is trying do, is trying to get the names from a dialog menu to mach with uuid's in a list, and no i don't want to have the textures inside the inventory, I want to hard code them inside.
this is not the script is working on, is other script similar to figure this out, then can apply fix to actual script am working on.
Is script that used to get textures from inventory, but want to hard code inside.
[sorry English is bad]
list textures = [
"63305784-1523-1ddc-b301-8a1a3d6f7d09",
"a628d431-2b18-ef75-826f-719a37b3a2de",
"8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"
];
list names = [
"blue",
"pink",
"HIDE"
];
integer side = ALL_SIDES;
integer link = 2;
list texture_list;
list texture_list2;
key user = NULL_KEY;
integer chan = -54;
composelist()
{
integer currenttexture = 0;
integer totaltextures = llGetListLength(textures);
if(totaltextures > 0 & totaltextures <= 12)
{
texture_list = [];
do
{
texture_list = texture_list + llList2String(names, currenttexture);
currenttexture++;
}
while (currenttexture > 0 & currenttexture < totaltextures);
}
if(totaltextures > 12 & totaltextures <= 22)
{
texture_list = ["Next Page"];
do
{
texture_list = texture_list + llList2String(names, currenttexture);
currenttexture++;
}
while (currenttexture > 0 & currenttexture < 11);
texture_list2 = ["Last Page"];
do
{
texture_list2 = texture_list2 + llList2String(names, currenttexture);
currenttexture++;
}
while (currenttexture >= 11 & currenttexture < totaltextures);
}
if(totaltextures > 22)
{
llWhisper(0, "Sorry, I can hold 22 textures.");
}
if(totaltextures == 0)
{
llWhisper(0, "No textures, please add some.");
}
}
integer menu_handler;
integer menu_channel;
menu(key user,string title,list texture_list)
{
menu_channel = (integer)(llFrand(99999.0) * -1);
menu_handler = llListen(menu_channel,"","","");
llDialog(user,title,texture_list,menu_channel);
llSetTimerEvent(30.0);
}
default
{
state_entry()
{
llListen(chan, "", llGetOwner(), "");
composelist();
}
touch_start(integer total_number)
{
if (llDetectedKey(0) == llGetOwner()) {
user = llGetOwner();
menu(user,"nnPlease select one below.",texture_list);
}
}
listen(integer channel,string name,key id,string message)
{
if (channel == menu_channel)
{
llSetTimerEvent(0.0);
llListenRemove(menu_handler);
if(message == "Next Page")
{
menu(user,"Please select one below.",texture_list2);
}
else if(message == "Last Page")
{
menu(user,"Please select one below.",texture_list);
}
else
{
/*somehow get dialog menu selection to identify UUIDs in same order as order of names list HERE*/
if (message == "HIDE")
{
llSetLinkAlpha(link,0,ALL_SIDES);
llSetLinkTexture(link,message, side); //still set transparent texture
}else{
llSetLinkAlpha(link,1,ALL_SIDES);
llSetLinkTexture(LINK_THIS,message, side);//set root prim texture first for preloading.
llSleep(4);//give time to load before switching texture
llSetLinkTexture(link,message, side);
}
}
}
}
timer()
{
llSetTimerEvent(0.0);
llListenRemove(menu_handler);
}
changed(integer change)
{
if (change & CHANGED_INVENTORY)
{
composelist();
}
}
}
also want remove the limit on the menu.... but likely remake that part on own time....