Cat Tamatzui Posted March 23, 2021 Share Posted March 23, 2021 Hi I have a hud with a menu in it the send a message to a prim to tell it to display 3 words afk,brb and busy but it only works for me, but it will work again if someone rezzes out the hud and makes copy of it on the ground then picks it up and wears it will then work and I have no idea why its doing this, its like its locked to me until they rez and make their own copy. Any help would be much appreciated Here is my script for the menu hud. list Pickemote = ["CLOSE","AFK", "BRB", "BUSY"]; string msg = "Please make a choice."; key ToucherID; integer channel_dialog; integer chan; integer listen_id; default{ state_entry() { channel_dialog = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) ); chan = (integer)("0xF" + llGetSubString(llGetOwner(),0,6)); } touch_start(integer total_number) { ToucherID = llDetectedKey(0); llDialog(ToucherID, msg,Pickemote, channel_dialog); listen_id = llListen( channel_dialog, "", ToucherID, ""); llSetTimerEvent(60); } listen(integer channel, string name, key id, string choice) { if (choice == "") { llDialog(ToucherID, msg,Pickemote, channel_dialog); } else if (choice == "AFK") { llRegionSay(chan, "pafk"); llListenRemove(listen_id); } else if (choice == "BRB") { llRegionSay(chan, "pbrb"); llListenRemove(listen_id); } else if (choice == "BUSY") { llRegionSay(chan, "pbusy"); llListenRemove(listen_id); } else { //do something else. llListenRemove(listen_id); } } timer() { //TIME’S UP! llListenRemove(listen_id); llWhisper(0, "Sorry. You snooze; you lose."); llSetTimerEvent(0.0); } } Link to comment Share on other sites More sharing options...
Mollymews Posted March 23, 2021 Share Posted March 23, 2021 seems that the receiver object is listening on: chan = (integer)("0xF" + llGetSubString(llGetOwner(),0,6)); When we give the receiver object to another person then that receiver script is reset to listen on chan = the_now_new_owner this HUD script is not resetting chan when it changes ownership (it does tho when the new owner rezzes the HUD inworld) the immediate fix is to add a changed event to the HUD script that resets itself when it changes ownership. This will set chan = the_now_new_owner changed(integer change) { if (change & CHANGED_OWNER) llResetScript(); } 5 Link to comment Share on other sites More sharing options...
Cat Tamatzui Posted March 24, 2021 Author Share Posted March 24, 2021 Thank you Mollymews that worked perfectly 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