Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Controlled rez and delete.

Sham Omlet
Registered User
Join date: 26 Mar 2006
Posts: 9
08-10-2006 19:56
Hi, I want to rez an object from within another object for a very brief period of time. I thought about using llRezObject() to rez an object that is marked temporary on rez. However, this is not really an effective solution, as the time that the rez'd object exists in the sim seems almost arbitrary in a range up to 60 seconds. I need something that is more controlled, appearing for a second or less and then disappearing.

Is there a function to delete a rez'd object? Do any of you have any suggestions on an effective solution?
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
08-10-2006 19:58
llDie()
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
08-10-2006 20:14
To clarify, llDie() goes into the object you want deleted, how you trigger that call is up to you, if via a llSay/Whisper/Shout or a timer in the object.
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
08-10-2006 20:21
Two methods to do this:


1.) Use llRezObject on an object containing this script:
CODE

integer seconds = 5;

default
{
on_rez()
{
llSetTimerEvent(seconds);
}

timer()
{
llDie();
}
}



or 2.) Use llRezObject on an object containing this script:
CODE

integer channel = 321;
string command = "die";

default
{
state_entry()
{
llListen(channel, "", "", command);
}

listen(integer channel, string name, key id, string msg)
{
llDie();
}
}


...and in the object doing the rezzing:
CODE

llSay(321, "die");
Sham Omlet
Registered User
Join date: 26 Mar 2006
Posts: 9
08-10-2006 22:13
This is great thank you all for your help, I will post and let you all know if it works for me.