RhaDo2496 Posted December 3, 2016 Share Posted December 3, 2016 hiis there an option to attach/dettach opjects from a script in a hud ? Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 3, 2016 Share Posted December 3, 2016 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. Link to comment Share on other sites More sharing options...
RhaDo2496 Posted December 3, 2016 Author Share Posted December 3, 2016 so theres no way to attache without the need to rezzing the object? Link to comment Share on other sites More sharing options...
Innula Zenovka Posted December 3, 2016 Share Posted December 3, 2016 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 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. If so, use RLV to force-attach the object. If the shared folder exists, but doesn't contain the item you want, Use RLV to set notifications if the avatar accepts an inventory offer, and then use llGiveInventoryList to place the item in the shared folder 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. 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