Difference between revisions of "LlRezAtRoot"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 18: Line 18:
|spec
|spec
|caveats
|caveats
|examples
|examples=<pre>
// lets admit there is a prim inside the root prim and its called ONIZUKA_PRIM
vector onizuka_vec = llGetPos() + < 0.4, -2.2, 0.0>;
rotation onizuka_rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD);
vector onizuka_speed = llGetVel();
integer onizuka_start_param = 10
llRezAtRoot("ONIZUKA_PRIM", onizuka_vec, onizuka_speed, onizuka_rot ,onizuka_start_param);
</pre>
|helpers
|helpers
|also_header
|also_header

Revision as of 04:20, 20 July 2007

Summary

Function: llRezAtRoot( string inventory, vector pos, vector vel, rotation rot, integer param );
0.1 Forced Delay
200.0 Energy

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
• vector vel velocity
• rotation rot rotation
• integer param on_rez event parameter and value returned by llGetStartParameter.

Causes a hard delay based on the mass of the object rezzed.
The function-name is a bit unhappy choosen, because one could understand that the rezing will happen on the root prim. In fact the rezing happens at the link center.
If you want to rez on the root prim use llRezObject().
This function should be used with llGetRootPos() and not with llGetPos(), last one should be used with llRezObject().

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.

Examples

// lets admit there is a prim inside the root prim and its called ONIZUKA_PRIM
vector onizuka_vec = llGetPos() + < 0.4, -2.2, 0.0>;
rotation onizuka_rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD);
vector onizuka_speed = llGetVel();
integer onizuka_start_param = 10
llRezAtRoot("ONIZUKA_PRIM", onizuka_vec, onizuka_speed, onizuka_rot ,onizuka_start_param);

See Also

Events

•  object_rez triggered when this object rezzes an object from inventory

Functions

•  llRezObject
•  llGetStartParameter
•  llGodLikeRezObject

Deep Notes

Signature

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