Local Lighting
|
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
06-09-2006 00:01
I've searched and I can't find it.... can anyone point me to the the LSL syntax to go with the llSet PrimitiveParameters or whatver it is to control the new local lighting on the Edit > Features > Lighting for color, intensity, radius and falloff please?
Lewis
|
|
Starax Statosky
Unregistered User
Join date: 23 Dec 2003
Posts: 1,099
|
06-09-2006 00:41
Paramaterss: [PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 10.0, 0.75] Param info: TRUE/FALSE, vector color, float intensity, float radius, float falloff I found the info on this page: http://secondlife.com/badgeo/wakka.php?wakka=llSetPrimitiveParams
|
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
06-09-2006 03:32
That's the one, thanks... now the script doesn't give an error, but it also doesn't appear to want to do anything. What I am trying to do is a light that flashes on and off regularly, using the local lighting, basically toggling the true/false parameter. It doesn't seem to be looping as it should - any clues? Lewis default {
state_entry () {
llSetTimerEvent (5); }
timer ()
{ llSetPrimitiveParams ([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 10.0, 0.75]); }
timer ()
{ llSetPrimitiveParams ([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75]); }
}
|
|
Thili Playfair
Registered User
Join date: 18 Aug 2004
Posts: 2,417
|
06-09-2006 04:03
default { state_entry() { llSetTimerEvent(5); // generate a timer event every 1 second } timer() { llSetPrimitiveParams ([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 10.0, 0.75]); state k; } } state k { timer() { { llSetPrimitiveParams ([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75]); state default; // change to default. } } }
Couldnt get yours to work either but this one does.
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
06-09-2006 04:17
From: Lewis Nerd What I am trying to do is a light that flashes on and off regularly, using the local lighting, basically toggling the true/false parameter. It doesn't seem to be looping as it should - any clues? default {
state_entry () {
llSetTimerEvent (5); }
timer ()
{ llSetPrimitiveParams ([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 10.0, 0.75]); }
timer ()
{ llSetPrimitiveParams ([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75]); }
} The problem with the above script is that there are TWO event handlers for the same event. Only the last event handler will be executed in the script; all the preceding event handlers for the same event will not be executed.
|
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
06-09-2006 04:21
Such a simple little thing... just couldn't find it; it's working perfectly now thanks.
I don't know if any of you who helped here collect bears but mine is on its way to you.
Lewis
|
|
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
|
06-09-2006 07:00
Instead of states, etc, wouldn't be easier just to flip the value of the on/off parameter? isOn=FALSE;
default {
state_entry () {
llSetTimerEvent (5); }
timer ()
{ isOn = !isOn; llSetPrimitiveParams ([PRIM_POINT_LIGHT, isOn, <1, 1, 1>, 1.0, 10.0, 0.75]); }
}
Just looks a lot simpler to me. -2fast
|
|
BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
|
06-09-2006 09:16
It's too bad that we need to use scripts to make changes to light intensity. Local light needs to have a light intensity modulation feature with a few preset modulation profiles: sinusoidal (w/period & minimum intensity), square wave (w/period & duty-cycle & "off" intensity), random flicker (w/duty-cycle), night-time only, etc.
|