On rez
Looking for the current API? Open the on_rez reference →
Event notes
start_param is always zero when an object is not rezzed by llRezObject or llRezAtRoot.
When an object is rezzed by llRezObject or llRezAtRoot, then start_param will be the value given as the last parameter of the rezzing command.
start_param is available at any subsequent time by calling llGetStartParameter (unless it has been overridden by llRemoteLoadScriptPin).
Wiki description
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.
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 and the order of the events is not guaranteed. See the examples in object_rez for how to reliably establish communications between objects when rezzing.
Examples
default
{
on_rez(integer start_param)
{
// Restarts the script every time the object is rezzed
llResetScript();
}
}Notes
state_entry & on_rez
on_rez & attach
on_rez & slow events
See also: functions
See also: events
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.