KennyChidorie Posted November 19, 2019 Share Posted November 19, 2019 Hi, I have a question - how to make a button, when clicked, which disconnects the hud? Hud's work system is not simple: When a user wears the hud, at the same time he has a rigged mesh package in his/her hand + screen hud with button "close" and "unpack" (child prims). Standard scripts don't work. Trouble: Script trying to detach from agent but PERMISSION_ATTACH permission not set! Link to comment Share on other sites More sharing options...
KennyChidorie Posted November 19, 2019 Author Share Posted November 19, 2019 Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted November 19, 2019 Share Posted November 19, 2019 "Standard scripts" work just fine. In the touch_start event, when the script detects that the "detach" button has been clicked (how ever you check that), you just call llRequestPermissions(PERMISSION_ATTACH) and then, in the run_time_permissions event, you call llDetachFromAvatar. touch_start(integer n) { if (button == detach_button) { llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); } } run_time_permissions(integer perm) { if (perm) { llDetachFromAvatar(); } } Link to comment Share on other sites More sharing options...
KennyChidorie Posted November 19, 2019 Author Share Posted November 19, 2019 6 hours ago, Wulfie Reanimator said: "Standard scripts" work just fine. In the touch_start event, when the script detects that the "detach" button has been clicked (how ever you check that), you just call llRequestPermissions(PERMISSION_ATTACH) and then, in the run_time_permissions event, you call llDetachFromAvatar. touch_start(integer n) { if (button == detach_button) { llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); } } run_time_permissions(integer perm) { if (perm) { llDetachFromAvatar(); } } syntax error 1 Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted November 19, 2019 Share Posted November 19, 2019 (edited) Do you get a line number for where the syntax error occurs? On first glance I can't see anything in Wulfie's code that would throw an error. You might need to paste the two event blocks here for us to look through, assuming the syntax error line number points into one of them. Edited November 19, 2019 by Profaitchikenz Haiku Link to comment Share on other sites More sharing options...
KennyChidorie Posted November 19, 2019 Author Share Posted November 19, 2019 19 minutes ago, Profaitchikenz Haiku said: Do you get a line number for where the syntax error occurs? On first glance I can't see anything in Wulfie's code that would throw an error. You might need to paste the two event blocks here for us to look through, assuming the syntax error line number points into one of them. 0,0 Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted November 19, 2019 Share Posted November 19, 2019 (edited) 47 minutes ago, KennyChidorie said: syntax error 0,0 Of course, because it isn't a complete script. You need to use it as an example and implement it into your own script, which you didn't include here. You can't just copy-paste my example. Edited November 19, 2019 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
KennyChidorie Posted November 19, 2019 Author Share Posted November 19, 2019 (edited) 5 minutes ago, Wulfie Reanimator said: Of course, because it isn't a complete script. You need to use it as an example and implement it into your own script, which you didn't include here. i can't share that script, because i've got it from mp. But yours didn't help me. Edited November 19, 2019 by KennyChidorie Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted November 19, 2019 Share Posted November 19, 2019 7 minutes ago, KennyChidorie said: i can't share that script, because i've got it from mp. I understand that, but if you're looking for a custom script to fit your exact needs, you need to make a post in Wanted or Inworld Employment. 1 Link to comment Share on other sites More sharing options...
KennyChidorie Posted November 19, 2019 Author Share Posted November 19, 2019 10 minutes ago, Wulfie Reanimator said: I understand that, but if you're looking for a custom script to fit your exact needs, you need to make a post in Wanted or Inworld Employment. thanks, i will ask. 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