Search the Community
Showing results for tags 'lllisten'.
-
I am trying to ask students a question and then teleport them if they get the answer correct (and only give feedback if they get the answer wrong). I have tried playing with the location of llMapDestination, but the script won't pause for the user input. Depending where I put the llMapDestination, it either runs automatically or won't run at all. I'm hoping someone can give me a little guidance on how to make this work. THANKS! // this code is for the teleporting doors after the students answers the question correctly integer gListener; vector Room1 = <70, 60, 441>; vector Room2 = <88, 59, 441>; vector Room3 = <105, 60, 441>; vector Room4 = <105, 43, 441>; vector Room5 = <88, 43, 441>; vector Room6 = <71, 43, 441>; vector Room7 = <71, 27, 441>; vector Room8 = <88, 27, 441>; vector Room9 = <104, 27, 441>; string simName = "TejanoTech"; vector tpDest = Room2; vector lookAt = ZERO_VECTOR; // I tried putting this in a callable function to place it in the listen function but then it will not run //teleporting () { // llMapDestination(simName, tpDest, lookAt); // } default { state_entry() { llSetText("Sample Question #1.", <1.0, 1.0, 1.0>, (float)TRUE); } touch_start(integer total_number) { integer channel = -13572468; gListener = llListen( channel, "", "", ""); llTextBox(llDetectedKey(0), "What color is the sky?\na. blue\nb. green\nc. brown.\nPlease enter ONLY the letter of the correct answer.", channel); llSetTimerEvent(60.0); // I tried this timer after seeing this in another script but it had no effect // when I put it here, the teleport runs regardless of user input llMapDestination(simName, tpDest, lookAt); } listen(integer channel, string name, key id, string message) { if (message=="a"){ llSay(0, "You are correct, the sky is blue."); // teleporting(); // If I try to place the llMapDestination here, it doesn't run regardless of user input llSetTimerEvent(0.1); } else { llSay(0, "Sorry, that's incorrect. The sky is blue."); llSetTimerEvent(0.1); } llListenRemove(gListener); } timer() { llListenRemove(gListener); llSetTimerEvent(0); } }
- 10 replies
-
- llmapdestination
- lllisten
-
(and 2 more)
Tagged with:
-
Hello and thank you in advance, I am moving my first steps into scripting LSL, trying to create my own RLV collar. I have seen and bought a few items that are able to replace or modify the text spoken by the wearer in local chat: when these items are active, the original message typed from me does not appear in local chat, what is show instead is an elaborated message produced by some script in the object I am wearing. Trying to replicate this behaviour though i keep saying my original message in the in the local chat, followed by a second message, elaborated by my own script. I tried muting myself using RLV commands, but I can still see the three dots "..." appearing in local, meaning that I tried to talk. How can I accoplish that kind of complete "silence" in local chat, and have only the elaborated message displayed? Here are some pictures to better explain my issue. Original text: https://gyazo.com/6d8471712671602df0a3b0dd9402888c Working RLV text modifier: https://gyazo.com/a8904b425175c0dd0288ef6136917257 My attempts: https://gyazo.com/f12ac7e1fc8c3f4624db231c4ada387b Thank you for your time and any help you could give me, Grant
- 4 replies
-
- rlv
- local chat
-
(and 1 more)
Tagged with:
-
Hello again dear forums! I have been working on a "comm" system for our sci-fi base, but have been unable to figur out a way to capture a normal chat message and then send it via "channel 159". I have gotten alot of help while learning code, but i'm have a hard time understanding certain part of it. Would anyone be willing/able to explain what the 4 values in "llListen" and "listen" do? I know that llListen is (Channel, the object name that it needs to listen too, something, something,) and have no clue how the () works on the "listen" function. Here is the code: default { state_entry() { llWhisper(0, "O1 running!"); llListen(0,llDetectedKey(0),llDetectedKey(0),""); } listen(integer channel, string name, key id, string message) { llWhisper(159, message); } } Thanks alot again and hope you are all doing good! ^^ ~Perg0
- 12 replies
-
- comm system
- comm
-
(and 3 more)
Tagged with:
-
Hi Community I just started learning LSL and decided to write a script that reads the chat and analyses the messages sent by my fishing rod to automatically calculate some income statistics. But somehow I cant get the script to listen to those messages generated by the rod (spoken via "llOwnerSay" i guess). Using this listener code doesn't trigger a listen event after a fishing attempt gets posted to the chat: llListen(PUBLIC_CHANNEL, "", "uuid-of-my-fising-rod-here", ""); Am I doing something wrong here? Or is it even possible to listen to those messages? Thank you for your answers
- 4 replies
-
- lllisten
- llownersay
-
(and 1 more)
Tagged with:
-
Good Morning so, i have become comfortable with KFM. my next step is to make one prim chase another. i had planned on having one root and 2 child prims...and was hoping that the root will be able to control the chase. so i used Messagelinked and put the KFM in the linkmessage event in the child. this did not work since the KFM gets applied to the whole object, rather than just the child. then i read about llListen and it may be a better solution, in that i dont even need linking. before i use it i have a question: do we need any input from the local chat to trigger the listen event? Basically, i dont want any user input and in that respect, Messagelinked worked well since i cd put conditions within the parameters. Thank u and regards
-
I am learning how to use 'llListen' and I am seeing places where I may want the 'listen' to only be available for a short time. For example: I have an object that when TOUCHED with set a 'llListen'. I want that listen to only listen for about 10 seconds and then stop listening, regardless of whether it hears anything or not. I still want the listen to work if it does hear anything, but it if doesn't I want to reset the script. What am I missing? Can anyone point me in the right direction?