Reply
Honored Resident
Pushit
Posts: 41
0 Kudos

Texture changer via HUD (for worn object)

Hi, I have a script to change a texture via HUD. Everything works fine when the item is rezzed, but when I wear the object the HUD just doesn´t work (meaning the menu doesn´t pop up like it does when the same object is rezzed on ground)

Any ideas?

Thanks in advance.

Rolig Loon
Posts: 24,558
Registered: ‎10-05-2009
0 Kudos

Re: Texture changer via HUD (for worn object)

Reply to Pushit - view message

That's very hard to guess without seeing the script itself.  The first place to suspect when a dialog script doesn't do anything at all is the communication channel.  Look to see that a channel is actually being opened.  Then start peppering the script with strategically-placed llOwnerSay statements to test how far it gets before it hangs up.

Once you've found the non-working part, post it here if you still haven't figured it out.

Not as dumb as I look
Honored Resident
Pushit
Posts: 41
0 Kudos

Re: Texture changer via HUD (for worn object)

Reply to Pushit - view message

Thanks for the reply Rolig, the problem is that this is a script I bought NO MOD so there´s no way to see what´s inside. Maybe this is the wrong place but what I need is to know if its possible to change textures to a worn object via HUD.

I know its possible when the object is on ground cause it works perfectly, but when I wear the object it just doesnt.

Thanks again.

Rolig Loon
Posts: 24,558
Registered: ‎10-05-2009

Re: Texture changer via HUD (for worn object)

Reply to Pushit - view message

It's certainly possible.  You can try it with these two simple scripts (neither of which is very pretty, but they work for a demo).  This first one is a simple transmitter:

default
{
    state_entry()
    {
        llListen(-67890,"","","");
    }

    touch_start(integer total_number)
    {
        llTextBox(llDetectedKey(0)," \n Enter a texture key",-67890);
    }
    
    listen(integer channel, string name, key id, string msg)
    {
        llRegionSay(-12345,msg);
    }
}

 The second is an equally simple-minded texture changer:

default
{
    state_entry()
    {
        llListen (-12345,"","","");
    }

    listen(integer channel, string name, key id, string msg)
    {
        llSetTexture(msg,ALL_SIDES);
    }
}

 It doesn't make any difference whether you put them both in objects that are sitting on the ground or whether you put either one (or both) into objects that you wear.  Try the first one as a HUD and see.

It's easy enough to write scripts like this that you shouldn't worry about that no-mod one of yours.  Just chuck it and write a new one that works.

Not as dumb as I look
Honored Resident
Pushit
Posts: 41
0 Kudos

Re: Texture changer via HUD (for worn object)

Reply to Pushit - view message

Thanks!!!! that certainly work. Unfortunately I need this for selling so copying and pasting texturess numbers are kind of a problem.

Anyway this probes that is possible, I´ll continue my search, thanks again.

Rolig Loon
Posts: 24,558
Registered: ‎10-05-2009

Re: Texture changer via HUD (for worn object)

Reply to Pushit - view message

Well, there's no reason to cut & paste UUIDs.  I only wrote the little demo that way because it was easy to do in one or two minutes.  I could have just hard coded a couple of UUIDs into one of the scripts or I could have read them off a notecard,  and switched between them.  It's not important how you input the UUIDs.  All you need to know is that it's no problem to send texture information to a worn object. You should be able to write a couple of tiny scripts like these to fit your specific needs.

Not as dumb as I look
Honored Resident
Pushit
Posts: 41
0 Kudos

Re: Texture changer via HUD (for worn object)

Reply to Pushit - view message

I really appreciate your help and information Rolig (as usual :smileyhappy: ) I´m not a scripter AT ALL hhahahaha I just thought there would be a simple script to make a HUD (like the one I found but just works with non worn objects don´t know why).