|
Seraph Bedlam
Registered User
Join date: 5 Jan 2006
Posts: 8
|
11-21-2006 07:01
I've done several searches through these forums and gone through the LSLWiki in great detail and my apologies, but I cannot get a handle on some of the more complex permissions-related intricacies of LSL. So, I'm looking for two things.
1 - Can anyone point to a guide or explanation of how the llRequestPermissions and runtime permissions model works in general in relation to different object states, objects with linked prims with multiple scripts, etc.
2 - Also, here is a script I'm working on. I have an object made of linked parts that can be purchased from a vendor object:
The root prim contains a script which a) makes the user pose and b) listens for a message to detach and destroy itself.
A child prim contains a script which a) performs a periodic animation a few times and then messages the root prim to detach the object and destroy itself.
Now, in the root prim I request animate and attach permission as part of the default state entry. I'm having trouble determining the scope of the granted permissions. Questions: do they last for the rezzed lifetime of the object? Do they apply to animations and events in the child prim or do permissions need to be requested for each prim's script (meaning, duplicates)?
Any advice or direction would be appreciated. The LSLWiki is very useful, but it does not appear to provide example scripts answering these questions and indicating what the object behavior should be (assuming the user grants permissions) on rez, on attach, when taken, etc.
Thanks in advance!
_____________________
Tasseomancy - loose leaf tea, chaos magick courses, dream interpretation, poetry workshops/readings, original art and clothing.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
11-21-2006 09:51
Permissions are stored by the script, and to the best of my knowledge and testing are retained as if a global, so they persist through state changes etc. You can use llGetPermissions (rather than llRequestPermissions) to check that a script still thinks it has the relevant permission.
A permission is retained unless 1) the script is reset or 2) there is a new permission or permissions request launched (llRequestPermissions call).
Hope that helps with your queries.
I'm a bit woozy, but reading your description, the detach then die option seems unlikely to work. You can't drop things by script, and you can't llDie attachments or things in inventory.
|
|
Seraph Bedlam
Registered User
Join date: 5 Jan 2006
Posts: 8
|
11-21-2006 10:03
Wonderful help. I will mess with your suggestion tonight. I think since I had issues and tried lots of approaches I may be requesting too often and probably not treating the permissions in the total object as global--i.e. I'm asking for the permissions for each script in each linked prim which is messing it up.
Would it be recommended then to ask for permissions in the state_entry of the entire linked object, then just check for those permissions along the way in the script in one of the linked prims?
I thought the un-attach and die would not work based on the wiki description. Thanks for the confirmation. I will also figure out some alternative there.
_____________________
Tasseomancy - loose leaf tea, chaos magick courses, dream interpretation, poetry workshops/readings, original art and clothing.
|