Subody Posted July 5, 2018 Share Posted July 5, 2018 I'd like to change the light's color when it's on, so it's not white, but I can't figure out where nor what lines to add in here. default { state_entry() { llListen(6969, "", "", ""); } on_rez( integer start_param ) { llListen(6969, "", "", ""); } touch_start(integer total_number) { llListen(6969, "", "", ""); } listen( integer channel, string name, key id, string message ) { if (message == "On") { llSetPrimitiveParams([PRIM_POINT_LIGHT,1, <1.000000, 1.000000, 1.000000>, 1.000000, 10.000000, 0.750000, PRIM_FULLBRIGHT, ALL_SIDES,1, PRIM_GLOW, ALL_SIDES,0.05 ]); } else if (message == "Off") { llSetPrimitiveParams([PRIM_POINT_LIGHT,0, <1.000000, 1.000000, 1.000000>, 1.000000, 10.000000, 0.750000, PRIM_FULLBRIGHT, ALL_SIDES,0, PRIM_GLOW, ALL_SIDES,0 ]); } } } Link to comment Share on other sites More sharing options...
Klytyna Posted July 5, 2018 Share Posted July 5, 2018 Colours in lsl scripts are usually stored as vectors in "Kodak Color" format, that is, where each channel (red/blue/green) is represented bu a float value in the range 0-1. < 1, 1, 1 > = White < 0, 0, 0 > = Black And so on... check your llSetPrimitiveParams entries and edit the colour vectors to whatever colour you want. 1 Link to comment Share on other sites More sharing options...
Subody Posted July 5, 2018 Author Share Posted July 5, 2018 Thank you for the help. I was able to figure out how to give the lights some color. default { state_entry() { llListen(6969, "", "", ""); } on_rez( integer start_param ) { llListen(6969, "", "", ""); } touch_start(integer total_number) { llListen(6969, "", "", ""); } listen( integer channel, string name, key id, string message ) { if (message == "On") { vector COLOR_ORANGE = <1.000, 0.522, 0.106>; llSetPrimitiveParams([ PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_GLOW, ALL_SIDES,.1, PRIM_POINT_LIGHT, TRUE, COLOR_ORANGE, 1.0, 10.0, 0.75 ]); } else if (message == "Off") { llSetPrimitiveParams([ PRIM_POINT_LIGHT,0, <1.000000, 1.000000, 1.000000>, 1.000000, 10.000000, 0.750000, PRIM_FULLBRIGHT, ALL_SIDES,0, PRIM_GLOW, ALL_SIDES,0 ]); } } } Link to comment Share on other sites More sharing options...
Recommended Posts
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