Jump to content
Sign in to follow this  


Recommended Posts

Yes.  You may use either llAttachToAvatar or llAttachToAvatarTemp, depending on whether the object that you want to attach already belongs to the avatar or you are just "loaning" it to the avatar temporarily.  In either case, you cannot attach an object without first requesting and receiving permission with llRequestPermissions(av_UUID,PERMISSION_ATTACH).  You'll find descriptions in the LSL wiki.

In order to attach any object you will first need to rez it in world.  Your HUD, in this case, acts as the rezzer. As it creates the object, the rezzer can pass information (in its start parameter or as a chat message) to a script in the object that will do the job of requesting permission and then attaching. So, your final project consists of writing at least two scripts: (1) A HUD script that includes a rezzing function and (2) a script to attach the new object, to be placed in the object itself.

Share this post

Link to post
Share on other sites

The only way to do it without rezzing the object is if the avatar using the HUD is using RLV, and uses shared folders.

Then, you can have the HUD 

  1. Check to see if a shared folder exists in the agent's inventory and, if so, if it contains the item you want to attach.
  2. If so, use RLV to force-attach the object.
  3. If the shared folder exists, but doesn't contain the item you want,
  4. Use RLV to set notifications if the avatar accepts an inventory offer, and then use llGiveInventoryList to place the item in the shared folder
  5. On receiving notification that the item has been accepted, then use RLV to force-attach it.

You need a pretty good understanding of  RLV in general and (in particular) of how shared folders work to write a script that can correctly interpret and form the appropriate shared folder commands and responses.    And if the agent doesn't use RLV or doesn't have a shared folder (or doesn't accept the inventory folder offer) then it won't work.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...