Difference between revisions of "CHANGED COLOR"
Jump to navigation
Jump to search
Gally Young (talk | contribs) m (multi lang) |
(Add Blinn-Phong terminology to page following PBR release.) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{LSL Constant | |||
|name=CHANGED_COLOR | |name=CHANGED_COLOR | ||
|type=integer | |type=integer | ||
|value={{LSL Hex|0x2}} | |value={{LSL Hex|0x2}} | ||
|desc=Prim color or alpha parameters have changed | |desc=Prim [[PBR_Materials#Nomenclature_changes|Blinn-Phong]] color or alpha parameters have changed | ||
|examples= | |examples= | ||
< | <source lang="lsl2"> | ||
default | default | ||
{ | { | ||
changed(integer change) | changed(integer change) | ||
{ | { | ||
if (change & CHANGED_COLOR) //note that it's & and not &&... it's bitwise! | if (change & CHANGED_COLOR) //note that it's & and not &&... it's bitwise! | ||
{ | { | ||
Line 16: | Line 17: | ||
} | } | ||
} | } | ||
</ | </source> | ||
|functions= | |functions= | ||
{{LSL DefineRow||[[llSetAlpha]]|Sets the prim's alpha}} | {{LSL DefineRow||[[llSetAlpha]]|Sets the prim's alpha}} | ||
Line 24: | Line 25: | ||
{{LSL DefineRow||[[llSetLinkColor]]|Sets link's color}} | {{LSL DefineRow||[[llSetLinkColor]]|Sets link's color}} | ||
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|Sets link's parameters}} | {{LSL DefineRow||[[llSetLinkPrimitiveParams]]|Sets link's parameters}} | ||
|constants= | |||
{{LSL DefineRow||[[PRIM_COLOR]]|}} | |||
|events= | |events= | ||
{{LSL DefineRow||[[changed]]|}} | {{LSL DefineRow||[[changed]]|}} |
Latest revision as of 12:28, 1 December 2023
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer CHANGED_COLOR = 0x2;The integer constant CHANGED_COLOR has the value 0x2
Prim Blinn-Phong color or alpha parameters have changed
Caveats
Related Articles
Constants
• | PRIM_COLOR |
Functions
• | llSetAlpha | – | Sets the prim's alpha | |
• | llSetColor | – | Sets the prim's color | |
• | llSetPrimitiveParams | – | Sets the prim's parameters | |
• | llSetLinkAlpha | – | Sets link's alpha | |
• | llSetLinkColor | – | Sets link's color | |
• | llSetLinkPrimitiveParams | – | Sets link's parameters |
Events
• | changed |
Examples
default
{
changed(integer change)
{
if (change & CHANGED_COLOR) //note that it's & and not &&... it's bitwise!
{
llOwnerSay("The color or alpha changed.");
}
}
}