Difference between revisions of "LlRezAtRoot"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
{{LSL_Function/inventory|inventory|uuid=false|type=object}}
{{Issues/SVC-3145}}{{LSL_Function/inventory|inventory|uuid=false|type=object}}
{{LSL_Function
{{LSL_Function
|func=llRezAtRoot|func_id=286|func_sleep=0.1|func_energy=200.0
|func=llRezAtRoot|func_id=286|func_sleep=0.1|func_energy=200.0
Line 14: Line 14:
|caveats=
|caveats=
*Silently fails to rez '''inventory''' if '''pos''' is more than 10 meters away from the prim trying to rez '''inventory'''.
*Silently fails to rez '''inventory''' if '''pos''' is more than 10 meters away from the prim trying to rez '''inventory'''.
*Silently fails if you don't have offline building rights on the land. Which means that you need to either: Own the land yourself. Be in the group that owns it, and the allow group to build parcel flag has to be enabled. Or everyone should be allowed to build. You can also deed the object to the group that owns the land, this will always work.
*Silently fails if you don't have offline building rights on the land. Which means that you need to either: Own the land yourself. Be in the group that owns it, the allow group to build parcel flag has to be enabled and the object has to be set to group. Or everyone should be allowed to build. You can also deed the object to the group that owns the land, this will always work. See the issues under Deep Notes for more information.
|examples=
|examples=
<lsl>
<lsl>

Revision as of 14:18, 15 February 2009

Summary

Function: llRezAtRoot( string inventory, vector position, vector velocity, rotation rot, integer param );

Instantiate inventory object rotated to rot with its root at position, moving at velocity, using param as the start parameter

• string inventory an object in the inventory of the prim this script is in
• vector position initial position (in region coordinates)
• vector velocity initial velocity
• rotation rot initial 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.
To rez an object so its center is at pos (instead of the root) use llRezObject 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 from the prim trying to rez inventory.
  • Silently fails if you don't have offline building rights on the land. Which means that you need to either: Own the land yourself. Be in the group that owns it, the allow group to build parcel flag has to be enabled and the object has to be set to group. Or everyone should be allowed to build. You can also deed the object to the group that owns the land, this will always work. See the issues under Deep Notes for more information.

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   group ROLE permissions only work for scripted rez when owner is online

Examples

<lsl> //Rez an object on touch string object = "Object";//Object in inventory integer start_param = 10; rotation rot;

default {

   state_entry()
   {
       rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD);
   }
   touch_start(integer a)
   {
       vector vec = llGetPos() + < 0.0, 0.0, 5.0>; // 5 meter above this
       vector speed = llGetVel();
       llRezAtRoot(object, vec, speed, rot, start_param);
   }

}

</lsl>

See Also

Events

•  object_rez triggered when this object rezzes an object from inventory

Functions

•  llRezObject
•  llGetStartParameter
•  llGodLikeRezObject

Deep Notes

All Issues

~ Search JIRA for related Issues
   group ROLE permissions only work for scripted rez when owner is online

Signature

function void llRezAtRoot( string inventory, vector position, vector velocity, rotation rot, integer param );