Difference between revisions of "Object rez"

From Second Life Wiki
Jump to: navigation, search
(No present issues with function at this time.)
Line 1: Line 1:
 +
{{LSL_Event|event_id=28|event_delay|event=object_rez
 +
|p1_type=key|p1_name=id|p1_desc=[[UUID]] of object rezzed.
 +
|event_desc=Triggered when the object rezzes an object.
 +
|constants
 +
|spec
 +
|examples=
 
<lsl>
 
<lsl>
 
//gives inventory to object when it rezzes.
 
//gives inventory to object when it rezzes.

Revision as of 18:06, 16 October 2012

Description

Event: object_rez( key id ){ ; }

Triggered when the object rezzes an object.

• key id UUID of object rezzed.

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

Signature

event void object_rez( key id );