Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Call A Command on Delete?

Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-02-2005 17:46
Probably not possible...but I thought I'd ask:

Is it possible to call a script action on a manual delete of the script?

Example: Object X is created and has a script embedded in its contents folder. Agent Y purchases the Object X and opens the contents folder...deleting the script. Is it possible for this script to trigger an "exit" type event that also deletes the item it was in (an llDie)?
_____________________
--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.
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
11-02-2005 17:55
Can't be 100% certain about that script, although I doubt it. You can have another script in there to pick up the change though.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-02-2005 18:09
Ahhhh...actually...that would be good...you'd just write two scripts...drop 'em both...and then when one was deleted, the other would run a command and vice versa.
_____________________
--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.
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
11-02-2005 18:51
The only way i can think of to do this would be to have the script communicate with something else in world or something out of world. If x seconds go by without hearing from it, assume it was deleted.
_____________________
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-03-2005 02:10
From: Cid Jacobs
The only way i can think of to do this would be to have the script communicate with something else in world or something out of world. If x seconds go by without hearing from it, assume it was deleted.



That would require an e-mail event...which would be pretty "heavy"...


I'm thinkin' droppin' two scripts into the same object that check to make sure eachother still exist.
_____________________
--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.
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
11-03-2005 02:33
From: Kenn Nilsson
Ahhhh...actually...that would be good...you'd just write two scripts...drop 'em both...and then when one was deleted, the other would run a command and vice versa.

Can't do. 1.7 has multi-select and multi-delete was there even before.

You could have them in different prims of the linkset, but then you can just delete the scripts while the object is in a no-script zone.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
11-03-2005 03:15
Kenn - backing up to the original question - given that it appears as though there's no sure-fire way to kill the object if the script is deleted - what is the reason that you don't set the object to "next owner cannot modify"? Maybe we can find a different solution for you.
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
11-03-2005 03:28
From: Kenn Nilsson
That would require an e-mail event...which would be pretty "heavy"...


I'm thinkin' droppin' two scripts into the same object that check to make sure eachother still exist.

Or remote_data, either way you do it will have a bit of sim impact. But email isn;t *that* bad.
_____________________
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-03-2005 09:20
The point is more of a brainstorm than anything...and the concept is to provide a security script/set of scripts for persons who wish to sell modify/no-copy products. (I.E....protect from dupe scripts).

The multi-select is a problem...I was thinkin' about that after I posted last...I think the best answer is to embed such a protection into another necessary script for the object...

...but the point was to be able to put it in objects that are also not scripted...

...and again, just a brainstorm.
_____________________
--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.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
11-03-2005 23:34
If they're happy to set items which are modify but 'no scripts' you can do a script per prim that's triggered by change & CHANGED_INVENTORY, hunts for scripts and deletes them or kills the object hosting them.

It's not 100% usable of course: houses, furniture etc. might have situations where adding scripts is a legitimate modification, but it should work to stop the copy scripts I think.

That said, if you've got a modable object you might be able to turn the scripts to not running, add your copy script running and off you go. So it's probably not viable, not 100% viable anyway.