“LlSetLinkColor”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: llSetLinkColor( integer link, vector color, integer face )…”) |
|||
第28行: | 第28行: | ||
|相关函数= | |相关函数= | ||
− | [[]] | + | [[llGetLinkNumber]] - 返回脚本所在的prim的链接号。 |
− | [[]] | + | [[llGetLinkNumberOfSides]] - 返回链接的prim的面数。 |
+ | |||
+ | [[llGetAlpha]]– 获取Prim的alpha值 | ||
+ | |||
+ | [[llSetAlpha]] – 设置Prim的alpha值 | ||
+ | |||
+ | [[llGetColor]]– 得到Prim的颜色 | ||
+ | |||
+ | [[llSetColor]] – 设置Prim的颜色 | ||
+ | |||
+ | [[llSetLinkAlpha]]– 设置链接的alpha | ||
+ | |||
+ | [[llSetLinkTexture]] | ||
+ | |||
+ | [[llSetLinkPrimitiveParams]] | ||
− | |||
|相关事件= | |相关事件= | ||
+ | [[changed]] - [[CHANGED_COLOR]] | ||
}} | }} | ||
附录:(表格) | 附录:(表格) | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
− | ! | + | ! clospan="2" | Flag |
− | ! | + | ! Description |
− | ! | + | |- |
+ | | [[LINK_ROOT]] | ||
+ | | 1 | ||
+ | | refers to the root prim in a multi-prim linked set[1] | ||
+ | |- | ||
+ | | [[LINK_SET]] | ||
+ | | -1 | ||
+ | | refers to all prims | ||
+ | |- | ||
+ | | [[LINK_ALL_OTHERS]] | ||
+ | | -2 | ||
+ | | refers to all other prims | ||
+ | |- | ||
+ | | [[LINK_ALL_CHILDREN]] | ||
+ | | -3 | ||
+ | | refers to all children, (everything but the root) | ||
+ | |- | ||
+ | | [[LINK_THIS]] | ||
+ | | -4 | ||
+ | | refers to the prim the script is in | ||
+ | |} | ||
+ | |||
+ | '''Useful Snippets''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Color | ||
+ | ! Hexadecimal code | ||
+ | ! LSL color representations | ||
+ | |- | ||
+ | | AQUA | ||
+ | | #7fdbff | ||
+ | | <0.498, 0.859, 1.000> | ||
+ | |- | ||
+ | | BLACK | ||
+ | | #111111 | ||
+ | | <0.067, 0.067, 0.067> | ||
+ | |- | ||
+ | | BLUE | ||
+ | | #0074d9 | ||
+ | | <0.000, 0.455, 0.851> | ||
+ | |- | ||
+ | | FUCHSIA | ||
+ | | #f012be | ||
+ | | <0.941, 0.071, 0.745> | ||
+ | |- | ||
+ | | GRAY | ||
+ | | #aaaaaa | ||
+ | | <0.667, 0.667, 0.667> | ||
+ | |- | ||
+ | | GREEN | ||
+ | | #2ecc40 | ||
+ | | <0.180, 0.800, 0.251> | ||
+ | |- | ||
+ | | LIME | ||
+ | | #01ff70 | ||
+ | | <0.004, 1.000, 0.439> | ||
+ | |- | ||
+ | | MAROON | ||
+ | | #85144b | ||
+ | | <0.522, 0.078, 0.294> | ||
+ | |- | ||
+ | | NAVY | ||
+ | | #001f3f | ||
+ | | <0.000, 0.122, 0.247> | ||
+ | |- | ||
+ | | OLIVE | ||
+ | | #3d9970 | ||
+ | | <0.239, 0.600, 0.439> | ||
+ | |- | ||
+ | | ORANGE | ||
+ | | #ff851b | ||
+ | | <1.000, 0.522, 0.106> | ||
+ | |- | ||
+ | | PURPLE | ||
+ | | #b10dc9 | ||
+ | | <0.694, 0.051, 0.788> | ||
+ | |- | ||
+ | | RED | ||
+ | | #ff4136 | ||
+ | | <1.000, 0.255, 0.212> | ||
+ | |- | ||
+ | | SILVER | ||
+ | | #dddddd | ||
+ | | <0.867, 0.867, 0.867> | ||
+ | |- | ||
+ | | TEAL | ||
+ | | #39cccc | ||
+ | | <0.224, 0.800, 0.800> | ||
|- | |- | ||
− | | | + | | WHITE |
− | | | + | | #ffffff |
− | | | + | | <1.000, 1.000, 1.000> |
|- | |- | ||
− | | | + | | YELLOW |
− | | | + | | #ffdc00 |
− | | | + | | <1.000, 0.863, 0.000> |
|} | |} |
2020年8月24日 (一) 02:00的最新版本
首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
函数名 |
---|
Function: llSetLinkColor( integer link, vector color, integer face ); |
参数:• integer link – Link number (0: unlinked, 1: root prim, >1: child prims and seated avatars) or a LINK_* flag
• vector color – color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white) • integer face – face number or ALL_SIDES |
返回值:如果一个prim存在于link集合中,请在该prim的表面上设置颜色。
如果面是ALL_SIDES,那么函数对所有面都起作用。 |
注意事项 |
---|
如果该函数的面值表示一个不存在的面值,则该函数将悄无声息地失败。 |
示例 |
---|
将链接设置变为绿色
default { touch_start(integer detected) { llSetLinkColor(LINK_SET, <0.0, 1.0, 0.0>, ALL_SIDES); } } |
相关函数 |
---|
llGetLinkNumber - 返回脚本所在的prim的链接号。
llGetLinkNumberOfSides - 返回链接的prim的面数。 llGetAlpha– 获取Prim的alpha值 llSetAlpha – 设置Prim的alpha值 llGetColor– 得到Prim的颜色 llSetColor – 设置Prim的颜色 llSetLinkAlpha– 设置链接的alpha |
相关事件 |
---|
changed - CHANGED_COLOR |
附录:(表格)
Flag | Description | |
---|---|---|
LINK_ROOT | 1 | refers to the root prim in a multi-prim linked set[1] |
LINK_SET | -1 | refers to all prims |
LINK_ALL_OTHERS | -2 | refers to all other prims |
LINK_ALL_CHILDREN | -3 | refers to all children, (everything but the root) |
LINK_THIS | -4 | refers to the prim the script is in |
Useful Snippets
Color | Hexadecimal code | LSL color representations |
---|---|---|
AQUA | #7fdbff | <0.498, 0.859, 1.000> |
BLACK | #111111 | <0.067, 0.067, 0.067> |
BLUE | #0074d9 | <0.000, 0.455, 0.851> |
FUCHSIA | #f012be | <0.941, 0.071, 0.745> |
GRAY | #aaaaaa | <0.667, 0.667, 0.667> |
GREEN | #2ecc40 | <0.180, 0.800, 0.251> |
LIME | #01ff70 | <0.004, 1.000, 0.439> |
MAROON | #85144b | <0.522, 0.078, 0.294> |
NAVY | #001f3f | <0.000, 0.122, 0.247> |
OLIVE | #3d9970 | <0.239, 0.600, 0.439> |
ORANGE | #ff851b | <1.000, 0.522, 0.106> |
PURPLE | #b10dc9 | <0.694, 0.051, 0.788> |
RED | #ff4136 | <1.000, 0.255, 0.212> |
SILVER | #dddddd | <0.867, 0.867, 0.867> |
TEAL | #39cccc | <0.224, 0.800, 0.800> |
WHITE | #ffffff | <1.000, 1.000, 1.000> |
YELLOW | #ffdc00 | <1.000, 0.863, 0.000> |