Excella Deluxe Posted April 4, 2021 Share Posted April 4, 2021 Hello guys! I'm looking for a unpack script only work with HUD "click to unpack" or when the object or hud is worn automatically send the content or folder and detach seconds later. If the object or hud is rezzed automatically is deleted. Where can i find? In markeplace are not modify, no custom or dont have all options Link to comment Share on other sites More sharing options...
Quistess Alpha Posted April 4, 2021 Share Posted April 4, 2021 http://wiki.secondlife.com/wiki/LlGiveInventoryList ^^ a few good ones there, you could change it a bit to suit your taste, perhaps chage touch_stert to on_rez, and add both llDie() and llDetach() to the end of the event to cover the case where it's rezzed in-world and the case when it's attached. Link to comment Share on other sites More sharing options...
Peter Stindberg Posted April 4, 2021 Share Posted April 4, 2021 In order to detach automatically, the object needs to ask for permissions. So this would present the wearer with an additional dialogue. That's why you barely see an unpack HUD that detaches automatically. Unpack-on-wear is relatively easy, as is unpack-on-rez. With unpack-on-rez you can have the object auto-delete as well. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted April 4, 2021 Share Posted April 4, 2021 1 hour ago, Peter Stindberg said: In order to detach automatically, the object needs to ask for permissions. So this would present the wearer with an additional dialogue. That's why you barely see an unpack HUD that detaches automatically. Unpack-on-wear is relatively easy, as is unpack-on-rez. With unpack-on-rez you can have the object auto-delete as well. Permission to attach/detach is automatically granted without a permission prompt if the script is already attached to the avatar. 1 Link to comment Share on other sites More sharing options...
Peter Stindberg Posted April 4, 2021 Share Posted April 4, 2021 Well, I tried exactly that the other day, and got an error message about missing permissions on auto-detach. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted April 4, 2021 Share Posted April 4, 2021 (edited) 25 minutes ago, Peter Stindberg said: Well, I tried exactly that the other day, and got an error message about missing permissions on auto-detach. list get_contents_except_self() { list contents; string self = llGetScriptName(); integer item = llGetInventoryNumber(INVENTORY_ALL); while (~--item) { string name = llGetInventoryName(INVENTORY_ALL, item); if (name != self) { contents += name; } } return (contents); } default { attach(key id) { if (id) llRequestPermissions(id, PERMISSION_ATTACH); } run_time_permissions(integer perm) { if (perm) { key avatar = llGetPermissionsKey(); llGiveInventoryList(avatar, "TEST CONTENT", get_contents_except_self()); llRegionSayTo(avatar, 0, "Got permission to detach, bye!"); llDetachFromAvatar(); } } } Edited April 4, 2021 by Wulfie Reanimator 6 1 Link to comment Share on other sites More sharing options...
Peter Stindberg Posted April 4, 2021 Share Posted April 4, 2021 (edited) 1 hour ago, Wulfie Reanimator said: attach(key id) { if (id) llRequestPermissions(id, PERMISSION_ATTACH); } OK, the difference between your script and mine was that I did not have that line in it. Will try it later. Thanks 🙂 Update: Yep, works now. Thanks again! Edited April 4, 2021 by Peter Stindberg Successfully tested 1 Link to comment Share on other sites More sharing options...
Anna Salyx Posted April 8, 2021 Share Posted April 8, 2021 On 4/4/2021 at 8:13 AM, Wulfie Reanimator said: Permission to attach/detach is automatically granted without a permission prompt if the script is already attached to the avatar. On 4/4/2021 at 8:24 AM, Peter Stindberg said: Well, I tried exactly that the other day, and got an error message about missing permissions on auto-detach. The key detail that was missing on the first comment, and the following example is: Yes, the permission to attach/detach is automatically granted in this type of situation w/out generating a permission prompt, but you still have to ask for it before you try otherwise the system complains (throws an error). 1 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