|
Jimmi Stapleton
Registered User
Join date: 12 Nov 2006
Posts: 3
|
11-29-2006 21:14
Please Help! I am new to sL, and new to scripting. I would like to make a control panel that when you click on it, a dialog box appears. Not the standard dialog box, however; rather, a graphical repersentation of the control panel, enlarged and placed in the center of the screen, which is clickable to allow options of the control panel to be set. Thus far, a HUD seems to be the best way to do so. I can make my HUD, have it fully operational, and all is grand. I cannot, however, get rid of it when I am finished. I don't want it to return to the user's inventory, or to the object that generates it--I just want it to dlete itself. As llDie() will not work on attatchments, I am stuck. I would GREATLY appreciate any suggestions..... One thought I had was to make the control just appear directly in front of the user so they can zoom in on it and adjust settings (that way llDie will work) but cannot--for the life of me--figure out how to determine the position of the user. I can get the position of objects no problem, but not sure about agents. I would really appreciate any help 
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
11-29-2006 21:29
Check here. http://www.lslwiki.com/lslwiki/wakka.php?wakka=llDetachFromAvatarFrom: someone - Q: Is there a way to delete an attachment instead of just detaching it?
- A: Not directly. llDie is the function used to delete objects, but it doesn't work on attachments.
Instead of simply calling llDetachFromAvatar on its own, your best option is to switch states to a "dead" state -- one where the attach() event handler calls llDetachFromAvatar, causing the attachment to automatically detach, (with PERMISSION_ATTACH granted, of course) and where on_rez() contains llDie. This will cause the object to be deleted, should it be rezzed on the ground. You can also stick llSetObjectName in the "dead" state's state_entry(). This would rename it to something like "Expired Attachment - Delete Me", indicating to the inventory's owner that they're free to get rid of it
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|