Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

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
Discussion Thread
03-29-2007 05:56
/54/63/174179/1.html
_____________________
i've got nothing. ;)