Jump to content

Need help with setting specular color


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

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

Recommended Posts

Greetings there. I am making a gaming keyboard with led lights and stuff. It's main prim has a specular map which highlights some buttons.

I figured out how to change their color with:
llSetPrimitiveParams([ PRIM_SPECULAR, ALL_SIDES, "e60ef3a0-06cb-71e6-7af7-a2b3cd6f710e", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0, <0.000, 0.455, 0.851>, 1, 50]); - basically sets the specular map to blue.

Thing is, the keyboard script has multiple coloring options, yellow, green, purple, etc etc. Also it has a Turn Off option, which basically turns off the specular map's glossiness making the buttons have no color highlighting.
llSetPrimitiveParams([ PRIM_SPECULAR, ALL_SIDES, "e60ef3a0-06cb-71e6-7af7-a2b3cd6f710e", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0, "", 0, 50]);

Problem is, when i turn the keyboard back on i want it to keep the same selected color as before. Is there a way to ignore the coloring parameter in PRIM_SPECULAR?

Thanks! I'm failry new to scripting.

Link to comment
Share on other sites

No idea, but how abouts storing the spectacular vector into a global variable that is remembered when turning it on again?

Welcome to scripting, as my example shows one way to achieve stuff is thinking out of the box, you will get better with that over time ;)

It's like painting, once you are more experienced you will look back in horror at your old stuff... 

Edited by Fionalein
  • Like 2
Link to comment
Share on other sites

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