Don't click here unless you want to be banned.

LSL Wiki : llRezObject

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
llRezObject(string inventory, vector pos, vector vel, rotation rot, integer param)

Creates ("rezzes") object's inventory object centered at position pos (in region coordinates) with velocity vel and rotation rot. The param value will be available to a script within the newly created object in the on_rez event or through the llGetStartParameter function. The vel parameter is ignored if the rezzed object is non-physical.


If inventory is not contained within the object, the script will say "Couldn't find object foo" where foo is the value passed to inventory.

If inventory exists, but is not an object, the client will see an error dialog in the lower-right of the screen saying "Unable to create requested object. Object is missing from database."

Performance Advisory
Always use temp-on-rez when rezzing a large number of "disposable" objects such as bullets or other projectiles. Doing this allows them to automatically be cleaned up, should they break or encounter no-script land. This is both good scripting practice, as well as good for your sim and neighbours. It also keeps you and your customers happy by not getting complaints sent after them.

llRezObject triggers the object_rez event, passing the new object's key to any script in the rezzing object. The newly rezzed object will receive a on_rez event. This is useful for replicating objects.

Use llGetPos() + offset to specify a position relative to where the scripted object is.

When rezzing an object that is a linked set, pos specifies the geometric center, which can be determined with llGetGeometricCenter (when called from the object that is to be rezzed, so store this information somewhere if it's needed). For some scripts llRezAtRoot may be desired since it rezzes the object's root prim at location pos.

Rezzing an unlinked set (multiple objects/prims that were taken as one inventory item, but aren't linked together) is possible, but a rot other than ZERO_ROTATION will give unexpected results (the individual objects will be rotated but their positions won't match the rotation).

// rez something 2m above us
llRezObject("something", llGetPos() + <0, 0, 2>, ZERO_VECTOR, ZERO_ROTATION, 42);

If you attempt to rez a large number of objects within a short period of time (such as using multiple scripts to circumvent the 0.2 second delay) or you rez a self-replicating object, you may run into the Grey Goo Fence, which attempts to slow grid attacks.


Recoil is applied to the rezzing object/avatar when it rezzes a physical object with a velocity. Large objects rezzed with a large amount of velocity will push with a large amount of force onto the rezzer, while a small object with small velocity will give negligable force (for every action there is an equal but opposite reaction). The formula for finding the force is:

-(velocity of rezzed object * mass of rezzed object)

Use this in a llApplyImpulse statement to counteract the recoil.


If the inventory object that is to be rezzed has copy permission, a copy of the object will be rezzed. However, if it doesn't have copy permission, the original will be rezzed and removed from the object inventory. Any subsequent calls to this function with the same inventory will then fail because the inventory object is gone. It's important to set copy permissions for the next owner if an object is to be sold (or given away) and is rezzed by llRezObject (unless only a single copy is rezzed).

If the inventory object that is to be rezzed does not have copy permission, and the object containing it is attached, the object will not rez, and result in the following error / warning : "Can't rez no copy objects from an attached object."

Note: the changed() event will not be triggered when a no-copy object is rezzed from inventory.


Q: llRezObject doesn't rez the object or return an error. What's going on?
A: You may have specified a pos that's outside the 10m range. This is the only situation where llRezObject will silently fail.

Q: Really? That's stupid. How do I figure out if my pos is within the 10m range then?
A: Use llVecDist beforehand.

Q: I give up, why "llRezObject"? Why not "llCreateObject" or "llSpawnObject"?
A: "Rez" comes from the 1980s movie Tron. Hey, nobody ever claimed the Lindens weren't geeks.

Q: It's not working. It says my object can't be found.
A: You have to make sure the object you're trying to rez is actually in your object's inventory and named the same both in the inventory and the script.

See also: llRezAtRoot and ExperimentllRezObject

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Inventory | object_rez
continue reading
online casino
click this link
read more
There are 17 comments on this page. [Display comments/form]