Jump to content

Saiko

Resident
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Saiko

  1. Thanks the offset one should work for me i just thought i could use a string somewhere but i couldnt filter just one msg when i was getting many for different parts of the HUD, the offset is def the way to go didnt want to edit that bunch of stuff thanks guys for all the suggestions!
  2. So i made this hud that is a texture changer, anyway, i wanna keep using it for all my products but just modding the texture uuids i have as strings in the begining so i dont have to touch everything else. My problem is yes i can give it to my customers without a problem between them BUT if i were to use in more than one product same messages and channesl, it would change some of the other products by mistake, im stressed already with this and i know this might be something really dumb but is there a way to have a unique channel for person but also a unique ID per product that doesnt need the name of the object or key but maybe somethign else? so i only change that ID per product instead of changing the channels or the messages between the hud and the items, any idea is welcome. Thanks in advance for anyone that could give me some light on this.
  3. Qie Niangao wrote: You're correct not to use a strided list if I understand correctly that the set of sides to paint is determined dynamically, whereas the textures with which to paint them is static. I realize that this is just an example, but if the same textures are often repeated, it may be worthwhile to create another level of indirection: a "texture directory list" of unique texture keys, and have the color-by-numbers lists (RED in the example) instead contain only the integer indices into that texture directory list. The reason for obsessing here is that keys take up just ridiculously large amounts of memory in a list. There are also ways to compress them when memory is tight, but it's almost always a win to avoid storing the same key more than once. yes it is dynamically, depends on the users choices, there is not repeated keys though all are different textures in what im doing, but is good to know now because maybe ill run into objects that probably use dozens of textures that could be the same. Thanks for the help and advices from each of you, im fascinated with scripting now.
  4. Ela Talaj wrote: In situations like this using a strided list is more efficient. It would look like something like this list sides = [0, "", 1, "89556747-24cb-43ed-920b-47caed15465f", 2, "89556747-24cb-43ed-920b-47caed15465f", 3, "",...] The idea is you list both side and texture to assign to it in the same list next to each other and for those sides that do not have textures just put an empty string "". Then your code would look like this: integer length = llGetListLength(sides); integer i; for (i =1; i < length; i+=2) { if(llList2String(sides,i) ! = "") llSetTexture(llList2String(sides,i),llList2Integer(sides, i-1)); } Please also note that defining a loop index variable as "x" is a bad programming style. Commonly, letters, i, j,k are used. Im pretty new to programming and only been trying to do things since a few weeks, thanks for the advice on the loop, and well i made the hud with a lot of reading and seeing examples and a some help as well of people, and yes i thought of strided list when i read about them, but since the users are selecting which face will change and that list of sides will be send to the receiver and parsed there to a new list i thought it was better this way, also because of the many color lists, im sure there would be better ways to do it, but i dont know how lol, it seems to be working fine And Thanks for the example, i'm sure i will be using it for something at some point
  5. Jack Jaehun wrote: try this: llSetTexture(llList2String(RED, llList2Integer(sides, x) ),llList2Integer(sides, x)); OMG thank you so much, it made it, works like a charm now! i feel dumb for not seeing it and making it loop in a wrong way. thank you again!!!
  6. Ok first of all ill explain what im doing, im making a texture changer hud that allow me to select different faces of a single prim and place the face number into a list, then when i click the color i want to change lets say red, it sends that list along with the color name to the receiver object, in the receiver object it parses it to a new list, i have a list for each color with the same amount of texture uuids that goes in each face. i want to make is how can i use the same list i get from the hud to use it to change the texture of that index to that exact side example. Lets say i get this from the hud list sides = ["1", "2", "5", "7"]; So i want to use those for index and sides and this is the list of textures (wood texture uuid for the example): list RED = [ "89556747-24cb-43ed-920b-47caed15465f", // index 0 for face 0 "89556747-24cb-43ed-920b-47caed15465f", // index 1 for face 1 "89556747-24cb-43ed-920b-47caed15465f", // index 2 for face 2 "89556747-24cb-43ed-920b-47caed15465f", // index 3 for face 3 "89556747-24cb-43ed-920b-47caed15465f", // index 4 for face 4 "89556747-24cb-43ed-920b-47caed15465f", // index 5 for face 5 "89556747-24cb-43ed-920b-47caed15465f", // index 6 for face 6 "89556747-24cb-43ed-920b-47caed15465f"]; // index 7 for face 7 so what i need to figure out is how can i get to change the texture of lets say of ["1", "2", "5", "7"]; to those especific sides and using the same numbers as index. at the moment i just made a for loop like this: integer length = llGetListLength(sides); integer x; for (x = 0; x < length; x++) { llSetTexture(llList2String(RED, x),llList2Integer(sides, x)); } and yeah it works but only if all the faces are selected because if the list is just a few faces it will change it only to the wrong index because of the lenght and if i use another loop it will cycle each texture every time. I dont know if i explained myself clear or if there is another way i could make this work, like send the uuid directly from the hud and parse it to a list with the same lenght as the sides one, but still i get into the same trouble of how to get each texture from the especific index to a new list. any ideas? Thanks in advance for any help you can provide me into pointing me in the right direction.
×
×
  • Create New...