Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Respawning Temp-On-Rez

Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
11-06-2005 12:16
There's got to be a better, more elegant way to do this... I'm trying to make an object called "emitter" that will spawn a temp-on-rez object, and once that temp-on-rez object is cleaned up/ disappears, make it spawn another one in it's place.

Basically, I made our temp-on-rez object (named "Objection";) speak on channel -1999 every 3 seconds. And the emitter listens, and when it hasn't heard this in more than 3 seconds, assumes that the temp on rez object has vanished and creates another one. However, I want this to be as seamless as possible, having it do this every 3 seconds is a clunky way of doing it. I was thinking I could use a sensor, but wouldn't that be just as detrimental to have it scan for the object every 3 seconds?

The emitter script
CODE
integer statcount;

default
{
state_entry()
{
statcount = 0;
llListen(-1999,"","","IObject!");
llSetTimerEvent(3);
}

listen(integer chan, string name, key id, string mess)
{
statcount = 1;
}
timer()
{
if (statcount == 0)
{
llOwnerSay((string)statcount);
llRezObject("Objection",llGetPos()+<0,0,1>,ZERO_VECTOR,ZERO_ROTATION,999);
statcount = 1;
}
else
{
statcount = 0;
}

}
touch_start(integer nada)
{
llOwnerSay((string)statcount);
}
}


And the temp-on-rez object, called "Objection"

CODE
default
{
state_entry()
{
llSetTimerEvent(3);
}

timer()
{
llSay(-1999, "IObject!");
}
}
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-06-2005 15:34
If you want an object to be permanent, the best way to do it is by not using the TEMP_ON_REZ option. Cheating the system and creating a "permanent" TEMP_ON_REZ object--while easily doable--hurts the sim and your neighbors.

That said...if you're determined...just re-rez the object every 79 seconds on a timer.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
11-06-2005 16:27
From: Kenn Nilsson
If you want an object to be permanent, the best way to do it is by not using the TEMP_ON_REZ option. Cheating the system and creating a "permanent" TEMP_ON_REZ object--while easily doable--hurts the sim and your neighbors.

That said...if you're determined...just re-rez the object every 79 seconds on a timer.


Thank you Kenn. The only issue I have with a 79 second timer is that rezzing 2 overlapping objects causes a lot of texture tearing. You're right, I'm probably better off just not using temp on rez...
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
11-06-2005 17:00
From: Logan Bauer
Thank you Kenn. The only issue I have with a 79 second timer is that rezzing 2 overlapping objects causes a lot of texture tearing. You're right, I'm probably better off just not using temp on rez...


Include a script in the temp-on-rez object to die after 79 seconds.

The timing won't necessarily be *exact*, but should be close, no?
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?”
Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
11-06-2005 17:12
From: Aliasi Stonebender
Include a script in the temp-on-rez object to die after 79 seconds.

The timing won't necessarily be *exact*, but should be close, no?


Hmm! No, that might be close enough to do it nicely, TY! :)
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
11-09-2005 09:23
If you're going to do this, *please* make the rezzing prim clickable to turn it off when you're not there. It's one thing to enjoy running scripts when you're using them, but it's another to simply forget that it's not a permanent object and leave it re-rezzing all the time.

That having been said, I've done this on occasion with high-prim horses from McLean, and 79 sec timer worked well.