Jump to content

HUD Script for Texture Change on Mesh?


Ava Rage
 Share

You are about to reply to a thread that has been inactive for 2566 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hiya! I am currently using the RenderWorks Texture Change HUD Script and am 100% happy with it, but like it says on the tin, it will do one texture to one face (or to ALL_SIDES) per button. I have a dress that has a texture for the dress and a texture for the decolletage and I need people to be able to click one button on the HUD and have Face 1 (the dress) change to one texture and Face 3 (the decolletage) change to another texture with one click. (I could have a button for each but that's not what I want -- I want one click, full dress retexture for every part.)

Any suggestions for what scripts I can look at buying? Thanks!

Link to comment
Share on other sites

Just now, Ava Rage said:

Yes I do; that's the issue with the Render Works script. 

Sorry, I meant do you have to have separate texture files for both?  Can you combine them to one file?  That way one button would change both and you'd have less lag uploading textures.

Link to comment
Share on other sites

HUD Button Script

Quote

integer giCOMCHAN = -113000113; // Negative Com channel has to match the channel of the receiver script.

list glTextures = [
// Link number, Texture UUID, Face number
-1, "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903", 1,
-1, "89556747-24cb-43ed-920b-47caed15465f", 3
];


default
{
    touch_start(integer total_number)
    {
        // This works for worn attachments only.
        llRegionSayTo(llGetOwner(), giCOMCHAN, llDumpList2String(glTextures, "|"));
    }
}

Receiver Script

Quote

integer giCOMCHAN = -113000113; // Com channel has to match the channel of the sender script.


default
{
    state_entry()
    {
        llListen(giCOMCHAN, "","","");
    }
    
    listen(integer Channel, string Name, key ID, string Text)
    {
        // Only commands coming from objects from the same owner as this object will be processed.
        if (llGetOwnerKey(ID) == llGetOwner())
        {
            list lT = llParseString2List(Text, ["|"], []);        
            llSetLinkTexture(llList2Integer(lT, 0), llList2String(lT, 1), llList2Integer(lT, 2));
            llSetLinkTexture(llList2Integer(lT, 3), llList2String(lT, 4), llList2Integer(lT, 5));
        }
    }
}

 

  • Like 2
Link to comment
Share on other sites

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