Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRezAtRoot returns...?

gene Poole
"Foolish humans!"
Join date: 16 Jun 2004
Posts: 324
01-17-2005 11:23
I use:

CODE
llRezAtRoot("something", llGetPos(), ZERO_VECTOR, ZERO_ROTATION, 0);
llCreateLink(some_key, TRUE);

to create an inv-contained object at the center of the scripted object, and then I want to link that new object to the one that rezzed it. Only one problem: I don't have 'some_key'... I can't find documentation that lists if llRezAtRoot returns a value (and what type).

Wiki has no details yet. I'll be happy to add if I figure this out.

Also, how does llCreateLink affect ordering? (does the newly-linked object became the "last", etc)

Any ideas?
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
01-17-2005 11:41
Try the event "object_rez".
_____________________
</sarcasm>
gene Poole
"Foolish humans!"
Join date: 16 Jun 2004
Posts: 324
01-17-2005 11:46
That looks promising. Thanks!
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
01-17-2005 14:56
gene,

Regarding the ordering for llCreatelink(ed) items as is on the Wiki under llCreateLink

llCreateLink(key target, integer parent)

If parent == TRUE, the object calling this function will be the parent prim of the new link set.

so the second parameter determines if the object containing the script will become the parent or not when linking.
gene Poole
"Foolish humans!"
Join date: 16 Jun 2004
Posts: 324
01-18-2005 23:47
Okay, I've updated the Wiki a bit to add some details. Newly linked objects become the first child of a parent if the parent argument is TRUE and they'll have a link number of 2 (since the parent will be 1).

Corrections welcomed (but it seems to work in my script, at least). :)
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
01-19-2005 00:01
From: someone
Attempts to link the object containing the script and target (requires that permission PERMISSION_CHANGE_LINKS be set). If parent == TRUE, the object calling this function will be the parent prim of the new link set, and this prim will become that parent's first child (inserted before any children the parent might have already had).
When the target has been linked, it will receive a link_message.
gene by the above comment about the target receiving a link message, do you mean the object can now recieve link_messages or that it recieves a specific link message because of the linking that has just occured? The latter seems strange behaviour, but that's the way i read it..
gene Poole
"Foolish humans!"
Join date: 16 Jun 2004
Posts: 324
01-19-2005 22:59
Gah! Thank you, Rysidian, for pointing that out. I botched my description, and I've corrected it now:
From: someone
Once the target has been linked, it will receive a changed event (it will then also be able to receive link_message events).


Let me know if there are any further problems, and a salute to you for catching the bungle. :)
Tcoz Bach
Tyrell Victim
Join date: 10 Dec 2002
Posts: 973
01-20-2005 09:40
Don't forget to try mousing over the function in the script editor. I tend to find that information is more accurate than the documentation (a la llAttachToAvatar).
_____________________
** ...you want to do WHAT with that cube? **