Jump to content

forensixpert

Resident
  • Posts

    8
  • Joined

  • Last visited

Everything posted by forensixpert

  1. Hmmm OK.. I am using on_rez(integer start_param) to detect the presence of the item. Thanks
  2. I am working on a specific HUD for a collection of different items and i would like the HUD's status indicators update when a piece is attached (worn-added) and when they are detached. I have sorted the attach portion but trying to find ideas to detect when an item from the collection is detached form the avatar. Any hints or directions you can suggest? Thanks a bunch in advance
  3. Thank you Ron, i will try to figure it out using llGEtPrimitiveParams() or llGetLinkPrimitiveParams. Is there a simple sample, you know of, I can have a look?
  4. Hi All, I am relatively new to the scripting and design bit of SL. What I am trying to do is to make a hud that changes the color, texture and specular of an item, user is wearing. I am using something like this; integer channel = 00000; // THE CHANNEL NUMBER ITEM IS LISTENING TO integer tp = LINK_THIS; // (TP = TargetPrim) integer face = ALL_SIDES; // This dress has two faces but we want them both to change vector r = <1.0, 1.0, 0.0>; // repeat vector o = <0.0, 0.0, 0.0>; // offset float rot = 0.0; // rotation vector w = <1.000, 1.000, 1.000>; // color white vector s = <0.749, 0.749, 0.749>; // color silver vector g = <0.502, 0.502, 0.502>; // color grey integer m = 51; // medium glosiness integer h = 71; // high glosiness integer e = 0; // environment string st = "a1a1a1a1-b1b1-c1c1-d1d1-e1e1e1e1e1e1"; // UUID of the specular texture (ST = SpecularTexture) default { state_entry() { llListen(channel,"",NULL_KEY,""); } listen(integer channel, string name, key id, string msg) { if (llGetOwner() == llGetOwnerKey(id)) // ************* RESPOND TO TEXTURE CHANGE REQUEST if (msg == "DT1" ) { llSetLinkPrimitiveParamsFast(tp,[ PRIM_TEXTURE, face, "0000000-0000-0000-0000-000000000", r, o, rot]); llSetLinkPrimitiveParamsFast(tp,[ PRIM_NORMAL, face, "0000000-0000-0000-0000-000000000", r, o, rot]); llSetLinkPrimitiveParamsFast(tp,[ PRIM_SPECULAR, face, "0000000-0000-0000-0000-000000000", r, o, rot, w, m, e]); However, as you might appreciate I am using different specular maps for each diffuse texture. And currently I am only able to use the string, defined as st (as shown above). IS there any way I can pull the current specular texture so I can play with it's colors and shine levels? Below are the lines to set the shine options for the worn item (they also run under the same script) // ************* RESPOND TO SHINE LEVEL CHANGE REQUEST else if (msg == "DS01" ) { llSetLinkPrimitiveParamsFast(tp,[ PRIM_SPECULAR, face, st, r, o, rot, g, m, e]); } else if (msg == "DS02" ) { llSetLinkPrimitiveParamsFast(tp,[ PRIM_SPECULAR, face, st, r, o, rot, g, h, e]); } else if (msg == "DS03" ) { llSetLinkPrimitiveParamsFast(tp,[ PRIM_SPECULAR, face, st, r, o, rot, s, m, e]); } else if (msg == "DS04" ) { llSetLinkPrimitiveParamsFast(tp,[ PRIM_SPECULAR, face, st, r, o, rot, w, m, e]); } else if (msg == "DS05" ) { llSetLinkPrimitiveParamsFast(tp,[ PRIM_SPECULAR, face, st, r, o, rot, w, h, e]); } Thank you so much if anybody can help and show me the way
×
×
  • Create New...