object_rez(key id)
Triggered when a
prim rezzes another
object from its
inventory via
llRezObject. The
id is the
globally unique
key for the object it just rezzed.
This
event is raised for all
scripts inside the prim that
called llRezObject. This allows for having one script do the actual rezzing while another script receives the
object_rez events and handles them (for example using
llCreateLink to
link a newly created prim to the original,
root, prim).
Note:
object_rez will be triggered only for scripts within the same prim as the script that rezzed the new object.
object_rez will
not be triggered in scripts contained within other prims of a
linked object. It doesn't matter if the rezzer script is contained within the
parent or
child prims--either will work;
object_rez triggers will just be limited to that prim.
This no longer appears to be the case from SL 1.18.3.2-RC and up. If there is no event handler in the child prim, the event will always be passed to the root prim. If there is an event handler in the child prim, however, the event isn't passed to the root prim. - Acru Joliat
object_rez is not to be confused with
on_rez which is raised in the newly rezzed object, not the prim that rezzed it.
Example:
To keep an object's inventory in rezzed objects (from
the forums):
Events |
Inventory |
Object |
Rez