Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: Number/Name Prims in Link Order

Graysen Graff
Registered User
Join date: 1 Oct 2005
Posts: 16
11-28-2006 05:49
Sometimes it is useful to have the prims in an object numbered consecutively, such as when using Logan Bauer's excellent rotation/animation system:

/15/c8/66959/1.html

Toward that end I wrote a simple utility to number and rename all the prims in an object in link order. Drop the script in each prim and say "go." The prims are renamed with their link number and the scripts disappear.
CODE

default
{
state_entry()
{

llListen(0,"",llGetOwner(),"");
}

listen(integer channel, string name, key id, string message)
{

if (llToLower(message) == "go")
{

llSetObjectName((string)llGetLinkNumber());
llRemoveInventory(llGetScriptName());


}
}
}

edit - added code tags
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
12-01-2006 09:39
/15/34/151454/1.html
_____________________
i've got nothing. ;)