Max Pitre Posted April 30, 2019 Share Posted April 30, 2019 I have a mesh door script that uses touch but I need it to listen to open instead for a remote control. I have a simple dialog in the remote that works but not sure how to switch the touch_start into a listen start(?) type of control... So the door script hears either open or close and the does it. The door itself it using the door script by Lyn Mimistrobell. http://wiki.secondlife.com/wiki/Smooth_Rotating_Linked_Door_With_Hinge TIA Link to comment Share on other sites More sharing options...
Coffee Pancake Posted April 30, 2019 Share Posted April 30, 2019 http://wiki.secondlife.com/wiki/LlListen Link to comment Share on other sites More sharing options...
Max Pitre Posted April 30, 2019 Author Share Posted April 30, 2019 Already been looking at that and other sources, if it was that easy I wouldn't have asked... Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 30, 2019 Share Posted April 30, 2019 It is just that easy, actually. Anything that is in the touch_start event can be done instead in the listen event. Just tell your listen event to act if (message == "open") . The only thing you have to watch out for is that a touch_start event will identify the toucher as llDetectedKey(0), but you cannot use any of the llDetected* functions in a listen event. If you need information about the toucher, you will need to pass it along with the message from your remote object. You could either send it as a separate message or, much better, as part of a single message that you parse when it's received. The listen event might start, then, with something like listen(integer channel, string name, key id, string message) { list temp = llParseString2List(message,["~"],[]); key kToucher = (key)llList2String(temp,0); // The UUID of your toucher string strCommand = llList2String(temp,1); // The command to open or shut if (strCommand == "open") // open the door } So, if your remote object sends a message in the form UUID~command, the listen event has unpacked it to get the two parts back out again. Other than that minor bit, the job is done. 1 Link to comment Share on other sites More sharing options...
Max Pitre Posted April 30, 2019 Author Share Posted April 30, 2019 "easy" is a relative term...I almost failed algebra in high school (40 some years ago) and this looks harder than that... Thanks for the help. Link to comment Share on other sites More sharing options...
steph Arnott Posted April 30, 2019 Share Posted April 30, 2019 2 hours ago, Max Pitre said: "easy" is a relative term...I almost failed algebra in high school (40 some years ago) and this looks harder than that... Thanks for the help. This is crude but to the point. default { state_entry() { llListen(1000, "remote_controller", "", "");//this will listen on channel 1000 and only accept data from an object with that name. } listen(integer channel, string name, key id, string message) { if(message == "open") //if both are the same then run the branch code. If not ignore it. { //run the door openning code } } } 1 1 Link to comment Share on other sites More sharing options...
Coffee Pancake Posted April 30, 2019 Share Posted April 30, 2019 7 hours ago, Max Pitre said: Already been looking at that and other sources, if it was that easy I wouldn't have asked... The wiki example is really very simple and the page explains everything you need to know. If that's not making sense then you need to back up as you're missing some pretty fundamental stuff. It sounds like you're blindly copy pasting code with no idea how or why any of it does anything. 1 1 Link to comment Share on other sites More sharing options...
steph Arnott Posted April 30, 2019 Share Posted April 30, 2019 5 minutes ago, CoffeeDujour said: The wiki example is really very simple and the page explains everything you need to know. If that's not making sense then you need to back up as you're missing some pretty fundamental stuff. It sounds like you're blindly copy pasting code with no idea how or why any of it does anything. Or maybe you could simply explain what is what rather than be an ankle hacker? You have no idea what the OP is doing or their level of understanding. Your final comment is based on your opinion. This forum is what it states on the tin, not a put down forum. Link to comment Share on other sites More sharing options...
Max Pitre Posted April 30, 2019 Author Share Posted April 30, 2019 42 minutes ago, CoffeeDujour said: The wiki example is really very simple and the page explains everything you need to know. If that's not making sense then you need to back up as you're missing some pretty fundamental stuff. It sounds like you're blindly copy pasting code with no idea how or why any of it does anything. Is that what you think, well good for you, you're special. Link to comment Share on other sites More sharing options...
steph Arnott Posted April 30, 2019 Share Posted April 30, 2019 Just now, Max Pitre said: Is that what you think, well good for you, you're special. If you do not know it is about as helpful as a poke in the eye. 1 Link to comment Share on other sites More sharing options...
Max Pitre Posted April 30, 2019 Author Share Posted April 30, 2019 9 minutes ago, steph Arnott said: If you do not know it is about as helpful as a poke in the eye. Sometimes the obvious is hidden and sometimes we need a push in the right direction like what you and Rolig did. Both helped tremendously so thanks for that. 1 Link to comment Share on other sites More sharing options...
Coffee Pancake Posted April 30, 2019 Share Posted April 30, 2019 2 hours ago, Max Pitre said: Is that what you think, well good for you, you're special. I'm not having a dig, attacking you, calling you stupid. You're trying to run before you can walk. Spend a couple of hours getting up to speed then return to your project. The wiki has all the documentation you could ever need for everything you would ever want to do in LSL - The Wiki is really good. BUT If you can't read it, it's useless to you. Rolig's example was almost the same as the wiki version. Link to comment Share on other sites More sharing options...
steph Arnott Posted May 1, 2019 Share Posted May 1, 2019 Just now, CoffeeDujour said: I'm not having a dig, attacking you, calling you stupid. Yes you did. He clearly stated he new very little and asked for a very minor alteration when he could not understand the wiki. You then decided to be be know all of everything and smashed the poor man down. FYI a fifty year old learning new things like code is not easy. An by his response you got the mans back up. Link to comment Share on other sites More sharing options...
Coffee Pancake Posted May 1, 2019 Share Posted May 1, 2019 Yes. It is easy to pick up the lacking fundamentals. It just takes a little time and willingness to try. Less time than has been spent bickering about it in this thread. Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 1, 2019 Share Posted May 1, 2019 STOP IT! BOTH OF YOU! One more word and you'll have to get out of the car and walk home. Link to comment Share on other sites More sharing options...
steph Arnott Posted May 1, 2019 Share Posted May 1, 2019 4 minutes ago, Rolig Loon said: STOP IT! BOTH OF YOU! One more word and you'll have to get out of the car and walk home. Ma i would rather walk than belittle some one. Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 1, 2019 Share Posted May 1, 2019 9 minutes ago, steph Arnott said: Ma i would rather walk than belittle some one. Please imagine my stern grandmother voice. This is not a place for bickering and name calling. We are intimidating new scripters who come here with legitimate questions, hoping for wise words from us. Angry words and pointless arguments are not helping. Just quit it. And relax. 😎 1 Link to comment Share on other sites More sharing options...
steph Arnott Posted May 1, 2019 Share Posted May 1, 2019 1 minute ago, Rolig Loon said: Please imagine my stern grandmother voice. This is not a place for bickering and name calling. We are intimidating new scripters who come here with legitimate questions, hoping for wise words from us. Angry words and pointless arguments are not helping. Just quit it. And relax. 😎 Think you are attacking the the wrong person. I gave a very precise solution and an a empathic response to the OP. The other just was plain rude and abusive. This conversation is ended. 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 1, 2019 Share Posted May 1, 2019 I am not attacking anyone, Steph. I am giving general advice to people who have been posting recently. I really do not care who starts the arguing back and forth, and who may be "right" or "wrong". This is not the place for it. If you find yourself trapped in a back-and-forth argument, please consider what this forum is for, bite your tongue, and stop. 3 Link to comment Share on other sites More sharing options...
steph Arnott Posted May 1, 2019 Share Posted May 1, 2019 (edited) 9 minutes ago, Rolig Loon said: I am not attacking anyone, Steph. I am giving general advice to people who have been posting recently. I really do not care who starts the arguing back and forth, and who may be "right" or "wrong". This is not the place for it. If you find yourself trapped in a back-and-forth argument, please consider what this forum is for, bite your tongue, and stop. Ma, be blessed. A bee and a flower are the beauty of creation. Simple, but also vastly complicated in the the structure of life. Edited May 1, 2019 by steph Arnott 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