Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Getting position of a linked(child) prim

Tek Harbinger
SS Maggot Elite
Join date: 19 Oct 2005
Posts: 49
08-21-2006 14:46
How do I get the coordinates of any of the child prims in a linkset? There seem to be only functions to get the coords of the root or of the whole object. Do I have to have the child tell the parent its coordinates? Am I missing something?

I want to have the script rez an object over just one piece of the linkset.

Thanks in advance.
Azurei Ash
The Sticky!
Join date: 12 Jan 2006
Posts: 38
08-21-2006 15:06
I think you'll just have to have the child prim tell the parent its location.

You could also use llGetLocalPos from the child to get the offset from the parent, then delete the script you used to get that from the child and just take the offset and use it in the parent's script to rez in relation to the child... that is, if the child isn't going to be moving around in relation to the parent, anyway.

~Az
Tek Harbinger
SS Maggot Elite
Join date: 19 Oct 2005
Posts: 49
08-22-2006 15:33
Hmmm ok, seems like there should be a function to get the position of linked object. I'll work on it having the child prim tell the parent it's coordinates.

Thanks!
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
08-23-2006 05:06
You'd probably have to just use llGetLocalPos(); in the child prim and have it send it in a link message to the parent.

Or, actually this location, since it's the LocalPos won't change, so you could just put a script that just looks like this

CODE

default
{
state_entry()
{
llSay(0,(string)llGetLocalPos());
}
}


..once you copy the #'s you should be able to delete this script and just use the # it gave you as a standard. I use this for the hatches on my ships all the time.