Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LSL llSetLinkNum

Cashmere Falcone
Prim Manipulator
Join date: 21 Apr 2004
Posts: 185
10-31-2004 17:14
llSetLinkNum(#), so in a large multi-prim object, we can set the link number of child prims to what we want!

pweeze?
_____________________
Jebus Linden for President! :p
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-31-2004 18:03
what happens to the prim that already accupies that link number?

does it...
insert it self in the list pushing all the others up the list?
swap out the prim in that position with it's self?

both are valid solutions.

setting the prim number to be negative should have it count down from the last link.

so -1 would set it as the last prim.

(i think it should insert it into the list)

maybe the function should be...

llSetLinkNum(integer linktomove, integer locationtomoveto)

if linktomove=0 then it works on the active prim.
if linktomove<0 then it counts down from the end of the list of prims.
if linktomove>0 then it counts up the list.
if locationtomoveto<0 then it counts down the list and moves linktomove to that location
if locationtomoveto>0 then it counts up the list and moves linktomove to that location
if locationtomoveto=0 then it moves the linktomove to the location of the prim the script is in.
if locationtomoveto=1 sets that prim as root.

yeah it's complicated but it should work great.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
10-31-2004 18:08
that would be nice. i'd love to have that too.
Cashmere Falcone
Prim Manipulator
Join date: 21 Apr 2004
Posts: 185
10-31-2004 18:35
llSetLinkNum would allow you to set the link number on the prims that you need to set for cummunication purposes, the rest are just "There" their link # is not germaine to your purposes. so yes, they could be pushed higher up the prim chain.
_____________________
Jebus Linden for President! :p
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-31-2004 19:22
This would make LINK_ALL_CHILDREN useful for messaging.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Cashmere Falcone
Prim Manipulator
Join date: 21 Apr 2004
Posts: 185
10-31-2004 20:35
Exactly Strife, I think you were the one that gave me the get link number script, and that does come in handy, thanks! But for the purposes of llLinkMessage, being able to set the link number would be great, instead of mapping out, or carefully linking your objects in a certain order.
I want prim A to talk to B,C,D, and E I can TELL them what LinkNum they are, and organize my communications much more efficiently. especially in an object with upwards of 40 prims and several scripts.

llLinkedMessage(200, LinkNum #, string(message)); { then to send same to next prim
LINK_NUM = (LinkNum + 1);
return;
}
or something like that. Would help with script memory control as well.
_____________________
Jebus Linden for President! :p
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-31-2004 22:46
I've had a number of projects where i've needed to hardcode linknumbers (because the script is too **** slow otherwise) and changing link numbers would have saved my sanity. A while back i was making a graphing script. Where it would handle a number of equations & variables to then rez many prims at any location, with a given rotation. Anyway to save the effort of having every prim in the thing scripted i only had scripts in the text prims (because there is no llSetLinkTexture). The problem was i was constantly having to update the link numbers in the touch handler. All reasonable solutions just couldn't scale with the problem.

Consequently the project has been put on the back burner; because the interface was to slow and the equation parsing took to long.

I'll revisit the project when i have learned perl or python (the plan is to export the equations from SL via email, bulk parse them, and send back the results)
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
jester Knox
Sculpter of Water
Join date: 22 Apr 2004
Posts: 204
11-01-2004 06:56
this would make my life easier too, it would be great to have :-)
_____________________
people tell me my fountains are cool, come check them out at JesAma Fountains, Alviso (190,45) or if you arent in SL try Gigas (secondserver.net) or SLBoutique to shop for my products.
Cashmere Falcone
Prim Manipulator
Join date: 21 Apr 2004
Posts: 185
11-01-2004 12:31
From: jester Knox
this would make my life easier too, it would be great to have :-)

I am so ready for this, it's not funny. Just relinked a 39 prim object, so the prims with scripts in them will be #'s 1 thru 29 and then tediously drew a map of what prim has what #
_____________________
Jebus Linden for President! :p
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
11-01-2004 13:42
From: Strife Onizuka
This would make LINK_ALL_CHILDREN useful for messaging.


It already is.