|
Venusvelvet Cazalet
Registered User
Join date: 22 Feb 2007
Posts: 16
|
02-25-2007 06:18
Is there any way which can set the light brightless on the object (or light intensity)? e.g. llSetLight(< <colour>,intensity,radius,falloff >, integer face); which is similar to the llSetColor(vector color, integer face)? If only "light or no light" can be selected, or is there any way to set this on/off option on script rather than on the FEATURES>LIGHT tag tick box? Any help appreicated. 
|
|
Hutton Richez
Registered User
Join date: 4 Dec 2006
Posts: 11
|
02-25-2007 11:31
// Script to set light given off by a prim, by Hutton Richez. llSetLight(integer enabled, vector color, float intensity, float radius, float falloff) { llSetPrimitiveParams([PRIM_POINT_LIGHT, enabled, color, intensity, radius, falloff]); } That should do exactly what you want. Just put that somewhere above "default" and below the variable declarations and call it just like you wanted with the exception of there being no face options.
|
|
Venusvelvet Cazalet
Registered User
Join date: 22 Feb 2007
Posts: 16
|
02-25-2007 15:13
Thank you Hutton. I'll give you a try.~
|
|
Jeff Kelley
Registered User
Join date: 8 Nov 2006
Posts: 223
|
02-25-2007 19:12
Your way to the light show:
setLightOn (integer on) { list lightParams; lightParams = llGetPrimitiveParams([PRIM_POINT_LIGHT]); lightParams = llListReplaceList(lightParams, [on], 0,0); llSetPrimitiveParams([PRIM_POINT_LIGHT] + lightParams); }
setLightColor (vector color) { list lightParams; lightParams = llGetPrimitiveParams([PRIM_POINT_LIGHT]); lightParams = llListReplaceList(lightParams, [color], 1,1); llSetPrimitiveParams([PRIM_POINT_LIGHT] + lightParams); }
setLightLevel (float level) { list lightParams; lightParams = llGetPrimitiveParams([PRIM_POINT_LIGHT]); lightParams = llListReplaceList(lightParams, [level], 2,2); llSetPrimitiveParams([PRIM_POINT_LIGHT] + lightParams); }
|