Clrchanger
De DigiWiki.
This script will change the color of all the prims in an object in order and in a relatively quick manner.
This script is very basic. It more for concept than actual use.
// Object Color Changer by Bobbyb30 Zohari (C) 2007 BSD License // Object Color Changer by Bobbyb30 Zohari (C) 2007 // Created on November 8, 2007 // Last modified on Novemeber 8, 2007 // All rights reserved. (C) 2007 // This work is licensed under a Creative Commons Attribution 3.0 License. // To view the full copy of this license, please visit the link below // http://creativecommons.org/licenses/by-nc-sa/3.0/ // Free for use and distribution as long as this header stays intact. // Script Purpose: To quickly change the color of all the prims in an object in order and in a relatively quick manner. // Script Note:It takes about .2 seconds per prim to complete. vector color = <0.0, 0.2, 1.0>;//place the color here, this is a light shade of blue; integer prims;//=llGetNumberOfPrims();Gets total prims of the object it is in. default { state_entry() { prims = llGetNumberOfPrims(); integer x; do { llSetLinkColor(x,color,-1); ++x; }while(x<prims); } }
Color Table
Not every possible color is listed here. These are the infamouse web-safe colors. Find the color you would like to use here and copy it into your scripts.
| <0.0, 0.0, 0.0> | <0.0, 0.0, 0.2> | <0.0, 0.0, 0.4> | <0.0, 0.0, 0.6> | <0.0, 0.0, 0.8> | <0.0, 0.0, 1.0> |
| <0.0, 0.2, 0.0> | <0.0, 0.2, 0.2> | <0.0, 0.2, 0.4> | <0.0, 0.2, 0.6> | <0.0, 0.2, 0.8> | <0.0, 0.2, 1.0> |
| <0.0, 0.4, 0.0> | <0.0, 0.4, 0.2> | <0.0, 0.4, 0.4> | <0.0, 0.4, 0.6> | <0.0, 0.4, 0.8> | <0.0, 0.4, 1.0> |
| <0.0, 0.6, 0.0> | <0.0, 0.6, 0.2> | <0.0, 0.6, 0.4> | <0.0, 0.6, 0.6> | <0.0, 0.6, 0.8> | <0.0, 0.6, 1.0> |
| <0.0, 0.8, 0.0> | <0.0, 0.8, 0.2> | <0.0, 0.8, 0.4> | <0.0, 0.8, 0.6> | <0.0, 0.8, 0.8> | <0.0, 0.8, 1.0> |
| <0.0, 1.0, 0.0> | <0.0, 1.0, 0.2> | <0.0, 1.0, 0.4> | <0.0, 1.0, 0.6> | <0.0, 1.0, 0.8> | <0.0, 1.0, 1.0> |
| <0.2, 0.0, 0.0> | <0.2, 0.0, 0.2> | <0.2, 0.0, 0.4> | <0.2, 0.0, 0.6> | <0.2, 0.0, 0.8> | <0.2, 0.0, 1.0> |
| <0.2, 0.2, 0.0> | <0.2, 0.2, 0.2> | <0.2, 0.2, 0.4> | <0.2, 0.2, 0.6> | <0.2, 0.2, 0.8> | <0.2, 0.2, 1.0> |
| <0.2, 0.4, 0.0> | <0.2, 0.4, 0.2> | <0.2, 0.4, 0.4> | <0.2, 0.4, 0.6> | <0.2, 0.4, 0.8> | <0.2, 0.4, 1.0> |
| <0.2, 0.6, 0.0> | <0.2, 0.6, 0.2> | <0.2, 0.6, 0.4> | <0.2, 0.6, 0.6> | <0.2, 0.6, 0.8> | <0.2, 0.6, 1.0> |
| <0.2, 0.8, 0.0> | <0.2, 0.8, 0.2> | <0.2, 0.8, 0.4> | <0.2, 0.8, 0.6> | <0.2, 0.8, 0.8> | <0.2, 0.8, 1.0> |
| <0.2, 1.0, 0.0> | <0.2, 1.0, 0.2> | <0.2, 1.0, 0.4> | <0.2, 1.0, 0.6> | <0.2, 1.0, 0.8> | <0.2, 1.0, 1.0> |
| <0.4, 0.0, 0.0> | <0.4, 0.0, 0.2> | <0.4, 0.0, 0.4> | <0.4, 0.0, 0.6> | <0.4, 0.0, 0.8> | <0.4, 0.0, 1.0> |
| <0.4, 0.2, 0.0> | <0.4, 0.2, 0.2> | <0.4, 0.2, 0.4> | <0.4, 0.2, 0.6> | <0.4, 0.2, 0.8> | <0.4, 0.2, 1.0> |
| <0.4, 0.4, 0.0> | <0.4, 0.4, 0.2> | <0.4, 0.4, 0.4> | <0.4, 0.4, 0.6> | <0.4, 0.4, 0.8> | <0.4, 0.4, 1.0> |
| <0.4, 0.6, 0.0> | <0.4, 0.6, 0.2> | <0.4, 0.6, 0.4> | <0.4, 0.6, 0.6> | <0.4, 0.6, 0.8> | <0.4, 0.6, 1.0> |
| <0.4, 0.8, 0.0> | <0.4, 0.8, 0.2> | <0.4, 0.8, 0.4> | <0.4, 0.8, 0.6> | <0.4, 0.8, 0.8> | <0.4, 0.8, 1.0> |
| <0.4, 1.0, 0.0> | <0.4, 1.0, 0.2> | <0.4, 1.0, 0.4> | <0.4, 1.0, 0.6> | <0.4, 1.0, 0.8> | <0.4, 1.0, 1.0> |
| <0.6, 0.2, 0.0> | <0.6, 0.2, 0.2> | <0.6, 0.2, 0.4> | <0.6, 0.2, 0.6> | <0.6, 0.2, 0.8> | <0.6, 0.2, 1.0> |
| <0.6, 0.4, 0.0> | <0.6, 0.4, 0.2> | <0.6, 0.4, 0.4> | <0.6, 0.4, 0.6> | <0.6, 0.4, 0.8> | <0.6, 0.4, 1.0> |
| <0.6, 0.6, 0.0> | <0.6, 0.6, 0.2> | <0.6, 0.6, 0.4> | <0.6, 0.6, 0.6> | <0.6, 0.6, 0.8> | <0.6, 0.6, 1.0> |
| <0.6, 0.0, 0.0> | <0.6, 0.0, 0.2> | <0.6, 0.0, 0.4> | <0.6, 0.0, 0.6> | <0.6, 0.0, 0.8> | <0.6, 0.0, 1.0> |
| <0.6, 0.8, 0.0> | <0.6, 0.8, 0.2> | <0.6, 0.8, 0.4> | <0.6, 0.8, 0.6> | <0.6, 0.8, 0.8> | <0.6, 0.8, 1.0> |
| <0.6, 1.0, 0.0> | <0.6, 1.0, 0.2> | <0.6, 1.0, 0.4> | <0.6, 1.0, 0.6> | <0.6, 1.0, 0.8> | <0.6, 1.0, 1.0> |
| <0.8, 0.0, 0.0> | <0.8, 0.0, 0.2> | <0.8, 0.0, 0.4> | <0.8, 0.0, 0.6> | <0.8, 0.0, 0.8> | <0.8, 0.0, 1.0> |
| <0.8, 0.2, 0.0> | <0.8, 0.2, 0.2> | <0.8, 0.2, 0.4> | <0.8, 0.2, 0.6> | <0.8, 0.2, 0.8> | <0.8, 0.2, 1.0> |
| <0.8, 0.4, 0.0> | <0.8, 0.4, 0.2> | <0.8, 0.4, 0.4> | <0.8, 0.4, 0.6> | <0.8, 0.4, 0.8> | <0.8, 0.4, 1.0> |
| <0.8, 0.6, 0.0> | <0.8, 0.6, 0.2> | <0.8, 0.6, 0.4> | <0.8, 0.6, 0.6> | <0.8, 0.6, 0.8> | <0.8, 0.6, 1.0> |
| <0.8, 0.8, 0.0> | <0.8, 0.8, 0.2> | <0.8, 0.8, 0.4> | <0.8, 0.8, 0.6> | <0.8, 0.8, 0.8> | <0.8, 0.8, 1.0> |
| <0.8, 1.0, 0.0> | <0.8, 1.0, 0.2> | <0.8, 1.0, 0.4> | <0.8, 1.0, 0.6> | <0.8, 1.0, 0.8> | <0.8, 1.0, 1.0> |
| <1.0, 0.0, 0.0> | <1.0, 0.0, 0.2> | <1.0, 0.0, 0.4> | <1.0, 0.0, 0.6> | <1.0, 0.0, 0.8> | <1.0, 0.0, 1.0> |
| <1.0, 0.2, 0.0> | <1.0, 0.2, 0.2> | <1.0, 0.2, 0.4> | <1.0, 0.2, 0.6> | <1.0, 0.2, 0.8> | <1.0, 0.2, 1.0> |
| <1.0, 0.4, 0.0> | <1.0, 0.4, 0.2> | <1.0, 0.4, 0.4> | <1.0, 0.4, 0.6> | <1.0, 0.4, 0.8> | <1.0, 0.4, 1.0> |
| <1.0, 0.6, 0.0> | <1.0, 0.6, 0.2> | <1.0, 0.6, 0.4> | <1.0, 0.6, 0.6> | <1.0, 0.6, 0.8> | <1.0, 0.6, 1.0> |
| <1.0, 0.8, 0.0> | <1.0, 0.8, 0.2> | <1.0, 0.8, 0.4> | <1.0, 0.8, 0.6> | <1.0, 0.8, 0.8> | <1.0, 0.8, 1.0> |
| <1.0, 1.0, 0.0> | <1.0, 1.0, 0.2> | <1.0, 1.0, 0.4> | <1.0, 1.0, 0.6> | <1.0, 1.0, 0.8> | <1.0, 1.0, 1.0> |
This will quickly change the color of a whole objects from only script.
integer prims=llGetNumberOfPrims();//Gets total prims of the object it is in. change_color(vector color) { integer x;//For the For loop. llSetColor(color,-1);//Sets the prims this scripts in. (no use unless in main prim) for(x=-1;x<(prims+2);x++)//A for loop to get each prim in the object. { llSetLinkColor(x,color,-1);//Sets the color of each prim in the object COLOR. } } default { state_entry() { change_color(<0,128,255>);//Will Set the the object to a light, nice shade of blue. } }


