Jump to content

speak texture change script?


Efotech
 Share

You are about to reply to a thread that has been inactive for 799 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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 by Quistess Alpha
Link to comment
Share on other sites

@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

You are about to reply to a thread that has been inactive for 799 days.

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
 Share

×
×
  • Create New...