Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script that will cause object to auto delete

Claudia Sondergaard
Registered User
Join date: 31 May 2005
Posts: 2
07-14-2006 05:55
I'm looking for a script that will cause an object to automatically delete after it has been rezzed. I sell houses and i want to make demos that people can rez and then they will delete after a certain period of time. If anyone has one, please let me know, thanks.
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
07-14-2006 05:57
From: Claudia Sondergaard
I'm looking for a script that will cause an object to automatically delete after it has been rezzed. I sell houses and i want to make demos that people can rez and then they will delete after a certain period of time. If anyone has one, please let me know, thanks.
You can just make the demo item temp-on-rez... or alternatively, use llDie() to delete it
_____________________
http://siobhantaylor.wordpress.com/
Ohforf Uram
n00b
Join date: 27 Jun 2006
Posts: 82
07-14-2006 06:05
Here is one (be very careful with it) :


CODE

Init()
{
llSetTimerEvent(20.0);
}

SelfDestructNow()
{
llDie();
}

default
{
state_entry()
{
Init();
}
on_rez(integer start_param)
{
Init();
}
timer()
{
SelfDestructNow();
}
}



Note :
the llSetTimerEvent(20.0); sets the lifespan of the object to 20 seconds, change that
its one of my first scripts, so its not perfect i guess
good luck !
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
07-14-2006 06:53
You'll need to be more than careful with it - if you give something containing that script to some other user, they will have 20 seconds to access the Tools menu and set scripts in object to not running. They can then delete the script at their leisure (even if the item is no mod).


It may be OK for casual users, but you will find some people abuse it.
Ohforf Uram
n00b
Join date: 27 Jun 2006
Posts: 82
07-14-2006 07:10
From: Bitzer Balderdash
You'll need to be more than careful with it - if you give something containing that script to some other user, they will have 20 seconds to access the Tools menu and set scripts in object to not running. They can then delete the script at their leisure (even if the item is no mod).


It may be OK for casual users, but you will find some people abuse it.


Thank you for pointing that out.
I can't verify that, because i cant set the 'no modify' flag
to prevent myself from modifying - or can i ?

so... the 'temporary' flag is better - making the object only live 1 minute ?
a bit short, but if its safe...
Thili Playfair
Registered User
Join date: 18 Aug 2004
Posts: 2,417
07-14-2006 07:32
Wouldnt trust temp on rez either, broken it quite a few times myself, thought about this idea myself, only thing i could come up with was to make entire thing see through half alpha'd without any textures no mod, no copy, pretty much make it useless :p.
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
07-14-2006 07:36
The long and short of it, is that if you give them a usable copy, then they have it forever.

The only way to keep complete control is to keep the ownership, and just rez if for them to see.

The other option would be to have f***ing HUGE cubes that say demo floating around all over the place, likned to it, both inside and out, so that if anyone sees them using it they will know just how cheap they are.
BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
07-14-2006 09:08
From: Bitzer Balderdash
The other option would be to have f***ing HUGE cubes that say demo floating around all over the place, likned to it, both inside and out, so that if anyone sees them using it they will know just how cheap they are.


This is a great idea! Make the cubes rotate for maximum effect. You could also add "DEMO" to all the textures too. And put in particle scripts that target annoying particles at anyone inside the house other than the owner.
Gattz Gilman
Banned from RealLife :/
Join date: 29 Feb 2004
Posts: 316
07-14-2006 09:18
also making the house phantom
_____________________
Claudia Sondergaard
Registered User
Join date: 31 May 2005
Posts: 2
07-14-2006 15:39
thanks for all the suggestions, I like the demo texture and floating cubes. thanks for the script, i will try it and see how it works...thanks again everyone!
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-14-2006 16:01
Be careful with the auto delete script - llDie is ignored if the object is attached to the avatar. Im not so sure about TEMP_ON_REZ though, its worth testing :)

If you're selling scripted objects, it would probably be a good idea to combine the auto-die script with both a set-all-prims-alpha script (llSetLinkAlpha(LINK_SET, 0, ALL_SIDES)) and a script deleter script.
It could trigger after a set amount of time or after the user left the parcel. The user would be able to keep the object in his/her inventory as long as they want tho (the script is effectively frozen), so take this into account when using a timed-die script.
==Chris
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
07-14-2006 16:16
From: Christopher Omega
Be careful with the auto delete script - llDie is ignored if the object is attached to the avatar. Im not so sure about TEMP_ON_REZ though, its worth testing :)

As long as object remains attached to avatar TEMP_ON_REZ remains untriggered from what i could tell. Which is actually nice, since it allows for self-cleaning vehicles in case things go wrong and bits and pieces of your plane wind up across 3+ sims o.O;
Jerry Martin
Registered User
Join date: 2 Oct 2005
Posts: 33
Multi-item, Multi-author vendor
07-14-2006 17:02
Try using this script found right here in this forum , I have used it and it works fine for what you want to do as far as displaying a house , it uses a model of the house which can be set to temp on rez and not raise the prim count on your land and also the actual house you want to sell , it's just what you need .