|
StarDrifter Dagger
Registered User
Join date: 14 Jul 2007
Posts: 3
|
07-16-2007 03:05
I'm trying to create an object and have it link to the object that created it, but I can't find a way to transfer the key either way, and haven't found a function that will return the key of the object that created the second object. Also, is there any way to use local coordinates when rezzing an object?
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
07-16-2007 05:28
The rezzing object gets an object_rez() event that passes the key of the rezzed object. In the other direction, the last parameter to llRezAtRoot() can be used to pass a channel to the rezzed object (available in the on_rez handler, or with llGetStartParameter), so the rezzing object can say its key on that channel, for example, if the rezzed object listens.
Not entirely sure what's desired for "local coordinates"... the functions use global coordinates, but one can always just compute global coordinates from the position and rotation of the rezzing object, and the desired offset and relative rotation. So, probably not understanding that side of the question.
|
|
StarDrifter Dagger
Registered User
Join date: 14 Jul 2007
Posts: 3
|
07-16-2007 13:48
From: Qie Niangao The rezzing object gets an object_rez() event that passes the key of the rezzed object. In the other direction, the last parameter to llRezAtRoot() can be used to pass a channel to the rezzed object (available in the on_rez handler, or with llGetStartParameter), so the rezzing object can say its key on that channel, for example, if the rezzed object listens. Thanks. That'll work. From: someone Not entirely sure what's desired for "local coordinates"... the functions use global coordinates, but one can always just compute global coordinates from the position and rotation of the rezzing object, and the desired offset and relative rotation. So, probably not understanding that side of the question. Just being lazy. Thanks again.
|