Don't click here unless you want to be banned.

LSL Wiki : llGetColor

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
vector llGetColor(integer face)

Returns the color of face (side). If face is ALL_SIDES, the color returned is the mean average of the colors on all sides. This could concievably be used to make a color "blending" script.

Color component values range from 0.0 to 1.0. See color for more info.

Color information can also be retrieved using the llGetPrimitiveParams function.

To set the color use llSetColor or llSetPrimitiveParams.

To access individual color components the vector 'dot' feature can be used:

vector color = llGetColor(ALL_SIDES);
float red_component = color.x;
float green_component = color.y;
float blue_component = color.z;
vector color; //Defines the object color
state_entry() //Script startup
color = llGetColor(); 
llSay(0 , (string)((vector) color)); //States the object color over channel 0
}//The End

See vector for more info.

Note: This function will cause the script to fail silently if it is supplied with a face that does not exist: e.g, if a loop goes around 10 times reading the color of faces 0 to 9, and if the script is an unmodified cube, then it will fail on the 7th iteration (as a cube only has 6 sides). There is currently no way to know that this has happened so be careful using loops!

Q: How do I determine which side of an object this applies to?
A: See side.

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Texture | Color Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There is no comment on this page. [Display comments/form]