Jump to content

integer link


Pushit1488312089
 Share

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

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

Recommended Posts

Hi, Ip urchased a full perm script to change textures on a broken mesh avatar from a HUD.

 integer link = LINK_SET;  // Link number to apply the texture to (LINK_SET for all links)

The scripts works great on all sections of the avatar (link_set) or in 1 section of the avatar (integer link = 4; for example)

 

My quiestion is:

How can I choose 2 or 3 different sections of the avatar?

 

I tried integer link = 4;5;6;

or 4,5,6; etc

with of course no success.

Can anyone help me? Thanks

Link to comment
Share on other sites

Three possible options spring to mind:-

  • You can set the unnecessary faces to colour black which would let you skip all this.
  • Run multiple texture-change commands (probably llSetPrimitiveParams?) each with a different face value.
  • You may want to add a FOR loop to iterate the texture-change command through multiple separate faces.

There's not enough information in your post to advise how to make these changes. A variable cast as an integer cannot store multiple values (you may want to compare with the list type, which can store multiple values).

Please remember that the 'code' button exists for pasting code into posts, it has a symbol like this: </>

  • Like 1
Link to comment
Share on other sites

Thanks for the reply freya... here´s the complete script that goes in the HUD

integer channel = -1000001; // Channel for comms (Must be same as reciever). string texture = "3190028f-1397-4b3b-bc8d-23c5bb7b250d"; // UUID of Texture to apply   integer link = LINK_SET;  // Link number to apply the texture to (LINK_SET for all links).   integer face = ALL_SIDES; // Face number to apply the texture to (ALL_SIDES for all faces).string SR = "*"; // Seperator to use in the list, must be the same                 // as the seperator to be used within the reviever                 // script.////////////////////////////////////////////////////////////////////default{    touch_start(integer total_number) // When object is touched.    {        // Say each texture property with the seperator inbetween so the reciever can parse it.        llRegionSay(channel,texture+SR+(string)link+SR+(string)face);    }}

 

I don´t need to select different faces... just prims (linked parts of the mesh)

Link to comment
Share on other sites

The script you've pasted is just a broadcaster and doesn't set texture changes itself. Using just this script your options are:-

  • You could 'fake' correct operation by broadcasting this llRegionSay multiple times per touch_start with the correct values.
  • You could create one HUD button per link/face, each with single llRegionSay lines. This would be inefficient.

Note that you should be reading the contents of the links I'm posting to improve your understanding of LSL - this forum is for help in improving your skills, I don't provide free answers.

Link to comment
Share on other sites

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