Difference between revisions of "On rez"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 7: Line 7:
|spec
|spec
|caveats=*If an object is rezzed by another object then the [[object_rez]] event in the parent object does not trigger at the same time as the on_rez event in the child object.
|caveats=*If an object is rezzed by another object then the [[object_rez]] event in the parent object does not trigger at the same time as the on_rez event in the child object.
|examples
|examples=<pre>default
{
    on_rez(integer start_param)
    {
        // Restarts the script every time the object is rezzed
        llResetScript();
    }
}
</pre>
|helpers
|helpers
|also_header
|also_header

Revision as of 11:53, 24 March 2007

Description

Event: on_rez( integer start_param ){ ; }

Triggered when an object is rezzed (by script or by user). Also triggered in attachments when a user logs in, or when the object is attached from inventory.

• integer start_param parameter supplied to llRezObject or llRezAtRoot

start_param is always zero when an object is not rezzed by llRezObject or llRezAtRoot.
start_param is available at any subsequent time by calling llGetStartParameter (unless it has been overridden by llRemoteLoadScriptPin).

Caveats

  • If an object is rezzed by another object then the object_rez event in the parent object does not trigger at the same time as the on_rez event in the child object.


Examples

default
{
    on_rez(integer start_param)
    {
        // Restarts the script every time the object is rezzed
        llResetScript(); 
    }
}

See Also

Events

•  object_rez triggered when this object rezzes an object from inventory

Functions

•  llGetStartParameter
•  llRezObject
•  llRezAtRoot

Deep Notes

Signature

event void on_rez( integer start_param );