Jump to content

Kwezalcoatl

Resident
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Kwezalcoatl

  1. On 11/19/2020 at 5:17 AM, Rachel1206 said:

    Do you read what I wrote? ... the most easy thing is to place the script in the inventory of the clothing item along with the textures.

    Yes i got this ... i finish it and as next i try the HUD thing :) i will come back ...

    Thank you very much

  2. 3 hours ago, Qie Niangao said:

    To clarify, a script in one object cannot change textures directly on any other object, so a HUD never directly changes textures of clothing - that's why a "listener" script is needed. The listener script resides in the clothing and listens for the HUD script to tell it what to do.

    Thank you very much QIE - i got good help here in that topic and i can say i reached my aim for this project, it works even with 26 textures ;) - but i will come back soon :)

     

    Thank you all

    Kwezalcoatl - the feathered snake

    • Like 1
  3. 12 hours ago, Wulfie Reanimator said:

    The script works fine while wearing it.

    I am sorry wulfie - if i wear it (all on mod, texture and cloth and the creator wear it itself) i become a strange pose - like going toilett, turn around - and no menu appear, so i can't change the texture. Any Idea? Is good if i only receive a key word do i can research on that.

    EDIT - lol - it works if i rightklick, click more and then 'touch' ... i m sorry but a HUD willl be great

    Thank you :)

    Greetings

    Kwezalcoatl

  4. 16 hours ago, Rachel1206 said:

    A more professional approach would be a HUD and a listener script in the clothing listening to the HUD and where the textures are UUID from relevant textures in your inventory or from someone else. But get a grip of the basic first and learn to program in LSL before doing it with HUD and listener script.

    Rachel thank you for your kind comment, is about 22 textures ...

    THIS S EXACTLY WHAT I FINALLY WANT a hud .. but sighs wher the texture put in? in the hud or the clothes? What is the listener script -

  5. 1 hour ago, Wulfie Reanimator said:

    Post the whole script.

    //Drop this script into an object with up to 36 textures inside.
    
    //When anyone Touches they will get a menu with all the textures available. Button names in menu will be first 10 characters from that item's name. 
    
    //NOTE: Texture Names may not exceed 24 characters or script error and menu fails.
    
    
    integer side = ALL_SIDES; //ALL_SIDES or any face number 0 through 5
    
    list texture_list;
    list texture_list2;
    key user = NULL_KEY;
    
    composelist()
    {
        integer currenttexture = 0;
        integer totaltextures = llGetInventoryNumber(INVENTORY_TEXTURE);
        
        if(totaltextures > 0 & totaltextures <= 12)
        {
            texture_list = [];
            do
            {
                texture_list = texture_list + llGetInventoryName(INVENTORY_TEXTURE, currenttexture);
                currenttexture++;
            }
            while (currenttexture > 0 & currenttexture < totaltextures);
        }
        
        if(totaltextures > 12 & totaltextures <= 36)
        {
            texture_list = ["Next Page"];
            do
            {
                texture_list = texture_list + llGetInventoryName(INVENTORY_TEXTURE, currenttexture);
                currenttexture++;
            }
            while (currenttexture > 0 & currenttexture < 11);
            
            texture_list2 = ["Last Page"];
            do
            {
                texture_list2 = texture_list2 + llGetInventoryName(INVENTORY_TEXTURE, currenttexture);
                currenttexture++;
            }
            while (currenttexture >= 11 & currenttexture < totaltextures);
        }
        
        if(totaltextures > 36)
        {
            llWhisper(0, "You may only have a maximimum of 36 Textures. Please remove any extra ones.");
        }
        if(totaltextures == 0)
        {
            llWhisper(0, "Please add up to 36 Textures inside this object.");
        }
    }
    
    
    //The Menu
    integer menu_handler;
    integer menu_channel;
    menu(key user,string title,list texture_list)
    {
        menu_channel = (integer)(llFrand(99999.0) * -1); //random channel
        menu_handler = llListen(menu_channel,"","","");
        llDialog(user,title,texture_list,menu_channel);
        llSetTimerEvent(30.0); //menu channel open for 30 seconds
    }
    
    default
    {
        state_entry()
        {
            composelist(); //make list from inventory textures
        }
    
        touch_start(integer total_number)
        {
            user = llDetectedKey(0);
            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,"nnPlease select one below.",texture_list2);
                }
                else if(message == "Last Page")
                {
                    menu(user,"nnPlease select one below.",texture_list);
                }
                else
                {
                    llSetTexture(message, side);
                }
            }
        }
        
        timer() //Close the Menu Listen or we'll get laggy
        {
            llSetTimerEvent(0.0); 
            llListenRemove(menu_handler);
        }
        
        changed(integer change) 
        {
            if (change & CHANGED_INVENTORY) //inventory has changed
            {
                llSleep(0.5);
                composelist(); //rebuild the list
            }
        }
    }

    Hello - this works good if rezzed on land. But i want to do from a HUD but on some clothes i did to change the textures. Actually i have a complete blockade to find the begin of the filament... get permission request permission . im lost.

     

    Greetings

    Kwezalcoatl

  6. Hello ist's me again ...

     

    I found a script where i can change textures on a prim. I do insert the script in a prim, together with some textures. So far so good- it works - on click ta menu appears and i can change the texture. But if i wear the prim it do not work no more. i can click on it but nothing happen.

    But my idea is to change the texture in my clothes with a hud. I m little confused where i have to put the textures and how the textures can change ...

    This is the line in my script wo set teh texture :

                    "llSetTexture(message, side);"

    I checked so much scripts but i did not found the right, now i m confused.
    Thanks for any help.
    With kind regards

  7. «

    You want to wear a layer for the body. Skin, tatoo, etc.

    A script can't do that, you need to do that manually  or make an outfit.

    A script can send  a texture to a mesh body, but you don't have the info to do that and it's not BOM then. Creator kits for mesh bodies deliver a (nomod) script for that purpose and can apply a tatoo to an extra BOM layer for the body.

    »

    Thank you for your answer ...
    Ok - now i see the difference between objects, faces,  textures and layers ... applying and attaching ... If i have a BoM Tattoo with that pink scribbled icon like we had on classic bodies. I can 'add' this tatto manually by clicking 'add' (or 'wear' but i expicit want 'add'). Then it adds the tattoo on the mesh body. And same i want to do with a script integrated in a HUD. I alread did this with the meshbody appliers in the developer kit's.

    Is that tatto an own layer? Do i apply a new layer?

    Thank you for your kind help - i am sorry but all this is technically confusing me a little -

  8. Hi Profaitchikenz Haiku, Thank you - i will going to resarch about hat ... just one question - if i want to apply ... to the meshbody - a BoM tattoo - what 'face' are we talking about? (applier scrips for applying on ie maitreya body i found).

  9. Hello to all the lovely and beautiful people :)

    of course - i need some help :)

    I want to create a script that simply add a texture (for example a tattoo) to the owner of the hud who is attached on a hud position.

    I found few scripts in the deep of the forum with own concepts but i really have no idea how to use it. maybe because i do from scratch ... newbie ...

    I found this the following script at the end of this post.

    It looks useful but ... i guess i have to insert an uuid of the texture somewhere?

    default
    {
        attach(key AvatarKey)
        {//give instructions for use and prevent item from being attached to avatar
            if(AvatarKey)
            {//event is called on both attach and detatch, but Key is only valid on attach
                llOwnerSay ("
                DAs BoM Tattoo wurdde angeheftet");
     
                llRequestPermissions(AvatarKey, PERMISSION_ATTACH );
            }
        }
        run_time_permissions(integer perm)
        {
            if(perm & PERMISSION_ATTACH)
            {
                llDetachFromAvatar( );
            }
        }
    }

     

     

×
×
  • Create New...