Efotech Posted July 29, 2022 Share Posted July 29, 2022 I have a shirt that I made that I really like and it has several textures that I put in a hud so I could change them. What I would like to do is find a way to say something in local that could automatically change the tecture of the shirt, if that makes sense. Are there any scripts out there that could do this? thanks in advance Link to comment Share on other sites More sharing options...
Quistess Alpha Posted July 29, 2022 Share Posted July 29, 2022 (edited) 1 hour ago, Efotech said: I have a shirt that I made that I really like and it has several textures that I put in a hud so I could change them. What I would like to do is find a way to say something in local that could automatically change the tecture of the shirt, if that makes sense. Are there any scripts out there that could do this? a texture change script works exactly the same whether it's driven by a HUD or by local chat, although if you put the textures into the inventory of the texture-changed thing, and only want it to respond to the owner, you can simplify the script down to its bare basics: // script and textures go in the inventory of the texture-changed object. // integer gChannel = 27; // in this example you will have to say '/27' in front of the name of the txture: // for exmaple: '/27 magic-blue' or // '/27 magic-blue 2' to only set on face 2. // if the channel is 0, you don't have to say anything in front: // 'magic-blue 2' default { state_entry() { llListen(27,"",llGetOwner(),""); } listen(integer channel, string name, key ID, string texture) { texture = llStringTrim(texture,3); list parsed = llParseStringKeepNulls(texture,[],[" "]); // spacers get kept in the list. string last = llList2String(parsed,-1); integer face = (integer)last; if(face || last == "0") { texture = (string)llDeleteSubList(parsed,-1,-1); }else { face = -1; } llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE,face,texture,<0,0,0>,<1,1,0>,0.0 ]); } } or so (untested) Edited July 29, 2022 by Quistess Alpha Link to comment Share on other sites More sharing options...
Efotech Posted July 30, 2022 Author Share Posted July 30, 2022 @Quistess AlphaThank you so much for your help! I am by far no scripter, but you mean that the textures go inside the contents of the shirt? I did that but it still does not chage. Do I need to put the UUID's into the script? Would it be helpful if I sent you a copy of the shirt and the textures? 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