Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

on_derez()

Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
01-02-2006 05:45
This is a function that I find quite annoying to be without for some applications.

This is simple, when an object is derezed, it calls this event. There is one main exception to this; the on_derez() event is not called if the object is returned, either manually from a parcel, or automatically by the auto-return feature. This is to avoid griefers having self-replicating boxes that call nearby boxes if they are removed by the parcel owner they are griefing.

Applications for this:
- Perform some task pertinent to being de-rezzed, e.g telling a controller object in a game "uh oh, someone's manually removed me!".
- temp_on_rez - being able to respawn objects without there being a delay between respawns whenever the temp_on_rez time falls extremely low. This means that users don't need to set really low respawn times that only increase lag (ie respawning every ten seconds instead of every 25 to 45).

A further restriction to this would be in terms of processing. An on_derez() event will only be given enough time to run a few lines of script, enough to send a chat command like llSay(channel, "DEAD!";); or whatever. However functions like llRezObject() and llSensor() will simply be ignored, anything with a long-ish delay or which calls a subsequent event as these will not have time to run.
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
01-02-2006 07:15
While i agree with your other points, using it on a Temp-On-Rez prim is only usefull to get around a prim limit, wich should be discouraged, prim limits are there for a reason, and that is client performance.
_____________________
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
01-02-2006 07:46
While I understand that, denying this feature is actually worse overall I think, as scripters will just use temp_on_rez anyway with low respawn times to avoid the gaps caused by early removal. I think temp_on_rez objects have enough disadvantages that using them can be bad anyway for most things, although I'll grant that they're good for some parts of building, they can be abused as it is, but with far more rez requests than if an on_derez() were available.

I'm thinking for things like being able to rez a temporary demo of a high-prim item so someone can see it before they buy it.

IMO temp_on_rez should be limited in other ways, for example limiting what scripts in a temp object can do or such.