littlepinkpie Posted April 20, 2017 Posted April 20, 2017 Hello all, I have the following script: default { on_rez(integer start_param) { llSay(-99,"Exists"); llListen(-99, "", llGetOwner(), ""); } listen(integer chan, string name, key id, string message) { if(message=="Exists" && llGetOwnerKey(id)==llGetOwner()) { llDie(); } } } The problem with this is that when I rez a second object (containing of course this script), the first (already rezzed) object doesn't listen. However, if I type in chat "/-99 Exists" , it does listen and removes the object. I tried to include a state entry for setting the channel but didn't work too. Am I missing something?
Nova Convair Posted April 20, 2017 Posted April 20, 2017 Oh, it does listen. llListen(-99, "", llGetOwner(), ""); It listens on channel -99 to the owner. Who is the owner? Only your avatar. Your objects don't have your uuid so they are filtered out. You want to have it listen to objects that are owned by you. It's not possible to set that in the listen parameters, so you need to change that line to: llListen(-99, "", "", ""); The other filter in the listen event you have already installed: llGetOwnerKey(id)==llGetOwner() that gives TRUE if the uuid is your avatar or one or your objects - so that will work fine. All you need to do is change the llListen. 3
Xiija Posted April 20, 2017 Posted April 20, 2017 or you can try ... llListenHarder(-99, "", "", ""); llListenReallyReallyHard(-99, "", "", ""); ::ducks:: 1
Love Zhaoying Posted April 20, 2017 Posted April 20, 2017 32 minutes ago, Xiija said: or you can try ... llListenHarder(-99, "", "", ""); llListenReallyReallyHard(-99, "", "", ""); ::ducks:: If you are having to listen that hard, perhaps the object is too far away and you need to llShout()..
Madelaine McMasters Posted April 20, 2017 Posted April 20, 2017 4 minutes ago, Love Zhaoying said: If you are having to listen that hard, perhaps the object is too far away and you need to llShout().. Or llRegionSay().
Love Zhaoying Posted April 20, 2017 Posted April 20, 2017 Just now, Madelaine McMasters said: Or llRegionSay(). You don't llSay()! 1
Rolig Loon Posted April 20, 2017 Posted April 20, 2017 34 minutes ago, Love Zhaoying said: If you are having to listen that hard, perhaps the object is too far away and you need to llShout().. No, no, no..... the object needs to llShout (or llRegionSay or llRegionSayTo). Xiija got it right. You have to llListenHarder or if (llVecDist(llGetPos(),vTarget) > 20.0) { llMoveToTarget(vTarget,10.); } 2
littlepinkpie Posted April 20, 2017 Author Posted April 20, 2017 13 hours ago, Madelaine McMasters said: Or llRegionSay(). Yes llregionsayto worked. Thank you
Rachel1206 Posted April 21, 2017 Posted April 21, 2017 (edited) The new function llBigListen( integer channel, string name, key id, string message, float nDecibel, integer bHighVolume ) is the answer - you are able to listen to 5,000 sims and fine tune to within 0.15 cm of the source emitter.This will revolutionize SL communication, but remember to set the boolean .bHighVolume to TRUE to protect against overload of user. Have a nice weekend (And yes just for fun!) Edited April 21, 2017 by Rachel1206 2
Berksey Posted April 23, 2017 Posted April 23, 2017 (edited) The only potential problem I see is sending the message before listening for it. It would explain the chat command working while the llSay is ignored. So rather than llSayblahblahblah llListenblahblahblah I'd go llListenblahblahblah llSayblahblahblah. I mean theoretically, at least. I've never put the one before the other, so yeah... Edited April 23, 2017 by Berksey
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