Rez and Derez   
Gotcha on_rez When an object is rezzed from inventory, the script does not restart.   It resumes the state that was operating when the object was saved.  Thus the function on_rez does not apply here when the object is rezzed from inventory.

 

Basic rezzer.  (In the parent object.)  Causes an object in the contents of the parent object to be rezzed on touch to the parent object, with a lifetime of 30 seconds.  
default {  

touch_start(integer total_number)
{llRezObject("Rezdie", llGetPos() +<0.,0.,1.>, ZERO_VECTOR, ZERO_ROTATION, 30); }
 

On touch, creates object Rezdie one meter above the parent object.  Lifetime of 30 Sec.
} Close default

 

Die after Rez.  (In the child object.)  Causes child object to derez after a specified interval  
default {  
on_rez(integer Lifetime)
{ llSetTimerEvent(Lifetime); }

timer()
{ llDie(); }
Event: when the object is rezzed by another object (does not apply to rez from inventory).

The parameter Lifetime is provided by the creating function in the parent object.

} Close default
The Thinkerer 05/09/2008
Copyright (c) D. F. Dansereau & S. H. Evans

Site Map

Where start?

LODScr
Famous fables