Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detecting the rezzing parent in the rezzed Object?

Elkestra Twilight
Registered User
Join date: 13 Feb 2004
Posts: 8
05-09-2009 07:53
I've been through these hoops, many a time. You have to either set up open listeners (based on fixed channel, or the start_param) to tell the newly rezzed object the key of it's 'parent'. [Edit: Yes, there are a few other ways, including sensors and name changes, and other convoluted methods. None of them could be considered 'good' though.]

The parent of course knows its child key via object_rez.

After some thought, I think I've found a way to add this functionality without breaking any older scripts (the ideal would be an 'on_rez(integer param, key parent)', but that would break things).

http://jira.secondlife.com/browse/SVC-4230

Quoted from the JIRA entry:-


From: someone
Definitions:-

Parent: The object that is rezzing an item from its inventory
Child: The object that is being newly rezzed from the parent's inventory

Currently, when a script rezzes llRezObject/llRezAtRoot's an item from inventory, the parent knows the key of the child, but the child has to jump through hoops, usually involving open listeners, to get any knowledge of its parent.

The ideal way to gain this would be to have an 'on_rez(integer start_param, key parent)', but this isn't feasible since it would break all previous scripts.

My solution is:-

Allow us to call llDetectedKey(0) in on_rez, and have it return the parent's key. This would not break any scripts, since llDetectedKey(0) is undefined in on_rez anyway, so no-one should be using it there.

With scripting changes on the horizon to refine script-usage, this seemingly simple change would allow the child object to immediately use a precisely defined listen for just its parent.


I'd appreciate any comments, and of course Votes. :D


Ps. Doh! and I've just realised I've posted this with my alt.... figures :D
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
05-09-2009 10:04
it's a good idea, and I don't see that it would harm anything existing. So I'm all for throwing it on the pile of other great ideas that haven't been implemented for years. :)

Voted
_____________________