Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGiveInventory and permissions

Virrginia Tombola
Equestrienne
Join date: 10 Nov 2006
Posts: 938
01-15-2008 10:41
Hallo all, I'm afraid this is one of those "this is easy, but I am clueless" questions. But here it is:

I am making a vehicle which has the driver wear an attachment (a normal physical vehicle carriage with an animated horse team as the attachment). Easy enough, I include a copy/no-trans horse team the owner wears.

Ah, but now I want to allow other people the owner designates driving privileges as well. So, I put a copy/no-trans copy of the horse team in the carriage's inventory and in the changed event put this in:

CODE

changed(integer change)
{
if (change & CHANGED_LINK)
{
key agent = llAvatarOnSitTarget();
if (agent)
{
if(agent!=llGetOwner())
{
llGiveInventory(agent, "Carriage Horses");
llSay(0,"Find 'Carriage Horses' in inventory and wear them.");
}

et cetera


The idea of course being that an allowed driver who is not the owner receives one copy of the horses to wear.

This worked fine when *I* was the owner, but then when I gave it to a friend to test, when he designated a driver, the carriage did not give the inventory, but instead gave a error--I forget the exact phrasing, but it was "inadequate permissions to give inventory" sort of thing.

So. I can't make it no-copy, as that would prevent the carriage from being copied (and anyway, it would be a once off give item). But I'd rather not unleash a carriage that gives out copy/transfer versions of my horses. I will do that if I have to, but I'm really hoping for a work around.

Any ideas?
_____________________


Horses, Carriages, Modern and Historical Riding apparel. Ride a demo horse, play whist, or just loiter. I'm fair used to loiterers.

http://slurl.com/secondlife/Caledon%20Eyre/48%20/183/23/
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-15-2008 11:06
I've always felt very strongly that you should NOT be able to delete inventory from no-modify objects. This is one of the reasons. You could include a script that could delete and/or "melt down" the horses if they were used in a way you don't want (e.g. without the vehicle, or after a certain period of time if this was not someone you sold them to directly). But the way object inventory works now, someone could just delete the scripts and be left with your build.

You could require the owner be seated with the attachment, and simply allow other people to take the controls to drive the vehicle. I'm not sure if that's what you wanted though. You could setup your own object distributor that sends a copy of just the horses to a third party driver (the vehicle would communicate through e-mail or HTTP to your object distribution system that Jim Bob needs a horse attachment; then the horses would be coming directly from YOU, so you control the permissions and you control the logic that decides whether someone is eligable for a copy). Just some ideas.