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
FaceLight facelight  

facelight

A user settable facelight with HUD

Category: FaceLight
By : Ferd Frederix
Created: 2014-04-04 Edited: 2014-04-03
Worlds: Second Life

the Zip file

Download all files for facelight
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
Get file # 2. Script.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 list MENU_MAIN = ["On", "---", "Off", "Brilliant", "Normal", "Subtle" ]; // the main menu
3
4 integer CHANNEL; // dialog channel
5
6
7 setup_listen()
8 {
10 CHANNEL = llRound(llFrand(1) * 100000);
11 integer x = llListen(CHANNEL, "", "", ""); // listen for dialog answers
12 }
13
14 default
15 {
17 {
18 setup_listen();
19
20 }
21
22 touch_start(integer total_number)
23 {
24 llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, CHANNEL); // present dialog on click
25 }
26
27 listen(integer channel, string name, key id, string message)
28 {
29
30 llOwnerSay(message);
31 if(message == "On")
32 {
33 llSay( -9999, "ON");
34
35
36 }
37
38 else if(message == "Off")
39 {
40 llSay( -9999, "OFF");
41 }
42
43
44 // add more of these for more commands.
45
46 else if(message == "Brilliant")
47 {
48 llSay( -9999, "Brilliant");
49 }
50
51 else if(message == "Normal")
52 {
53 llSay( -9999, "Normal");
54 }
55
56 else if(message == "Subtle")
57 {
58 llSay( -9999, "Subtle");
59 }
60 }
61
62
63
64
65 attach(key agent)
66 {
67 if(agent != NULL_KEY)
68 {
69 setup_listen();
70 }
71 }
72
73
74 on_rez( integer start_param)
75 {
77 }
78
79
80
81
82 }

facelight

a user settable facelight with a HUD control script

Category: FaceLight
By : Ferd Frederix
Created: 2014-04-04 Edited: 2014-04-03
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3
4 vector gColor = <1,1,1>; /// WHITE ( all colors on )
5 float intensity = 1.0;
6 float radius = 1.0;
7 float falloff = 1.0; // these can be tweaked
8
9
10 integer gLightOn = FALSE;
11
12 lightControl()
13 {
15
17 ALL_SIDES,
18 gColor,
19 0.0,
21 gLightOn,
22 gColor,
23 intensity,
24 radius,
25 falloff
26
27 ]);
28 }
29
30
31
32 default
33 {
34 on_rez(integer start_param)
35 {
37 }
38
39
40 listen(integer channel, string name, key id, string message)
41 {
42 /// llOwnerSay("Heard " + message);
43
44 if(message == "ON")
45 {
46 gLightOn = TRUE;
47 }
48 else if(message == "OFF")
49 {
50 gLightOn = FALSE;
51 }
52 else if(message == "Brilliant")
53 {
54 intensity = 1.0;
55 gLightOn = TRUE;
56 }
57 else if(message == "Normal")
58 {
59 intensity = 0.8; /// YOU MAY NEED TO CHANGE THIS
60 gLightOn = TRUE;
61 }
62 else if(message == "Subtle")
63 {
64 intensity = 0.4; /// YOU MAY NEED TO CHANGE THIS for lower light level
65 gLightOn = TRUE;
66 }
67
68
69 lightControl(); // This executes the lamp commands
70 }
71
73 {
74 llListen(-9999, "", "", "");
75
76 gLightOn = TRUE; // Default = on;
77
78 lightControl(); /// turn it on with the defaults
79
80
81 if(llGetAttached() == 0)
82 {
84 }
85 }
86
87 // this automatically attaches it to your chin, even if rezzed in-world.
88
90 {
91 if(perms & PERMISSION_ATTACH)
92 {
93 llAttachToAvatar(ATTACH_CHIN);
94 }
95 }
96 }

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