|
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
|
09-14-2006 12:49
Hi, has anyone else the same problems as me? When I create a new thing it always attaches to the right hand - no matter what I want it to attach to. I tried the following script but the thing goes to the hand again ... default
{ state_entry() {
} on_rez(integer dummy) {
} attach (key attached) { if (attached != NULL_KEY) { llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); } else { llReleaseControls(); } }
run_time_permissions(integer perms) { if(perms & PERMISSION_ATTACH) { llOwnerSay("Permission request Received!"); llAttachToAvatar(ATTACH_CHIN); } } }
Is there something wrong with my script or did they mess up real well this time with the update?
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
09-14-2006 13:30
I think the script has a problem. The attach() handler is called *after* something is attached. By then, it's no use to ask for permissions and try to re-attach somewhere else, because the object is already attached. Try asking for permissions in on_rez, or state_entry, or something. That way, permissions will be granted while the object is still on the ground, and then when you call llAttachToAvatar, maybe it'll work right. At least, that's what I think is happening. I haven't played with this too much, so I could be wrong 
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
09-14-2006 13:54
From: HtF Visconti has anyone else the same problems as me? When I create a new thing it always attaches to the right hand - no matter what I want it to attach to. Right hand is now the default attach point for the prim, as opposed to previous skull point. To change it, you'll need to manually attach your item to selected point, then once it's detached from it, this point is used as default next time someone uses "Wear" command for the item. edit: that's just to add to above post, since it already explains how to go about it the script way ^^;
|
|
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
|
09-14-2006 14:03
Ah, okies - thanks for the input. I never tried this but I *had* to because when you try to change an attachment point via the inventory ... well ... it doesn't work anymore. So I was wondering if the scripted way doesn't work either - but *this* was my mistake then.
Fortunately dropping the item on the floor and using the pie menu does still work, though, so I wasn't stuck when the script didn't work.
|