Difference between revisions of "Object rez"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 4: Line 4:
|constants
|constants
|spec
|spec
|caveats=*The event is triggered in all implementing scripts within a prim. It is not restricted to the script that called [[llRezObject]] or [[llRezAtRoot]] but it is restricted to the child prim of the object where the call was made.
|caveats=*The event is triggered in all implementing scripts within a prim. It is not restricted to the script that called [[llRezObject]] or [[llRezAtRoot]] but it is restricted to the child prim of the object where the call was made.  For example, if the call to [[llRezObject]] was made from a script in a child prim, ''all'' other scripts in that prim will have their object_rez events triggered if implemented. Other scripts in other prims of the object however, will not observe the object_rez event.
|examples=
|examples=
<lsl>
<lsl>

Revision as of 07:03, 6 February 2009

Description

Event: object_rez( key id ){ ; }

Triggered when the object rezzes an object.

• key id UUID of object rezzed.

Caveats

  • The event is triggered in all implementing scripts within a prim. It is not restricted to the script that called llRezObject or llRezAtRoot but it is restricted to the child prim of the object where the call was made. For example, if the call to llRezObject was made from a script in a child prim, all other scripts in that prim will have their object_rez events triggered if implemented. Other scripts in other prims of the object however, will not observe the object_rez event.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> //gives inventory to object when it rezzes. string inventory; string object;

default {

   touch_start(integer count)
   {
       object=llGetInventoryName(INVENTORY_OBJECT,0);  //get name of the 1st object in inventory
       llRezObject(object, llGetPos() + <0.0, 0.0, 0.5>, ZERO_VECTOR, ZERO_ROTATION, 0);  //rez the 1st object
   }
   object_rez(key id)
   {
       inventory=llGetInventoryName(INVENTORY_OBJECT,1);  //get name of the 2nd object in inventory
       llGiveInventory(id,inventory);  //give 2nd object to 1st object when rezzed
   }

} </lsl>

See Also

Events

•  on_rez Triggered when the object the script is in is rezzed

Functions

•  llRezObject Used to rez an object at the center of mass
•  llRezAtRoot Used to rez an object at the root

Deep Notes

Issues

All Issues

~ Search JIRA for related Issues
   object_rez() erroneously triggers on full parcel
   Possible Mono bug with object_rez

Signature

event void object_rez( key id );