Prim Light

Thread Started By ☠ MosDef ☠

2319
0
  • 49 Vote(s) - 3.45 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
Code:
/*
Linden Lab presents...
Prim Light
Tags: communications, movement, light, link, primitive, rotation, featured, templates, linden
Description:
License:
None
http://secondlife.coolminds.org
*/

//// "Light" EFFECT TEMPLATE v1 - by Jopsy Pendragon - 4/8/2008
//// You are free to use this script as you please, so long as you include this line:
//** The original 'free' version of this script came from THE PARTICLE LABORATORY. **//

// SETUP:  Use with particle lab Controller Templates to activate/deactivate.

// Causes the prim to emit light, illuminating nearby avatars, prims and ground.

// Customize the particle_parameter values below to create your unique
// effect and click SAVE.  

// PURPOSE:  This script will enable/disable and adjust the LIGHT emitted by a prim.

// NOTE:  This is not a particle effect.

vector color = <1.00,1.00,1.00>; // red, green and blue values 0.00(dark) to 1.00(bright)
float intensity = 1.00;  // % brightness:  0.0 to 1.0
float    radius = 5.00;  // range/distance of light:  0.0 to 20.0 meters
float   falloff = 0.5;  // % brightness at max distance 0.00 to 1.00



string  CONTROLLER_ID = "A"; // See comments at end regarding CONTROLLERS.
integer AUTO_START = TRUE;   // Optionally FALSE only if using CONTROLLERS.

rotation adjustment = ZERO_ROTATION;

default {
    state_entry() {
                
        if ( AUTO_START )
            llSetPrimitiveParams( [PRIM_POINT_LIGHT, TRUE, color , intensity, radius, falloff]);
        
    }
    
    link_message( integer sibling, integer num, string mesg, key target_key ) {
        if ( mesg != CONTROLLER_ID ) { // this message isn't for me.  Bail out.
            return;
        } else if ( num == 0 ) { // Message says to turn particles OFF:
            llSetPrimitiveParams( [PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR , 0.0, 0.0, 0.0 ]);
        } else if ( num == 1 ) { // Message says to turn particles ON:
            llSetPrimitiveParams( [PRIM_POINT_LIGHT, TRUE, color , intensity, radius, falloff]);
        } else { // bad instruction number
            // do nothing.
        }            
    }
        
}

// for more visit:

// http://rpgstats.com/wiki/index.php?title=LlSetPrimitiveParams
// http://wiki.secondlife.com/wiki/LlSetPrimitiveParams
// http://lslwiki.net/lslwiki/wakka.php?wakka=llSetPrimitiveParams
[Image: 8cWHDmW.png]
Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Prim Color ☠ MosDef ☠ 0 2,983 02-20-2013, 09:09 PM
Last Post: ☠ MosDef ☠
  Prim Glow ☠ MosDef ☠ 0 2,727 02-20-2013, 09:08 PM
Last Post: ☠ MosDef ☠
  Prim Spin ☠ MosDef ☠ 0 2,196 02-20-2013, 09:06 PM
Last Post: ☠ MosDef ☠

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...