Jump to content

List more than 1 link in texture change script


Annabell Wandsworth
 Share

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

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

Recommended Posts

Hi

I am working with a texture change script hud and am trying to figure out how to list more than one object in a linkset to have the texture changed. I am not a scripter, and have im'd the maker of the script, but thought maybe y'all could help.

Here is the line from the script:

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

I have put one of the object numbers in (15), but what I would like is 15, 16, 19, 23 for example. 

I appreciate any help anyone could offer.

Annabell

Link to comment
Share on other sites

There are a couple of different ways to achieve that.

One is to build a list of the links, and run a loop applying the texture to the next link on each iteration.

Or the other, also involving running a loop, is building a paramedic list for llSetLinkPrimitiveParamsFast, using, PRIM_LINK_TARGET for each link, then setting them all at once by applying the list to that function

Link to comment
Share on other sites

You could call llSetLinkTexture once for each link you want to texture, but that sleeps the script by 0.2 seconds a time, which can take a long time if you have a lot of links.

I would use llSetLinkPrimitiveParamsFast, which is more complex to set up, but means all the links change in the same frame.  So, something like this

		llSetLinkPrimitiveParamsFast(LINK_SET, [
			PRIM_LINK_TARGET,LinkNumber,PRIM_TEXTURE,face,textureUUID,<scale>,<offset>,rotationInRadians,
			PRIM_LINK_TARGET,anotherLinkNumber,PRIM_TEXTURE,face,textureUUID,<scale>,<offset>,rotationInRadians,
			//and so on
			PRIM_LINK_TARGET,lastLinkNumberToChange,PRIM_TEXTURE,face,textureUUID,<scale>,<offset>,rotationInRadians]
			);
		]);

See the wiki article on llSetLinkPrimitiveParamsFast for what scale, offset and rotationInRadians refer to and how to use the numbers in the viewer edit window to give them values)    

Edited by Innula Zenovka
Link to comment
Share on other sites

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