Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can objects auto delete at property border or altitude?

Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
04-28-2009 04:30
While messing around with scripting physical objects I either keep having them fall through the floor and tumble out into the sea where they are returned eventually or they fly straight up never to be seen again. Is there a function(?) I can set so they'll either auto-return or auto-delete when they leave my property or fly too high?
_____________________
I've trademarked the apostrophe. You're in trouble but you are not.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-28-2009 04:45
CODE

default{
state_entry(){
//-- this is actually preset for objects rezzed by script
llSetStatus( STATUS_DIE_AT_EDGE, TRUE );

//-- change to the below line to return offworld objects
//-- this is not preset for objects rezzed by scripts, but will override it
// llSetStatus( STATUS_RETURN_AT_EDGE, TRUE );
}

changed( integer vBitChanges ){
if (CHANGED_REGION & vBitChanges){
llDie();

//-- there is no function for returning out of region objects
//-- but you can set STATUS_SANDBOX to prevent it from
//-- going more than 10m from the origin region which will
//-- also remove physical if it goes more than 10m or tries
//-- to go to another region after.
}
}


for property detection, you'll need to check llOverMyLand in some sort of loop or timer.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Rime Wirsing
Color me gone
Join date: 31 Dec 2008
Posts: 345
04-28-2009 05:22
Google this
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
04-28-2009 06:17
From: Rime Wirsing
There must be (I'll go look after) a system wide listener right? How about listening on a channel for an owner sent 'abort' command to tell the object to self destruct?
Rime
There is a region wide: llRegionSay( integer channel, string s );
Outside the region llEmail will work (if the objects key is not changed)
_____________________
From Studio Dora
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
04-28-2009 07:31
STATUS_SANDBOX is a nifty little feature, unbeknownst to most people.

from The wiki:
From: someone
This status flag keeps the object from getting away. It causes the object to be unable to leave the sim or move more than 10 meters from the location where the flag was set.

If the object tries to leave the sim or move more than 10 meters it ceases to be physical and throws a "Hit Sandbox Limit" error.

_____________________

Geometric Library, for all your 3D maths needs.
https://wiki.secondlife.com/wiki/Geometric

Creator of the Vertical Life Client
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-28-2009 13:12
From: Nexii Malthus
STATUS_SANDBOX is a nifty little feature, unbeknownst to most people.

yes but the 10m limit (mentioned above) can be a bit severe.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
04-28-2009 15:13
I do a lot of work with replicators. It's easy to lose control of them. I have a prim named "Shepard". If they go more than 30 meters from Shepard they invoke the llDie() function. Shepard also acts as a button that invokes llRegionSay(). A listen in my replicators raises llDie() upon hearing the die command from the Shepard.
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.
Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
04-28-2009 17:43
Oo! Thanks, everyone. I've now got some things I can use. I tend to learn the llWhatevers as needed. I tried reading through them on the Wiki, but after a while it felt like looking at a Welsh road map.

I appreciate your help!

PS: If a blocky orange butterfly lands on your head you can send me the doctor's bill. :D

(I'm an alpha flicker butterfly guy now!)
_____________________
I've trademarked the apostrophe. You're in trouble but you are not.