Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Spotlight L91spotlightcontroller  

L91spotlightcontroller

L9.10-spotlight-controller.lsl

Category: Spotlight
By : Dana Moore
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for L91spotlightcontroller
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. L91spotlightcontroller_1.lsl
1
2 // Copyright (c) 2008, Scripting Your World
3 // All rights reserved.
4 //
5 // Scripting Your World
6 // By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
7 // http://syw.fabulo.us
8 // http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
9 //
10 // You are permitted to use, share, and adapt this code under the
11 // terms of the Creative Commons Public License described in full
12 // at http://creativecommons.org/licenses/by/3.0/legalcode.
13 // That means you must keep the credits, do nothing to damage our
14 // reputation, and do not suggest that we endorse you or your work.
15
16 // Listing 9.10: Color-Changing Spotlight Controller (in the Bulb)
17 float TIMER_INTERVAL = 3.0;
18 float INTENSITY = 1.0; // range 0.0 to 1.0
19 float RADIUS = 0.2; // up to 20m
20 float FALLOFF = 0.01; // range 0.01 (slow) to 2.0 (fast)
21 default
22 {
23 state_entry() {
24 llSetTimerEvent( TIMER_INTERVAL );
25 }
26 timer() {
27 float r = llFrand(1.0);
28 float g = llFrand(1.0);
29 float b = llFrand(1.0);
30 vector color = <r,g,b>;
32 PRIM_POINT_LIGHT, TRUE, color, INTENSITY, RADIUS, FALLOFF,
34 PRIM_COLOR, ALL_SIDES, color, 0.75 ]);
36 }
37 }
38 // END //

Back to the Best Free Tools in Second Life and OpenSim.