Jump to content

Applying Texture via HUD Quick Question


Toxophilite
 Share

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

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

Recommended Posts

Setting up a hud for an item of clothing.

Integer face = 1; //Face number to apply the texture to (ALL_SIDES for all faces).

I need it to apply the same texture to face 1 and 2. 1, 2 does not work or 1 2 or 1,2 etc. It has 3 faces and 2 would be same texture.

Link to comment
Share on other sites

So do llSetTexture twice: one time for face 1 and the second time for face 2.  Or use SLPPF with its PRIM_TEXTURE parameter and repeat the command twice in it, using PRIM_LINK_TARGET:

llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_LINK_TARGET,0,"My_texture",1,<1,1,1>,ZERO_VECTOR,0.0,PRIM_LINK_TARGET,0,"My_Texture",2,<1,1,1>,ZERO_VECTOR,0.0]);

Link to comment
Share on other sites

With llSetTexture you can set either ALL_SIDES or one side at a time, not a combination of sides.   

In this situation I'd use llSetLinkPrimitiveParamsFast(link_no, [PRIM_TEXTURE, face 1, ..... PRIM_TEXTURE, face 2, .....]); 

ETA:  Rolig and I pushed the button at the same time!   Note that I'm assuming you're working on a single prim/mesh, while Rolig's solution works for the whole linkset. 

Edited by Innula Zenovka
Link to comment
Share on other sites

17 minutes ago, Innula Zenovka said:

[ .... ] Note that I'm assuming you're working on a single prim/mesh, while Rolig's solution works for the whole linkset. 

... addressing only link 0 (the root in a one-link linkset).  I didn't know how many links you had in yours, so opted to use the more general construction with PRIM_LINK_TARGET just so you'd see that it's an option.  If you really do have only one link, though, Innula's setup is much simpler.  ;)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2639 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...