Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

object permissions

Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
07-26-2007 12:25
I am getting horrible confused by permissions.

I have an object, one of the prims of which rezzes another object.
This rezzed object parent prim responds to a message to request permissions to break_all_links and another to break all the links.
In the original version this object after permissions had been granted was taken back into inventory and then inncluded in the main objects prim where it is correctly rezzed and upon request breaks all the links. No Problem.
However when I give the object to a new owner it refuses to break the links saying the permissions have not been set. Fair enough, the new owner must give permissions.

What I would like to happen is on the first rezzing of the main object by the new owner it requests that they give permissions to the sub object to break all links. This works but there seems to be no way to save the main object so that the next time it is rezzed it wont need to ask for permissions without giving modification and/or copy permission to the new owner on the main object.

OR have I got it completely wrong, please help

The scripts are too complex to post in their entirety nor should I if I want to keep them private. Has anyone got a sample script I could modify to make this work or an alternative process to achieve the same end.

TIA
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
07-26-2007 16:55
Well, the approach I can think of--which I can't even test at the moment--is inelegant in the extreme, so let's hope somebody else has a better idea. But first, there's something here that confuses me:
From: Gregory McLeod
What I would like to happen is on the first rezzing of the main object by the new owner it requests that they give permissions to the sub object to break all links. This works but...
... but I wouldn't expect that to work. AFAIK, script perms belong to the script instance, not to the object, so until that sub-object is rezzed, I don't see how it (or, rather, its scripts) can get permissions. So, if I'm wrong about that, then the rest of this is surely b0rked, too, but fwiw:

Product is delivered as two objects in a composite. Setup instructions for the product include the manual steps of rezzing the composite, agreeing to the perms request from the (to-be) sub-object, taking it into their Inventory, and then control-dragging it onto the main object, for which llAllowInventoryDrop(TRUE) has been called, just till a CHANGED_ALLOW_DROP event confirms that the sub-object has arrived.

(If that scheme works at all, then one might achieve the "taking it into their Inventory" step by the object trying to attach itself, and immediately detach itself, whereupon it lands in the owner's Inventory... but it's doubtful that this step would make anything silky of this sow's ear.)
Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
07-27-2007 01:11
I want to post an acknowledgement and thanks immediately for your reply together with an clearer explanation of the phrase
<QUOTE>What I would like to happen is on the first rezzing of the main object by the new owner it requests that they give permissions to the sub object to break all links. This works but.. <\QUOTE>
This was inexpertly explained. Your suggestion is closer to the correct method, if as you say, it works. I'll try again to explain.

The main object (consisting of 14 prims) has many scripts one of which is invoked when the main object is clicked and the play option and number of players selected. This rezzes a sub-object from within that prim which consists of 60 prims as a group object. The setup function then issues to the parent of the sub-object a command to break all links. Then it removes the unneeded prims from the now separate prims and play commences.
The sub-object is initially created by me and given permissions to break_all_links before being saved in my inventory still as a group. This is the sub-object that is embedded in the prim for rezzing.
When a new owner rezzes the main object and all its contents I think the main object should ask for permissions for the sub-object to break all links, but this sub-object is never saved with permission granted so I can see how dropping the sub-object into the new owner's inventory with instructions to rezz whereupon it would request permissions to break all links and then save itself back to the newowner's inventory with instructions to replace the one in the main object prim.

Is this another way of saying what you intended, one which I think I understand?

Can an object unload itself and reload itself to a prim in a linked object?

To complicate matters there are further pieces (6 different colors) in another prim which are rezzed individually as required to show the move positions possible. I havn't got to that point in the new owner version but expect it will cause problems they don't need permissions to break links but will need copy permissions as they are rezzed and removed from time to time.

I hope this is clearer, you get very befuddled after long hours of trying all sorts of possible solutions and don't think or write clearly.

As it willl take more time to investigate the function you quote llAllowInventoryDrop(TRUE) and event CHANGED_ALLOW_DROP, I havn't used them before, so need to examine the ins and outs of them before trying it. I will give it a try however.

Thanks again for the help.
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
07-27-2007 04:16
From: Gregory McLeod
When a new owner rezzes the main object and all its contents I think the main object should ask for permissions for the sub-object to break all links, but this sub-object is never saved with permission granted so I can see how dropping the sub-object into the new owner's inventory with instructions to rezz whereupon it would request permissions to break all links and then save itself back to the newowner's inventory with instructions to replace the one in the main object prim.

Is this another way of saying what you intended, one which I think I understand?

Can an object unload itself and reload itself to a prim in a linked object?
You've gotten to the heart of the matter: an object can give inventory to another object, but can't give its own rezzed self, and if script perms can only be conferred to running scripts, that object is gonna have to be rezzed, so I'm thinking it will have to make a trip through the owner's inventory in order to get into the inventory of the desired containing object. So, yes, you restated my hare-brained scheme correctly.
From: someone
To complicate matters there are further pieces (6 different colors) in another prim which are rezzed individually as required to show the move positions possible. I havn't got to that point in the new owner version but expect it will cause problems they don't need permissions to break links but will need copy permissions as they are rezzed and removed from time to time.
I don't think this will be a problem because "copy" is an object permission, not a script permission, so you should be able to just set it on the embedded, to-be-rezzed prims to enable next-owner copy.