Difference between revisions of "LlRezObject"

From Second Life Wiki
Jump to navigation Jump to search
(make caveat about pos even more explicit)
Line 13: Line 13:
|spec
|spec
|caveats=
|caveats=
*Silently fails to rez '''inventory''' if '''pos''' is more than 10 meters away.
*Silently fails to rez '''inventory''' if '''pos''' is more than 10 meters away.  So if your script is mysteriously failing to rez things, make sure you haven't (say) written "<0,0,1>" for the '''pos''' parameter rather than (say) "llGetPos() + <0,0,1>".
|constants
|constants
|examples=
|examples=

Revision as of 12:08, 1 November 2007

Summary

Function: llRezObject( string inventory, vector pos, vector vel, rotation rot, integer param );

Instantiate inventory object at pos with velocity vel and rotation rot with start parameter param

• string inventory an object in the inventory of the prim this script is in
• vector pos position (in region coordinates)
• vector vel velocity
• rotation rot rotation
• integer param on_rez event parameter and value returned by llGetStartParameter in the rezzed object.

Causes a hard delay based on the mass of the object rezzed. The root of inventory is not at pos but the center of inventory is.
To have the root prim at pos use llRezAtRoot instead.

Caveats

  • This function causes the script to sleep for 0.1 seconds.
  • If inventory is missing from the prim's inventory or it is not an object then an error is shouted on DEBUG_CHANNEL.
  • Silently fails to rez inventory if pos is more than 10 meters away. So if your script is mysteriously failing to rez things, make sure you haven't (say) written "<0,0,1>" for the pos parameter rather than (say) "llGetPos() + <0,0,1>".
All Issues ~ Search JIRA for related Bugs

Examples

default {
     touch_start(integer param) {
           llRezObject("Object", llGetPos() + <0.0,0.0,1.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);
     }
}

See Also

Events

•  object_rez triggered when this object rezzes an object from inventory

Functions

•  llRezAtRoot Rezzes the object at the requested position
•  llGetStartParameter
•  llGodLikeRezObject

Deep Notes

Search JIRA for related Issues

Signature

function void llRezObject( string inventory, vector pos, vector vel, rotation rot, integer param );