Doctor Visage Posted January 23, 2020 Share Posted January 23, 2020 (edited) hello! i am trying to make a script for vehicle which triggers an action by local chat command (on channel 0). but if its two or more same vehicles standing nearby - it will trigger them all? also if someone else says that command, they all will listen and be triggered? how to avoid it and make it listen to only owner's chat command and only the one i am sitting in? Edited January 23, 2020 by Doctor Visage Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted January 23, 2020 Share Posted January 23, 2020 When you set up a listener with llListen, you're also creating an initial chat filter. llListen(channel, name, id, msg); If the message doesn't come from name or id, and doesn't contain msg, no listen event will happen. If those filters pass and a listen event is triggered, you can ignore any that aren't from the owner: if (id != llGetOwner()) return; And you can ignore any that don't come from avatars sitting on the same object: if (id != llAvatarOnSitTarget()) return; if (id != llAvatarOnLinkSitTarget(link)) return; 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