Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Attach bug if not owner???

Yo Brewster
Registered User
Join date: 1 Feb 2006
Posts: 139
12-01-2006 10:52
I've written a lot of scripts (not enough clearly) so I'm VERY confused as why the very easy script below doesn't allow me to attach an object IF I'm NOT the owner of the object. What's the sense of the requestpermission (and the permission is granted) IF the attach still doesn't work. And yes I'm getting the "Script trying to attach to someone other than owner!" message.

Is this is a BUG or am I loosing my mind? If I'm loosing my mind, how do I get around this problem? I'm rezzing a temp object and none owners need to be able to wear this object. Thanks for reading this!


CODE

default {
touch_start(integer num_detected) {
llRequestPermissions(llDetectedKey(0), PERMISSION_ATTACH);
}

run_time_permissions(integer perm) {
if (perm & PERMISSION_ATTACH) {
llAttachToAvatar(ATTACH_RHAND);
}
}
}
_____________________
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
12-01-2006 11:08
The only thing i could think of is open the permissions on teh item. Otherwise might be a bug.
_____________________
LSL Scripting Database - http://lsl.dimentox.com
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
12-01-2006 11:09
I think the permission is put int there so that the cuddly prim bear you bought doesn't suddenly turn into a postal facehugger or goes all flexi-penis-like on you. There isn't really option of being able to attach items you don't own, if i recall right.

(using scanner and following target around may be a very poor work-around, but it won't be able to reasonably match the spots other than avatar cetre point for obvious reasons)
Yo Brewster
Registered User
Join date: 1 Feb 2006
Posts: 139
12-01-2006 11:13
Lol - it's actually a drink I'm trying to attach BUT I'll be checking into the bear. And yes - according to the LSL manual, you can clearly attach objects you don't own. That's the reason why you get a popup window asking you for permission to attach. BTW - permission on the object are WIDE open.
_____________________
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
12-01-2006 11:30
Well Wiki quite clearly says there: "Even though users other than the owner can grant this permission, attaching to them will fail with the message "Script trying to attach to someone other than owner!"."

it's not really strange when you think of it. If nothing else, prevents the self-replicators from attaching to people and travel to other places this way (while they can still try to put themselves into people inventory, at least they need to be manually taken out from there and rezzed if accepted. Attachments could just travel around and spawn stuff on each teleport change)
Yo Brewster
Registered User
Join date: 1 Feb 2006
Posts: 139
12-01-2006 12:05
From: Joannah Cramer
Well Wiki quite clearly says there: "Even though users other than the owner can grant this permission, attaching to them will fail with the message "Script trying to attach to someone other than owner!"."

it's not really strange when you think of it. If nothing else, prevents the self-replicators from attaching to people and travel to other places this way (while they can still try to put themselves into people inventory, at least they need to be manually taken out from there and rezzed if accepted. Attachments could just travel around and spawn stuff on each teleport change)


I agree and disagree --- the user would still have to accept the attachment. If he doesn't accept the attachment, the object would never be attached to the user. BUT - you're right about the wiki --- it does say that. Ok - so basically my ONLY way is to automatically give the object to the user? Does anybody have any other suggestions?
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
12-01-2006 16:13
All attached objects are in your inventory. Thus you own them. Would you like attaching an object to generate a copy or give the original to the target? Might be nice in some cases, but anyway the restriction makes perfect sense at this point in time.
Yo Brewster
Registered User
Join date: 1 Feb 2006
Posts: 139
12-01-2006 18:48
Thanks for helping me out on this one :) --- I'm already working on a work-around. RTFM is clearly the message here! hehe - thanks again.
_____________________