Lexitus Posted April 15, 2016 Share Posted April 15, 2016 I have an object that I want to change the texture on touchif I use llSetTexture( textureName, ALL_SIDES); it works just fine.When I changed the script to only change one face using llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, 2, textureName, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0]);It gets the message "texture not transferable"I am not sure why that is? Any clues? Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 15, 2016 Share Posted April 15, 2016 llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, 2, textureName, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0]) won't just change the texture on face 2. It specifically changes it on face 2 of link 3 in the linkset. If you don't have at least three links in the link set, the statement won't be able to execute. There's no place to put the texture. Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted April 15, 2016 Share Posted April 15, 2016 Right, in addition to what Rolig said, if you're trying to set the texture to the link the script resides in, you could change the 3 to LINK_THIS. If you're not sure which link number the prim is, you can use this script below. default{// Drop this script into the root prim of of a build// Touch any prim to learn its link number touch_start(integer num_detected) { llOwnerSay("Link number clicked: " + (string)llDetectedLinkNumber(0) ); }} Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted April 15, 2016 Share Posted April 15, 2016 And to make sure face 2 is indeed the one you want to apply the texture to // This is the essential script to drop in a prim when you need to ascertain the number of a face (or faces)// Touch the prim surfaces to learn their face numbers, which you can then use in other scripts for texturing, colouring etc. say(string message){ llSay(PUBLIC_CHANNEL, message);} default{ touch_start(integer num_detected) { integer face = llDetectedTouchFace(0); if (face == TOUCH_INVALID_FACE)// { say("The touched face could not be determined");//if using a viewer that doesn't support detecting face touches// } else// { say("You touched face number " + (string) face);// } }} Link to comment Share on other sites More sharing options...
Innula Zenovka Posted April 15, 2016 Share Posted April 15, 2016 I suspect the problem is what the error message suggests it is -- that the texture is not full perms. That's an issue because, if the texture is not full perms to the prim's owner -- you -- then you can set the prim's texture using the texture's name if, and only if, the texture is in the prim's inventory. Otherwise you have to use the texture's uuid. However, you can't read the texture's uuid by script unless the texture is full perms to you. So, I suspect the reason changing the texture with llSetTexture works and llSetLinkPrimitiveParamsFast doesn't is that the texture is inside the prim that contains the script. I'm a bit surprised at the wording of the error message, but if the texture isn't full perms then that would explain why you're having problems. If the texture is copyable (and if you're not planning on giving away or selling the object when you've scripted it) you could put a copy of the texture and a separate script inside the child prim you want to texture and, when you want to retexture the child prim, trigger llSetTexture in that script by means of a link message. 1 Link to comment Share on other sites More sharing options...
Qwalyphi Korpov Posted April 16, 2016 Share Posted April 16, 2016 I suspect the OP has wandered away... probably because they had a single prim object. In any case when using inventory name to set texture it must be copy to set a non-inventory link number. No-mod is not a problem. Link to comment Share on other sites More sharing options...
Asimos Posted June 23, 2016 Share Posted June 23, 2016 What if you want to put it in the market place. It looks that now there is no solution. Does the use of UUID (in the owners Inventory) instead of the name as helps? Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 23, 2016 Share Posted June 23, 2016 Yes, you can use the UUID. The texture doesn't need to be in your inventory. Also, see the note in the LSL wiki entry for llSetTexture: If texture is a UUID then there are no new asset permissions consequences for the object. The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.So using a texture UUID instead of having the texture in the object's inventory won;t mess up the object's next owner perms. When I write a script for a client that needs to change textures, I usually don't have the textures themselves at all. The client just gives me UUIDs, and I hard code them into the script. 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