Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

permissions question

Caitlyn Reardon
Registered User
Join date: 8 Jul 2006
Posts: 6
09-04-2006 00:12
Here's what i'm trying to do: Object A is attached. A rezzes object B. B has an on_rez llAttachtoAvatar. Can I have the attach permission for B granted before it rezzes?
Marcuw Schnook
Scripter
Join date: 24 Dec 2005
Posts: 246
09-04-2006 01:42
No.
A script gets permissions. Not an object.

So the script doing the llAttach (in object B on_rez) needs to get the permission, which cannot be done even in on_rez as there is no llDetectedKey(0) (user) I think.

(First part I'm sure of, second part not entirely sure, especially the part of no user available (key) which is needed for the llRequestPermissions call).
Kayla Stonecutter
Scripting Oncalupen
Join date: 9 Sep 2005
Posts: 224
09-04-2006 02:39
From: Marcuw Schnook
... second part not entirely sure, especially the part of no user available (key) which is needed for the llRequestPermissions call).
llGetOwner() :D
From: Caitlyn Reardon
Here's what i'm trying to do: Object A is attached. A rezzes object B. B has an on_rez llAttachtoAvatar. Can I have the attach permission for B granted before it rezzes?
You can..kinda. If you request and get permission to attach Object B, then take it into inventory and place inside Object A, B will still have attach permissions when rezzed, and can then use llAttachToAvatar in on_rez() :)
_____________________
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
09-04-2006 04:37
Well - I think Caitlyn may be planning to create a product here and while it is possible to use this on oneself it may be a tad tougher for a sales product. :)

The principle of things "storing" permissions remains valid, though. This is great when you want to use it on yourself but should this result in a product there is no automated way to put the attachment B back into attachment A once it has gotten its permissions. The user would have to do this manually. After that step, however, attachment B should always be able to attach to the avatar without further permission requests.

This is a bit out of my depth now: If you load a script via llRemoteLoadScriptPin() - will you just copy the source code and then start it from scratch or will you create a real copy (permissios, states, etc.) of the script you load? If the latter is the case then this would be the way to go here, I think.

Edit: I've been thinking about Lulu's ballgag ..... if the original attachment A and the called forth attachment B are related in body motion you should be able to call forth attachment B, position it and then link it to attachment A. Unless, of course, Attachment B has some functionality to do when attached. :) Some more info on what exactly you're about to do might be helpful.