Sylvia Wasp Posted January 29, 2020 Share Posted January 29, 2020 OK, I'm not a great scripter, so I'm probably going to phrase this incorrectly ... please have patience! I'm a clothing designer and I make & use HUDs to change the textures on the clothes. Up until now this has been just a simple array of 4, 6, 9 or 12 buttons, (one for each texture). Clicking the button on the HUD makes it shout it's name ("button_01", "button_02" etc.). The script in the clothing listens for the HUD. It has a list of keys (UUIDs) at the top and an if, else if structure that uses llSetLinkPrimitiveParamsFast to set the textures on the correct faces and so on depending on which button it heard. This works fine when there's one simple array of 12 or less buttons, but I'm now trying to make a HUD with two sets of buttons, one for choosing the pattern and one for setting the level of sheerness of the pattern. To be clear, I'm not talking about setting the Alpha of a texture, (I know how to do that) these are all still just textures but some of the textures have sheer areas. There are 6 fabric patterns and 3 levels of sheerness, so ... 18 textures in all. For clarity, I've labelled the keys to the textures things like, "texture_01_sheer_90", "texture_01_sheer_80", "texture_01_sheer_60", "texture_02_sheer_90" ... and so on But if I want the level of sheerness and the selected texture to "stick," then every time I press one of the six texture buttons, I have to test for three possible levels of sheerness' and every time I press a sheerness button I have to test for the six different patterns. This gives me (at minimum) a super unwieldy if-else tree that has 36 levels! It just doesn't seem like the right way to go. Even if I save the pattern choice (1 of 6) and the sheerness level (1 of 3) in variables, I still have to test for that variable and I'm still stuck with the super long unwieldy if-else structure. I'm sure this problem must have been solved before, can anyone point me in the right direction? Assuming I've made any goddamned sense at all, lol. Sylvia Link to comment Share on other sites More sharing options...
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