Jump to content

Elfie Erin

Resident
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Elfie Erin

  1. Indeed ? but thank you for this, I get whats going on now! Simple and elegant, you deserve a medal ?! I'm posting an annotated result that does what I wanted here, so others who have the same issue can benefit from this as well ??! Sharing is caring~ This script lets you update textures on a link-set from an applier. Sender Place this script inside your sender. This is a simple example of an object you click on. integer MyChannel; key MyOwner; // Your texture UUIDs go here, followed by a space to seperate them at the reciever. // Add more textures here if needed, following the pattern. string tex_1 = "a8aae143-39dd-49d6-909c-7640619e2b3b "; string tex_2 = "6debb190-2d88-454b-bb8d-7ea6e046eb79 "; default { state_entry() { // Security so you dont effect other users objects, or they yours. MyOwner = llGetOwner(); MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner); } touch_start(integer total_number) { // Sends your UUIDs, add more (string)tex_# if needed. lWhisper(MyChannel, (string)tex_1 + (string)tex_2; } } Receiver Place this script inside the object you want to change textures on. integer MyChannel; key MyOwner; default { state_entry() { MyOwner = llGetOwner(); MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner); llListen(MyChannel,"",NULL_KEY,""); } listen(integer channel, string name, key id, string message) { if(llGetOwnerKey(id) == llGetOwner()) { // Parse the message by separating it by spaces. // The spaces will not be in the list. list textures = llParseString2List(message, [" "], []); // This is how you access the textures. // First UUID. key tex_1 = llList2Key(textures, 0); // Second UUID. key tex_2 = llList2Key(textures, 1); // Applies the texture to a specified link, tex_1 being the first UUID recieved and so on, to desired face. llSetLinkTexture(1, tex_1, ALL_SIDES); llSetLinkTexture(2, tex_2, ALL_SIDES); } } } Let me know any blatant errors and I will fix this post.
  2. Thanks for all the replies. I've been trying to figure out how the mentioned solutions work for a day now and kind of get it, but my understanding of coding fails me again. What I have now, seems to me two lists, one with the 'tex_#' ID's, another with the corresponding UUID to that id, which is awesome! I just can't figure out how to manipulate the list and its contents now. My problem is I cant visualize where the list "exist" so to speak, so when I try to plug the ID or key in, I can only get the first in the list. integer MyChannel; key MyOwner; string EMPTY_STR = ""; string FUNC_SEP = "|"; string DATA_SEP = "^"; default { state_entry() { MyOwner = llGetOwner(); MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner); llListen(MyChannel,"",NULL_KEY,""); } listen(integer channel, string name, key id, string message) { list pairs = llParseString2List(message, [FUNC_SEP], [EMPTY_STR]); integer x; integer numPairs = llGetListLength(pairs); for (x = 0; x < numPairs; x++) { list params = llParseString2List(llList2String(pairs, x), [DATA_SEP], [EMPTY_STR]); string id = llList2String(params, 0); key texture = (key)llList2String(params, 1); //do something llSetLinkTexture(1, id#1, ALL_SIDES); llSetLinkTexture(2, id#2, ALL_SIDES); } } } I suspect I will have to do some flow control to get it to work after //do something, or is there a simpler way to pick the 'id' by number? Right now I can only figure out how to pick the id, being "tex_1" and "tex_2" by name becuase I know them, but I don''t know how to use the 'texture' UUID corresponding to it's 'id', if that makes any sense ?...
  3. Thanks for the quick response. I'll try out these functions and see if I can get it to work like this! ??
  4. Hello I've been working on a texture applier for a while now and I've hit a wall, so I figured I would ask for some help here. My plan is to have a script that holds texture UUIDS as so, string tex_1 = "3d80799c-de95-11e8-9f32-f2801f1b9fd1"; string tex_2 = "3d807c12-de95-11e8-9f32-f2801f1b9fd1"; Then once triggered, it sends a message to a receiver containing the UUIDs llWhisper(MyChannel, "tex_1 "+(string)tex_1 + " " + "tex_2 "+(string)tex_1); The reciever then hears the string (cleaned it up visually here) tex_1 3d80799c-de95-11e8-9f32-f2801f1b9fd1 tex_2 3d807c12-de95-11e8-9f32-f2801f1b9fd1 This is where I get a bit stumped about performing a function that takes this string and changes the corresponding receivers "string tex_1 = UUID" to the one being sent. What I can't figure out is how to clean up the message once received, if such a thing is possible in the first place, or if I'm just not thinking about this the right way. If the receiver can load the UUID in like this, it will apply them to the desired links and faces of my mesh. I have tried a few other methods that did not pan out, but I think if this one could actually function, it would be a more clean way of performing a one-click texture application to my avatar.
  5. Alright thanks, that gives me an idea to go on!
  6. Hello I am working on making avatars and would like to add some animation functionality to them. For example, I'm trying to create a head with a movable jaw, controlled by a slider that goes from closed to fully open. The head is rigged to the bento bones, so what I'm trying to find out is if it is possible to control an animation in-world, frame by frame, or if I would have to cut the animation into individual animations for each frame, toggling between several animations along the slider to open and close the mouth (The latter option seeming quite wasteful). Secondly, I am slightly perplexed by what LSL functions would allow me to create such a slider in the first place, so any advice in a more right direction would be much appreciated. I'm guessing it would be something along the lines of llDetectedTouchUV, but I would rather ask for help before trying to re-invent the wheel!
  7. That actually did the trick! Thank you very much. The problem was my bones were not aligned to the T-pose on export, and when I adjusted them, the problems went away!
  8. Hello! Lately I've been trying to learn how to make custom mesh avatars for SL, but I've run into a problem I can't seem to figure out on my own. As far as I know, it should be possible to do what I am trying to do, so hopefully someone can share some much needed knowledge about the subject. The issue I'm having is editing the SL armature to to fit my mesh, which possible, results in some weird bone deformation/offsets in SL on import. Judging from the picture i've attached, the problem seems to be the edited bones not storing rotation in world, where scale and position seems to function just fine. As a result of the bones not being rotated, it causes my avatars legs to spread out in a funny manner (which amusing, isn't very useful! ??) see second picture.
×
×
  • Create New...