Table of Contents

Start Functions Events Constants Types Language Articles

Function: llRezObject

llRezObject(string name, vector pos, vector vel, rotation rot, integer param)

Rez an object considering the centre of its bounding box as reference.

WARNING

This function has a bug that affects the position of the rezzed object when the rotation of the rezzed object changes, and its use is discouraged. Use llRezAtRoot instead.

Parameters

name

The name of the object to rez, as a string (must be in the prim's inventory).

pos

Position (as a vector in region coordinates) where to place the centre of the bounding box of the rezzed object, in metres.

vel

If the object to rez is physical, this vector indicates the initial velocity it should have, in metres per second. If it's not physical, this parameter is ignored.

rot

The rotation that the object will have when rezzed.

param

Parameter (an integer) to pass to the child. The child can read this parameter using llGetStartParameter() or the param of the on_rez event.

Notes

Short examples

// Rez an object called Bullet 1m away from the current position in the X direction,
// with velocity of 20 m/s in the X direction and no rotation, and with a parameter of 1
llRezObject("Bullet", llGetPos() + <1,0,0>, <20, 0, 0>, ZERO_ROTATION, 1);

Complete examples

llRezObject-example.lsl
default
{
    state_entry()
    {
        llRezObject(TODO);
    }
}

See also