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
Color Colors_Grader  

Colors_Grader

Colors Grader.lsl

Category: Color
By : MeLight Korvin
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Colors_Grader
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Colors_Grader_1.lsl
1
2 //Das MeLight Korvin's work
3 //Use freely and mod and whatever but don't be a schmuck and sell it as is
4 //How to use:
5 //1. Put this script in an object of at least 2 prims (the more the better, the grading will be smoother)
6 //2. now you have to command it to grade between any two RGB's, RGB's entered as integers (0-255 scale) lets say u wanna grade from red to blue
7 //the command will look like this: /12 grade 255 0 0 0 0 255
8 //first 3 values first RGB, and the ending 3 are of the second RGB (duh)
9 //if you having problemos lemmie know
10
11 list colCom;
12 default
13 {
15 {
16 llListen(12, "", "", "");
17 }
18
19 listen(integer channel, string name, key id, string message)
20 {
21 if(id != llGetOwner()) return; //remove the first '//' to make it work for owner only
22
23 colCom = llParseString2List(message, [" "], []);
24 if(llList2String(colCom,0) == "grade")
25 {
26 vector startCol = <llList2Float(colCom,1)/255, llList2Float(colCom,2)/255, llList2Float(colCom,3)/255>;
27 vector endCol = <llList2Float(colCom,4)/255, llList2Float(colCom,5)/255, llList2Float(colCom,6)/255>;
28 vector grades = <(endCol.x - startCol.x)/llGetNumberOfPrims(), (endCol.y - startCol.y)/llGetNumberOfPrims(), (endCol.z - startCol.z)/llGetNumberOfPrims()>;
29
30 integer x;
31 for(x = 1; x < llGetNumberOfPrims()+ 1; x++)
32 {
33 startCol += grades;
34 llSetLinkColor(x, startCol, ALL_SIDES);
35 }
36 }
37 }
38 }
39 // END //

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