Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Getting pos of child object from another.

RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
09-11-2007 08:57
I've got a door frame that controls two segments so that door slides in and out. I've made this door cope with it being the root or a child so it does not screw with the building its attached to.

But this leaves me with one problem, when the door frame script starts up it searches all children for two objects with 'special' names and this will cause problems if I have two doors attached to one building. To resolve this I wanted the door script to only choose the two door segments that are the closest to it but I can't get the pos of other children from another. :(
llGetObjectDetails don't work for me, it simply don't compile.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-11-2007 10:55
That was added in the release candidate viewer. Are you running that version of the viewer?
Jotheph Nemeth
Registered User
Join date: 9 Aug 2007
Posts: 142
09-11-2007 13:17
From: RichardEric Collins
I've got a door frame that controls two segments so that door slides in and out. I've made this door cope with it being the root or a child so it does not screw with the building its attached to.

But this leaves me with one problem, when the door frame script starts up it searches all children for two objects with 'special' names and this will cause problems if I have two doors attached to one building. To resolve this I wanted the door script to only choose the two door segments that are the closest to it but I can't get the pos of other children from another. :(
llGetObjectDetails don't work for me, it simply don't compile.



Like I've said before, SLS needs a major overhaul.

The only way I know to do what you need is to put a script in each of the doors that returns llGetLocalPos() if it gets a request via linked message.

As far as I've been able to determine, there is no way at all to find the position of a child prim except from a script in that child prim.

If I'm wrong and there IS a way to find a child prim's location, I'd love to know.

Gods. If city planners laid out streets as badly as the dev that wrote sls, people would only be able to get to half the city. The rest of the places would only have one way streets leading away, or be entirely surrounded by walls.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-11-2007 13:58
The latest release adds llGetObjectDetails, which will take an object key, and you can use llGetLinkKey to find the UUID of a child prim. The Wiki says llGetObjectDetails returns position information in region coordinates, so some math may be required to convert to object-local coordinates.

But before this release, I agree, I don't know of any other way to do this.
RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
09-12-2007 01:11
Thanks guys, I've got the release candidate, but now the linking seems all screwed. It says parts that are next to each other are too far apart to link together! And this seems to be also happening for the previous release too! Its driving me mad.