Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Resetting scripts on transfer ?

Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-15-2005 17:16
I have a huge problems with my scripts not working properly for next owners, since the scripts are not reset upon transfer in SL (WHY ? Makes no sense !), things continue to respond to me even though they're not mine anymore, people get flooded with permission requests from rezzed objects, etc...

Is there any clever workaround ?
_____________________
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.
Totally Barmy
Proud Apoligist
Join date: 24 Aug 2004
Posts: 46
01-15-2005 17:25
default
{
on_rez ( integer param )
{
llResetScript();
}

state_entry()
{
// etc ...
}
}
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-15-2005 18:09
Hmmmmm, now that you mention it, I previously thought it'd mess up the behaviour of my objects, but I gave it some more thought and I think it might work with them afterall.

Thanks ! :)

[Edit]
Waittaminute, it does NOT work. I have an object that has PERMISSION_LINK set and contains a copy of itself. If I transfer it to someone else, they will get a popup everytime the object duplicates.

:(

[Edit]
Is there any way for an object to copy itself and give this copy to itself when it requests permissions ? Can an object "pick up" another ? Can it wait for an agent to pick an object in his/her inventory then grab a copy of it ?

[Edit]
If a script running with certain permissions set gives a copy of itself (the script, not the prim) to an object, are these permissions still valid ?
_____________________
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.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
01-15-2005 19:11
Ok, what it sounds like to me is that you're making a llListen() with llGetOwner in the llListen filter.

Don't.

Put a if(llDetectedKey() == llGetOwner) statement in the listen() event instead.

That way you won't have to reset the script, and it should work for whomever owns it.

(BTW, scripts resetting on transfer would SUCK.)
_____________________
</sarcasm>
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-15-2005 20:52
That does not work if the filter was set up with the previous owner's key, which I do usually to save on CPU usage. Guess I'm forced to use "wasting" Listens from now on :(

Also, this does not solve my permissions problem. Anyone knows of a way to work around this ?
_____________________
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.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
01-15-2005 22:30
From: Jesrad Seraph
That does not work if the filter was set up with the previous owner's key, which I do usually to save on CPU usage. Guess I'm forced to use "wasting" Listens from now on :(


The difference between a filtered and unfiltered listen barely exists. You further minimize the practically non-existant difference by using that if statement.
_____________________
</sarcasm>
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-16-2005 05:01
I acknowledge that completely.

Now, how do I duplicate an object while conserving permissions that are given after it being rezzed ? If I make it give its (freshly authorized) script along with an "inert" (= no permissions) copy of itself, will it work ?

Can I make it give its own script to the copy of itself that is still in the inventory ? Would it conserve the CHANGE_LINK permission ? It'd solve every issue neatly.
_____________________
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.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
01-16-2005 07:30
From: Jesrad Seraph
Can I make it give its own script to the copy of itself that is still in the inventory ? Would it conserve the CHANGE_LINK permission ? It'd solve every issue neatly.


I really wouldn't know, as I've never experimented with anything requiring permissions. Try it and see? If you want the script to keep running in the copy though, you're going to need to use lllRemoteLoadScriptPin.
_____________________
</sarcasm>
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-16-2005 08:01
I'm gonna try to give a copy of the script directly to the copy that is still in the inventory, it'll be done in the runtime_permissions event so that once the permission is set, it's set for the whole tree and won't annoy the new owner anymore.

I'll put a llRemoteLoadPin script in the inventory copy, that it'll delete upon rez.

How does it sound ?

Additional benefit: it forces next owner to keep all the permissions on (otherwise it cannot give the script to the copy), thereby ENFORCING THE GPL ! Woohooo :)
_____________________
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.
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-16-2005 14:42
I will test it and report if it works so that everyone can do it too, then move on to better solutions to my specific problem.

Since I'm using the link_set only to pass off messages to scale up the elements that compose the same branch/bark of the tree, I'll replace this whole system with a simpler communication scheme.

[Edit] OK, so maybe I did something wrong, or it does not work. Guess linking is out. Anyway I wanted to get rid of it as it limits growth of the trees to 5 pieces per branch/bark.
_____________________
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.
Chalky White
Second Life Resident
Join date: 1 Nov 2004
Posts: 140
01-18-2005 20:22
Hold on - surely you can't pass anything to an object that is still in your inventory ?
This would maybe make some things easier - but surely its impossible - or is it ?......
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-18-2005 23:31
It is impossible, yes, I tested it and it does not work.
_____________________
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.