Jump to content

Hud texture changer


Pixellada
 Share

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

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

Recommended Posts

Hi

I have two scripts one for hud that changes the texture:

string texture1 = "d1ccf901-14e1-e78f-52d6-d6d0beyyyxxx";
string texture2 = "dndfdsnf-14e1-e78f-52d6-d6d0beyyyxxx"; default { state_entry() { llSetTexture(texture1, ALL_SIDES); } touch_start(integer total_number) { llSay(2,texture2); } }

 and one for object that receive the information about texture key and changes thexture of the object:

default
{
    state_entry()
    {
        llListen(2, "", NULL_KEY, "");
    }

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

 Of course channel 2 is not recomended - that is example only.

I would like to:

1. make the object to listen only what owner of hud says

2. intruduce note card that includes key of textures - the script in hud can read keys from note card

3. the script in hud chooses the note card with the same name as object in which that script is (if script is on object named "1" it chooses note card name "1".

Link to comment
Share on other sites

Thank you for answer. Concerning 1 - is that correct?

Listening script

default{    state_entry()    {        llListen(2, "", llGetOwner(), "");    }       listen(integer channel, string name, key id, string msg)        { if (channel == 2) llSetTexture(msg, ALL_SIDES );    }       }

Do I need to add llOwnerSay to hud script?

string texture1 = "d1ccf901-14e1-e78f-52d6-d6d0beyyyxxx";string texture2 = "dndfdsnf-14e1-e78f-52d6-d6d0beyyyxxx";default{    state_entry()    {        llSetTexture(texture1, ALL_SIDES);    }        touch_start(integer total_number){             llOwnerSay(2,texture2);    }}

 

 

Link to comment
Share on other sites

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