Lichee1488303381 Posted February 26, 2013 Share Posted February 26, 2013 I have a string that I use for changing transparency. It came with ALL_SIDES, I can change that to 0-6, but how do I apply it to sides at once? integer kSide = #; <- in this case I want sides 2 and 4. I've tried 2,4 | 24 | (2,4) | 2 4:< what have I not thought of? Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted February 26, 2013 Share Posted February 26, 2013 You would simply have to apply it faca for face. llSetAlpha works for one or for all sides at a time You could use llSetLinkPrimitiveParamsFast, setting PRIM_COLOR several times. Here is a simple example that switches alpha on face 0 and 1 integer gfOn;default { touch_end(integer num_detected) { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_COLOR, 0, llGetColor(0), gfOn, PRIM_COLOR, 1, llGetColor(1), gfOn] ); gfOn = !gfOn; }} Link to comment Share on other sites More sharing options...
Xiija Posted February 26, 2013 Share Posted February 26, 2013 to change more than one face, you need to use a loop? integer face; list faces = [2,4]; integer len = llGetListLength(faces); integer n; for(n = 0;n < len;++n) { face = llList2Integer(faces,n); llSetAlpha(0.0,face); } Link to comment Share on other sites More sharing options...
Miranda Umino Posted February 26, 2013 Share Posted February 26, 2013 If you use a loop with llsetlinkprimitiveparamsfast or llsetalpha , you can get some prims displayed in one frame of the simulator and the others in the other frame . Generally it s not annoying ( 1 frame is only 22 millisseconds) . But when there are are many datas sent between the simulator and the viewer , it could be noticed But if you want to be sure your prims changed at the same frame , you need to use PRIM_LINK_TARGET PRIM_LINK_TARGET is available for LlSetPrimitiveParams , LlGetLinkPrimitiveParams, LlSetLinkPrimitiveParamsFast For your instance if you want to change to change the face 2 and 4 you use integer FACE_2 = 2; integer FACE_4 = 4;vector defaultColor = <1,1,1>;integer noLink = !!llGetLinkNumber();float alphaValue = 0.5;llSetLinkPrimitiveParamsFast( noLink , [ PRIM_LINK_TARGET, noLink , PRIM_COLOR, FACE_2, defaultColor, alphaValue, PRIM_LINK_TARGET, noLink , PRIM_COLOR, FACE_4, defaultColor, alphaValue]); 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now