Pamela Galli Posted October 24, 2012 Share Posted October 24, 2012 Apparently, for the third time, my light script has stopped working. Twice before I had to replace my light scripts because they just stopped. I have several hundred light fixtures with light scripts. Has anyone else noticed a sudden change in lights turning on/off? Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 24, 2012 Share Posted October 24, 2012 No, but if your lights are point source lights -- that it, objects that make the area around themselves brighter, as opposed to objects that have FULL_BRIGHT or Glow on them -- then you will never be able to see more than six of them at a time. There's an OpenGL limit of 8 local light sources, of which the sun and SL's ambient light are two. Which six you see at any given time depends on how close they are to you, how large they are, and how bright. If you suddenly have a new, bright light source in the area, it can overwhelm other lights and make them turn off. That's what happens, for example, when a half dozen newbies with heavy face lights enter a dance floor. Now, if that's not the issue, but you're talking about an actual failure of the scripted "toggle switch" that turns the light on and off, I don't have a clue why a whole flock of them would fail at once. Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 24, 2012 Share Posted October 24, 2012 Aha! I found your earlier post on this same question, and discovered that Innula gave you essentially the same answer I did --- even referencing Kitty Barnett,s old forum post (which is very cool, BTW). So I apologize for telling you stuff you already know, and giving you an answer that may be irrelevant. It's still possible, though, that you have been using the new Lighting option that's been available in the last few viewer updates, and have accidentally turned it off. That option does let you see more than just 6 local light sources, but not if you have it turned off or have lowered your graphics quality slider from Ultra. Link to comment Share on other sites More sharing options...
Dora Gustafson Posted October 24, 2012 Share Posted October 24, 2012 Rolig Loon wrote: It's still possible, though, that you have been using the new Lighting option that's been available in the last few viewer updates, and have accidentally turned it off. That option does let you see more than just 6 local light sources, but not if you have it turned off or have lowered your graphics quality slider from Ultra. Right:) The number of point lights is much bigger when Lighting and Shadows is checked in PREFERENCES/Graphics in the viewer How big is unknown, but the viewer will easily render 144 projector light beams See PRIM_POINT_LIGHT Link to comment Share on other sites More sharing options...
Qie Niangao Posted October 24, 2012 Share Posted October 24, 2012 I have not seen this, nor other reports of it, but I can imagine that light changes might be among the things that sometimes fail to generate updates to the viewer in current sim releases. If that's the case, the giveaway would be if it corrects itself with a right-click to select the object -- and a jira would be in order. (And a possible workaround would be some invisible llSetText() kludgery.) Link to comment Share on other sites More sharing options...
Pamela Galli Posted October 24, 2012 Author Share Posted October 24, 2012 Thanks for the help everyone, found the problem! I turned on Lighting and Shadows and WHOA it was like I was on the sun! I made sure all lights were off, no change. But then I discovered I had accidentally put lighting in a chandelier chain, then made three chains per chandelier, three chandeliers. Gaaah! So all is well now. Link to comment Share on other sites More sharing options...
Geldsbard Freck Posted October 25, 2012 Share Posted October 25, 2012 Varified! (@Dora) 100 point lights shining brightly! Lights and Shadows turned on in preferences. Forgot to test to see what happens if I turned Lights and Shadows off. Link to comment Share on other sites More sharing options...
phaedra Exonar Posted October 25, 2012 Share Posted October 25, 2012 I think I found an other problem with lights. With lighting and shadows turned on, both point light and light projectors are not working underwater Link to comment Share on other sites More sharing options...
Perrie Juran Posted October 26, 2012 Share Posted October 26, 2012 I shudder at the thought of a hundred face lights shining on a dance floor! Link to comment Share on other sites More sharing options...
Alicia Sautereau Posted October 26, 2012 Share Posted October 26, 2012 Welcome to my world... dev -> rendering -> render attached lights "OFF!" Link to comment Share on other sites More sharing options...
Lala Milo Posted September 3, 2019 Share Posted September 3, 2019 Hello I'd like to know if someone could help me with a light script. I made a lamp which has 3 faces and i'd like to light up the face 0 . I have a script to light my lamp up BUT all the faces are on light and i see no place into the script to select which face i want to light up. Someone know how to add this into the script ? and also if that was possible to add an access to the lamp like owner or public ... Thanks for your replies // Touch the object to light it up. // Lighting is configurable. integer light_s = TRUE; vector lightcolor = <1.0, 0.75, 0.5>; float intensity = 1.0; // 0.0 <= intensity <= 1.0 float radius = 10.0; // 0.1 <= radius <= 20.0 float falloff = 0.01; // 0.01 <= falloff <= 2.0 float glow = 0.05; toggle() { float thisglow = 0.0; light_s = !light_s; if (light_s) thisglow = glow; llSetPrimitiveParams([ PRIM_POINT_LIGHT, light_s, lightcolor, intensity, radius, falloff, PRIM_FULLBRIGHT, ALL_SIDES, light_s, PRIM_GLOW, ALL_SIDES, thisglow ]); llSetColor(lightcolor, ALL_SIDES); } default { state_entry() { llSetText("", <1.0, 1.0, 1.0>, 1.0); toggle(); } touch_start(integer total_number) { toggle(); } } Link to comment Share on other sites More sharing options...
panterapolnocy Posted September 3, 2019 Share Posted September 3, 2019 Try to replace ALL_SIDES with 0. 1 1 Link to comment Share on other sites More sharing options...
Lala Milo Posted September 3, 2019 Share Posted September 3, 2019 tyvm it works ! and just in case if someone know how to add an access it would be nice ! thanks for your help 1 Link to comment Share on other sites More sharing options...
panterapolnocy Posted September 4, 2019 Share Posted September 4, 2019 Add a list like this to the very top of the script. It will contain avatar UUID keys - you need to customize it for your needs, of course, and delete/replace this example data. You don't need to add the object owner. list accessList = ["key 1", "key 2", "key 3", "10000000-2000-3000-4000-500000000000", "key 5 etc"]; Replace the touch_start() event with this: touch_start(integer total_number) { key targetAvatar = llDetectedKey(0); if (targetAvatar == llGetOwner() || ~llListFindList(accessList, (list)((string)targetAvatar))) { toggle(); } else { if (llGetAgentSize(targetAvatar) != ZERO_VECTOR) { llRegionSayTo(targetAvatar, 0, "You are not on the access list."); } else { llInstantMessage(targetAvatar, "You are not on the access list."); } } } 1 Link to comment Share on other sites More sharing options...
Lucia Nightfire Posted September 4, 2019 Share Posted September 4, 2019 7 hours ago, LAHIN Milo said: Hello I'd like to know if someone could help me with a light script. I made a lamp which has 3 faces and i'd like to light up the face 0 . This probably should have been asked in its own post instead of necroposting here, heh. 1 Link to comment Share on other sites More sharing options...
Lala Milo Posted September 5, 2019 Share Posted September 5, 2019 Thank you @panterapolnocy for your help ! I was thinking about to link each lamps together and then when you click on any of them all the lamps turns on ..🤔 I tried to find a way to do this on google but i didnt find it Sorry @Lucia Nightfire i didnt find the same problem as me in this topic thats why i didnt started a new topic cause this one was talkin about light script . Link to comment Share on other sites More sharing options...
panterapolnocy Posted September 5, 2019 Share Posted September 5, 2019 Replace these lines: llSetPrimitiveParams([ llSetColor(lightcolor, 0); with these: llSetLinkPrimitiveParamsFast(LINK_SET, [ llSetLinkColor(LINK_SET, lightcolor, 0); and check the results. 1 Link to comment Share on other sites More sharing options...
Lala Milo Posted September 5, 2019 Share Posted September 5, 2019 @panterapolnocy You are the best ! thank you very much ! 😃 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