QueenofChaos26 Posted March 18, 2019 Share Posted March 18, 2019 I'm trying to figure out something. I made this male genitals which is a link set from flaccid to erect and im trying to make a hud and one of the things it will have is a show/hide button. But what I cant figure out is how to make it where it remembers the selected state when u hide it and only makes that selection non transparent without making the entire linkset non transparent. sorta like what you see on the huds for aeros, brandom designs, etc ettc Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 18, 2019 Share Posted March 18, 2019 You have to make a specific face on that object transparent or visible, not ALL_SIDES. If you are doing it with llSetLinkAlpha, for example, you would want to identify the specific face you are changing and then write llSetLinkAlpha( link_number, 1.0, face_number); // to make it visible, or llSetLinkAlpha( link_number, 0.0, face_number); // to make it transparent Link to comment Share on other sites More sharing options...
QueenofChaos26 Posted March 18, 2019 Author Share Posted March 18, 2019 (edited) ik how to do that but im saying how can one make it memorize the face/linknumber that was non-transparent before hiding the object from sight. for instance; my genital mesh has six states one can choose from so there is six separate buttons that represent each one. Then u have two more buttons; one that completely hides the mesh and one that makes the last selected state visible ONLY while the others remain invisible. Edited March 18, 2019 by QueenofChaos26 Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted March 18, 2019 Share Posted March 18, 2019 Here's one simplistic solution, it was only the first thing that came to mind (and one that doesn't take long to type out), so there are definitely more elegant ways. (Note: This is not a complete script, I'm only demonstrating the concept of "how to hide/unhide a set of links.") // This needs to be changed whenever appropriate, not shown here. integer visible; // 0 = soft, 5 = hard integer current_state; // list of link numbers for a specific state list soft = [1, 2, 3]; list hard = [1, 12, 13]; default { touch_start(integer n) { if(current_state == 0) { integer i = llGetListLength(soft); while(--i >= 0) { llSetLinkAlpha(llList2Integer(soft, i), visible, ALL_SIDES); } } else if(current_state == 5) { integer i = llGetListLength(hard); while(--i >= 0) { llSetLinkAlpha(llList2Integer(hard, i), visible, ALL_SIDES); } } } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 18, 2019 Share Posted March 18, 2019 That all depends on how you wrote your script, so it's a little hard to tell specifically. If you are not resetting the script at any point, you would normally just create a global variable to hold that value, and then reapply it when you need it again. If you plan on resetting the script, you'll want to save the value somewhere that does not change, like the Description field of the root prim, and then read it and reapply it again in the state_entry event. Link to comment Share on other sites More sharing options...
steph Arnott Posted March 18, 2019 Share Posted March 18, 2019 4 minutes ago, Rolig Loon said: That all depends on how you wrote your script, so it's a little hard to tell specifically. If you are not resetting the script at any point, you would normally just create a global variable to hold that value, and then reapply it when you need it again. If you plan on resetting the script, you'll want to save the value somewhere that does not change, like the Description field of the root prim, and then read it and reapply it again in the state_entry event. The minds of men never cease to re-inforce my view of them. Link to comment Share on other sites More sharing options...
QueenofChaos26 Posted March 18, 2019 Author Share Posted March 18, 2019 Um.... I'm just gonna have it setup to where it resets to default state when clicking the show button. also if anyone knows where I can find a color picker script that is basically what u see on the catwa huds in the "Alpha, Lashes, Tint, Neck-Size" Tab then i'd appreciate it 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