Innula Zenovka Posted August 22, 2012 Share Posted August 22, 2012 A couple of gotchas about llAttachToAvatarTemp of which it's good to be aware (they confused me no end).First, when an item attaches with llAttachToAvatarTemp changes owner (i.e. when it attaches to you if it doesn't already belong to you) it appears to purge all previously granted permissions, including PERMISSION_ATTACH (even though you've just granted it), so if the item didn't belong to you before attaching, you need to call PERMISSION_ATTACH again if you want to detach it by script. The permissions are silently granted this time, but you need to call them. If it belonged to you in the first place, that's not necessary, which is why I got terribly confused about why something would detach from me but not from my alt when she tested my device.There's now a caveat in the wiki about this.The second is that if you want to detach stuff in the changed event (e.g. samples that you want to detach when someone leaves the region) it gets into a race condition and things tend to go wrong unless you put a short llSleep into the event before trying to detach the item.Details over at SLU, where Void and Dari explained what was happening. 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted August 22, 2012 Share Posted August 22, 2012 Thanks for the warning about needing llSleep, Innula. I have been trying out a new temp attach demo unit in my shop, but it hadn't occurred to me that there would be a problem detaching when someone leaves the region. I'll modify my script. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now