I've been doing pretty ok with basic scripting, but ran into an issue I can't seem to figure out. I have a HUD script and listener script (placed in a piece of jewelry). Trying to get the HUD to change only the tint and vector color when each box is clicked. Zero idea where I'm going wrong. Any help would be greatly appreciated.
HUD script:
integer chan = 15113234731;
// ------------------------------------------------------------------------------ Face All_Sides :: Metal
// Gold
string clrgld = "gold";
// Rose Gold
string clrrgld = "rose gold";
// Silver
string clrslvr = "silver";
// Gunmetal
string clrgnmtl = "gunmetal";
// ===============================================================================================================
default
{
changed(integer change)
{
if (change & CHANGED_OWNER) // Makes sure it's changing the CURRENT OWNER's object, rather than previous owner
{
llOwnerSay("Script owner changed; resetting");
llResetScript();
}
}
state_entry()
{
llListen(chan,"",llGetOwner(),"");
}
touch_start(integer total_number)
{
// Options for All_Sides :: Metal
if (llGetLinkName(llDetectedLinkNumber(5)) == "gold")
{
llRegionSay(chan,clrgld);
}
if (llGetLinkName(llDetectedLinkNumber(4)) == "rose gold")
{
llRegionSay(chan,clrrgld);
}
if (llGetLinkName(llDetectedLinkNumber(3)) == "silver")
{
llRegionSay(chan,clrslvr);
}
if (llGetLinkName(llDetectedLinkNumber(2)) == "gunmetal")
{
llRegionSay(chan,clrgnmtl);
}
}
}
Listener script:
integer chan = 15113234731;
// ==================
default
{
state_entry()
{
llListen(chan,"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string msg)
{
if(msg == "gold")
{
llSetColor(<226,201,111>, ALL_SIDES);
llSetPrimitiveParams([ PRIM_SPECULAR, ALL_SIDES, "85b41f09-515a-0886-7c50-a8675d5e60af", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0, <1.0, 1.0, 0.0> , 75, 0]);
}
if(msg == "rose gold")
{
llSetColor(<240,158,111>, ALL_SIDES);
llSetPrimitiveParams([ PRIM_SPECULAR, ALL_SIDES, "85b41f09-515a-0886-7c50-a8675d5e60af", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0, <1.0, 0.502, 0.0> , 75, 0]);
}
if(msg == "silver")
{
llSetColor(<168,168,168>, ALL_SIDES);
llSetPrimitiveParams([ PRIM_SPECULAR, ALL_SIDES, "85b41f09-515a-0886-7c50-a8675d5e60af", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0, <1.0, 1.0, 1.0> , 75, 0]);
}
if(msg == "gunmetal")
{
llSetColor(<67,67,67>, ALL_SIDES);
llSetPrimitiveParams([ PRIM_SPECULAR, ALL_SIDES, "85b41f09-515a-0886-7c50-a8675d5e60af", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0, <0.502, 0.502, 0.502> , 75, 0]);
}
}
}