Object rez

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

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.

Examples

 
//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
    }
}
 

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

Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    object_rez() erroneously triggers on full parcel
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    Possible Mono bug with object_rez
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages