Difference between revisions of "Color-to-Vector Tool"
Jump to navigation
Jump to search
m (lsl code tagging) |
Tomos Halsey (talk | contribs) |
||
Line 10: | Line 10: | ||
changed(integer change) { | changed(integer change) { | ||
if (change & CHANGED_COLOR) llOwnerSay("Color Vector = " + (string)llGetColor(FACE)); | if (change & CHANGED_COLOR) llOwnerSay("Color Vector = " + (string)llGetColor(FACE)); | ||
} | |||
} | |||
</lsl> | |||
This script shows it hovering over the prim as well for less chat spam and longer display value. | |||
<lsl> | |||
default { | |||
changed(integer change) { | |||
if (change & CHANGED_COLOR) llSetText("Color Vector = " + (string)llGetColor(0),<1.0,1.0,1.0>,1.0); | |||
} | } | ||
} | } | ||
</lsl> | </lsl> | ||
[[Category:LSL Examples]] | [[Category:LSL Examples]] |
Revision as of 12:33, 23 April 2013
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Say the Prim's Color Vector
This script is useful as a WYSIWYG color reporter. Each time the prim's color changes, the color vector is chatted to the owner. Note, it reports the color of face 0(zero) by default.
<lsl> integer FACE = 0;
default {
changed(integer change) { if (change & CHANGED_COLOR) llOwnerSay("Color Vector = " + (string)llGetColor(FACE)); }
} </lsl>
This script shows it hovering over the prim as well for less chat spam and longer display value. <lsl> default {
changed(integer change) { if (change & CHANGED_COLOR) llSetText("Color Vector = " + (string)llGetColor(0),<1.0,1.0,1.0>,1.0); }
} </lsl>