Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Alphalpha

Ephraim Kappler
Reprobate
Join date: 9 Jul 2007
Posts: 1,946
11-13-2009 04:54
Is it possible to set alpha within llSetLinkPrimitiveParams without specifying the colour vectors along with the PRIM_COLOR flag? For instance, the snippet of show/hide shenanigans below does the trick but it seems really wasteful to have two functions called for each linked prim. At the same time I don't want to interfere with the colour settings on any of the child prims:

CODE

else if (message == "6")
{
llSetLinkAlpha(LINK_ALL_CHILDREN, 0, 0);
llSetLinkPrimitiveParams(5, [PRIM_TEXTURE, 0, "luvly_texture", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
llSetLinkAlpha(5, 1.0, 0);
llSetLinkPrimitiveParams(6, [PRIM_TEXTURE, 0, "luvly_texture", <0.2,0.2,0.0>, <0.0,0.0,0.0>, 0.0]);
llSetLinkAlpha(6, 1.0, 0);
}


By the time I'm done, there will be as many as twenty "else if" conditions so I really want to cut this back if at all possible. It's already a bit slow with only six 'else if's - I imagine the object is having quite a barney with the server
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-13-2009 06:37
i don't understand the question, you're asking about color, but your snippet is referring to a texture param. do you mean the alpha setting that comes with PRIM_COLOR? llSetAlpha, or llSetLinkAlpha is the only way to do it without having to specify a color vector. there is a jira to add a NULL_PARAM flag to not do any change to that specific flag
http://jira.secondlife.com/browse/SVC-4556
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Ephraim Kappler
Reprobate
Join date: 9 Jul 2007
Posts: 1,946
11-13-2009 06:59
From: Ruthven Willenov
... there is a jira to add a NULL_PARAM flag to not do any change to that specific flag
http://jira.secondlife.com/browse/SVC-4556

Thanks for that, Ruthven. It seems you did understand the question despite yourself. From what you say it seems there is no way to do what I was thinking without the implementation of NULL_PARAM.

I was hoping to vary textures in the script, which is why I wanted to set the texture parameters but the important thing is the show/hide stuff so I just removed the llSetLinkPrimitiveParams functions and the script works quite smoothly now.

Note: For what it's worth, I voted for that JIRA.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
11-13-2009 07:59
From: Ephraim Kappler
By the time I'm done, there will be as many as twenty "else if" conditions so I really want to cut this back if at all possible. It's already a bit slow with only six 'else if's - I imagine the object is having quite a barney with the server
Don't worry about the server. The time consumed is consumed by delays, each llSetPrimitiveParams/llSetLinkPrimitiveParams will delay the script 0.2 S.
_____________________
From Studio Dora
Ephraim Kappler
Reprobate
Join date: 9 Jul 2007
Posts: 1,946
11-13-2009 08:22
From: Dora Gustafson
Don't worry about the server. The time consumed is consumed by delays, each llSetPrimitiveParams/llSetLinkPrimitiveParams will delay the script 0.2 S.

Thanks for that, Dora. I noticed the delay mentioned someplace on the Wiki and thought I might get away with it all the same. Unfortunately it was no go because I need a seamless change between the various prims and the 0.2s delay was far too noticeable. This in spite of being a good boy and limiting the number of scripts, using llDetectedLinkNumber and whatever else I could find.