Nikole Messmer Posted March 15, 2021 Share Posted March 15, 2021 I'm making an info board for a live singer and want to allow others to touch a button on the board which pops up a message box they can type a song request into that will then appear on the singer's screen as a blue dialog. I've poked around the LSL library but it seems a lot of them are limited to 20m distance or I'm looking at the wrong things. Can someone help? thanks Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 15, 2021 Share Posted March 15, 2021 If the singer and the button, or the button and the toucher are more than 20m apart you'll probably need some clever solutions. 1 Link to comment Share on other sites More sharing options...
Nikole Messmer Posted March 15, 2021 Author Share Posted March 15, 2021 well the board is sitting right next to the singer on-stage. the concern is for people more than 20m from the stage. unless maybe it gives a warning when they try to do it and it says they're too far away. that would probably work too. Link to comment Share on other sites More sharing options...
Nikole Messmer Posted March 15, 2021 Author Share Posted March 15, 2021 10 minutes ago, Quistessa said: If the singer and the button, or the button and the toucher are more than 20m apart you'll probably need some clever solutions. well the board is sitting right next to the singer on-stage. the concern is for people more than 20m from the stage. unless maybe it gives a warning when they try to do it and it says they're too far away. that would probably work too. Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 15, 2021 Share Posted March 15, 2021 (edited) The wiki is a bit confusing on what the distance limits are, but I did a teensy bit of testing and this seems like it might work, assuming the owner of the button is the singer: integer gChannelTextbox=100; uNotifyOwner(key From,string Notice) { string text = "secondlife:///app/agent/"+(string)From+"/inspect"+ " has sent you a message:\n"+ Notice; //use one or both of the following 2 lines: llDialog(llGetOwner(),text,["OK"],-1); //llOwnerSay(Text); } default { state_entry() { llListen(gChannelTextbox,"",NULL_KEY,""); } touch_start(integer total_number) { llTextBox(llDetectedKey(0), "Send a message to "+"secondlife:///app/agent/"+(string)llGetOwner()+"/inspect .", gChannelTextbox); } listen(integer Channel,string Name,key ID,string Text) { uNotifyOwner(ID,Text); } } Edited March 15, 2021 by Quistessa c type syntax highlighting, and a typo fix 1 Link to comment Share on other sites More sharing options...
Nikole Messmer Posted March 15, 2021 Author Share Posted March 15, 2021 3 hours ago, Quistessa said: The wiki is a bit confusing on what the distance limits are, but I did a teensy bit of testing and this seems like it might work, assuming the owner of the button is the singer: integer gChannelTextbox=100; uNotifyOwner(key From,string Notice) { string text = "secondlife:///app/agent/"+(string)From+"/inspect"+ " has sent you a message:\n"+ Notice; //use one or both of the following 2 lines: llDialog(llGetOwner(),text,["OK"],-1); //llOwnerSay(Text); } default { state_entry() { llListen(gChannelTextbox,"",NULL_KEY,""); } touch_start(integer total_number) { llTextBox(llDetectedKey(0), "Send a message to "+"secondlife:///app/agent/"+(string)llGetOwner()+"/inspect .", gChannelTextbox); } listen(integer Channel,string Name,key ID,string Text) { uNotifyOwner(ID,Text); } } outstanding! thank you so much! I'll give this a try tonight! Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 16, 2021 Share Posted March 16, 2021 I was just thinking that if you got a lot of requests at once, you would only be able to see the latest one by default with this method, because your viewer normally limits you to one dialog box per object. This would require some testing, but I think you could get around this by going into your debug settings (under the advanced menu) and changing ScriptDialogLimitations to 1, then modifying the script a little so each request sends you a dialog for a different channel like so: integer gChannelTextbox=100; integer gChannelThrowaway=-200; uNotifyOwner(key From,string Notice) { string text = "secondlife:///app/agent/"+(string)From+"/inspect"+ " has sent you a message:\n"+ Notice; //use one or both of the following 2 lines: llDialog(llGetOwner(),text,["OK"],--gChannelThrowaway); //llOwnerSay(Text); } default { state_entry() { llListen(gChannelTextbox,"",NULL_KEY,""); } touch_start(integer total_number) { llTextBox(llDetectedKey(0), "Send a message to "+"secondlife:///app/agent/"+(string)llGetOwner()+"/inspect .", gChannelTextbox); } listen(integer Channel,string Name,key ID,string Text) { uNotifyOwner(ID,Text); } } That might be worth looking into. 1 1 Link to comment Share on other sites More sharing options...
Nikole Messmer Posted March 16, 2021 Author Share Posted March 16, 2021 ohhhh thanks! thats perfect and it is so far working just fine! multiple dialogs have come in and i think we'll be ok. the real test will be a full performance. 1 Link to comment Share on other sites More sharing options...
Nikole Messmer Posted March 17, 2021 Author Share Posted March 17, 2021 On 3/15/2021 at 8:01 PM, Quistessa said: I was just thinking that if you got a lot of requests at once, you would only be able to see the latest one by default with this method, because your viewer normally limits you to one dialog box per object. This would require some testing, but I think you could get around this by going into your debug settings (under the advanced menu) and changing ScriptDialogLimitations to 1, then modifying the script a little so each request sends you a dialog for a different channel like so: integer gChannelTextbox=100; integer gChannelThrowaway=-200; uNotifyOwner(key From,string Notice) { string text = "secondlife:///app/agent/"+(string)From+"/inspect"+ " has sent you a message:\n"+ Notice; //use one or both of the following 2 lines: llDialog(llGetOwner(),text,["OK"],--gChannelThrowaway); //llOwnerSay(Text); } default { state_entry() { llListen(gChannelTextbox,"",NULL_KEY,""); } touch_start(integer total_number) { llTextBox(llDetectedKey(0), "Send a message to "+"secondlife:///app/agent/"+(string)llGetOwner()+"/inspect .", gChannelTextbox); } listen(integer Channel,string Name,key ID,string Text) { uNotifyOwner(ID,Text); } } That might be worth looking into. This script is 100% perfect! Actually ended up being even better than anticipated since she can move the dialog boxes around on her screen and the old one did not. Thank you SO much again ❤️ Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 17, 2021 Share Posted March 17, 2021 You're so welcome <3. I love it when an amazingly simple solution works well! 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