Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: llSetLink* Helper Script

Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-26-2007 16:55
While the llSetLinkTexture, llSetLinkPrimitiveParams, llSetLinkAlpha & llSetLinkColor commands are useful, it can be a pain identifying the link and face numbers.

This script is a simple helper for finding the right numbers for a prim and face in a linkset you are interested in.

Simply set the color of the face to something you will recognise. eg black when all the others are white, then drop this script into the contents tab of the prim. It will produce a report then delete itself.

[16:30] Object: Prim 2's colors are:
0 : <1.00000, 1.00000, 1.00000>
1 : <1.00000, 1.00000, 1.00000>
2 : <1.00000, 1.00000, 1.00000>
3 : <1.00000, 1.00000, 1.00000>
4 : <0.00000, 0.00000, 0.00000>
5 : <1.00000, 1.00000, 1.00000>

So in this example prim 2, face 4 is the one that I wanted :)

CODE

// DD Face Color Reporter
// by Domino Marama

default
{
state_entry()
{
integer sides = llGetNumberOfSides();
string msg = "";
while (sides > 0)
{
--sides;
msg = (string)sides + " : " + (string)llGetColor(sides) + "\n" + msg;
}
llOwnerSay("Prim " + (string)llGetLinkNumber() + "'s colors are:\n" + msg);
llRemoveInventory("DD Face Color Reporter");
}
}

Remember to change the llRemoveInventoryLine to match the name you save the script as.
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
03-29-2007 05:56
/15/02/173689/1.html
_____________________
i've got nothing. ;)
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
03-30-2007 08:38
There's a little-known feature that makes this kind of task even easier. Choose a prim face with Select Texture, and then do control-alt-shift-T, or Debug -> Rendering (?) -> Selected Texture Information. It'll tell you the resolution of the texture on that face and what the face number is.