Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help me see the light

Frank Northmead
Registered User
Join date: 24 Oct 2006
Posts: 13
03-29-2007 13:39
I am making a light controller and want to be able to set the light intensity via a remote.

I have everything working and for right now have set the remote to allow you to set the light intensity in increments of 0.15 from 0.0 to 0.90 and then the last step to 1.00.

Everything is working fine - except...

Steps 0.15 and 0.30 do not show any light - at 0.45 it turns on and get progressively brighter on each successive step. If I edit the light source (prim) the light shows up at those two steps while editing. Close the edit dialog and the light turns off. To be clear, I am NOT adjusting the light intensity while editing - just the act of right clicking the prim and selecting Edit cause the light to turn on at the specified intensity - 0.15 or 0.30.

Suggestions?

TIA,

Frank
Frank Northmead
Registered User
Join date: 24 Oct 2006
Posts: 13
03-29-2007 13:46
Here are the pertinent parts of the script - but I think the problem is in the viewer and not the script ...

Default values for prim:

From: someone
float intensity = 1.0;
vector color = <1,1,1>;
float radius = 10.0;
float falloff = 0.0;


receives message to change intensity:
From: someone

intensity = (float)message;

sets the prim to new/updated vales:
From: someone

llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, color, intensity, radius, falloff]);

TIA,

Frank
Teddy Qinan
Registered User
Join date: 10 Mar 2007
Posts: 34
03-29-2007 17:37
I made a touch on/touch off script for a light, and I noticed that it took a second or so for the light to receive it's fullbright property after I set the light property. (I was not setting fullbright).

Anyway, my point is, is it taking a short moment for the light to react to your script? You could test this by lowering the light incrementally and seeing if it turns off at 0.3 or goes all the way down.