Jump to content

Ry Elcano

Resident
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Ry Elcano

  1. Thank you very much for the replies The script is now functioning properly and applying by the UUID. One of the problems was that having textures in the inventory was not an option, so I was trying to work around that while the list of textures kept growing. Eventually I had to make the two lists and add in a query to find the matching UUID. Thanks again for the advice, very much appreciated
  2. Hi :) I was hoping someone could please offer a little assistance as to where I'm going wrong with this coding. The script I'm working on is a texture changer for certain linked prims based on names, and runs via a dialog menu. I'm looking at expanding the number of textures available for choosing but I don't want to re-write the script to be a notecard reader to get the UUID's. (if possible!). So, I currently have the UUID's of the choices in the script as per below: string Vic_101 = "xxxxxxxxx UUID Value Here xxxxxxxxxx"; string Vic_102 = "xxxxxxxxx UUID Value Here xxxxxxxxxx"; string Vic_103 = "xxxxxxxxx UUID Value Here xxxxxxxxxx"; string Vic_104 = "xxxxxxxxx UUID Value Here xxxxxxxxxx"; The name "Vic_101" would be an option name on the dialog menu. So when the person chooses the texture from the menu such as Vic_101, it applies that texture by it's UUID. As the list of textures is growing I don't want to have to hard code a menu option for every available texture choice. So after setting up all the other available choices for the menu, I have the below to handle the selection of texture from the menu (the other options relate to access permissions etc): else { SetLinkPrimitiveParamsFast(message); } // This then calls the below, which sits above the default state: SetLinkPrimitiveParamsFast(string texture) { integer i; for (i = llGetNumberOfPrims(); i > 0; --i) { if (llGetLinkName(i) == child_name_wall) { llSetLinkPrimitiveParamsFast(i,[ PRIM_TEXTURE, ALL_SIDES, texture, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 ]); } } llWhisper(0, "Applying texture: " + texture); } This is where the problem is happening.What I wanted was for the person to select, for example Vic_101, from the menu and then that message becomes the name of the texture to apply. As that name is specified as a string above, the script would then apply using UUID instead, but I can't get that to work. It attempts to apply the texture by the name selected from the menu, such as "Vic_101" rather than the UUID against it in 'string Vic_101 = "xxxxxxx UUDI HERE xxxxxxx" . I know I'm missing something here, but can't put my finger on it. Thinking maybe I have to add a 'key' but not entirely sure where, or that it is not properly looking at the string "Vic_101" and so is not applying by it's UUID. Any help or direction on this would be greatly appreciated! Thanks in advance. :)
×
×
  • Create New...