Listen only in 5m range
|
|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
05-23-2006 10:49
Is it possible to have an object only listen on all and any channels just within a 5m range? If so how?
|
|
Elvawin Rainbow
Registered User
Join date: 30 Aug 2005
Posts: 172
|
05-23-2006 10:55
no
_____________________
"Off with their Heads"
|
|
Harris Hare
Second Life Resident
Join date: 5 Nov 2004
Posts: 301
|
05-23-2006 10:56
There isn't any way to set the range that triggers a listen event but you can check the distance of the object after the event is triggered. It's kinda tricky but you could sensor for the person/object that spoke and find its coordinates. Then use llVecDist to find out if it's more than 5m away. If it is, ignore it.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
05-23-2006 11:45
Even with that you can't listen to all channels. There's a limit of 64 listeners, there's a lot of channels. I could probably work it out, but I'll lay long odds you'd crash the sim just from the listeners. Adding in the sensors to check out the range, bye bye sim for sure.
|
|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
05-23-2006 11:49
From: Harris Hare There isn't any way to set the range that triggers a listen event but you can check the distance of the object after the event is triggered. It's kinda tricky but you could sensor for the person/object that spoke and find its coordinates. Then use llVecDist to find out if it's more than 5m away. If it is, ignore it. How to find a persons/objects coordinates?
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
05-23-2006 12:04
From: Thorne Kaiser How to find a persons/objects coordinates? Use an llSensor call that only selects the key of who/whatever you heard speaking, then use llDetectedPos(0). But it's easier just to limit the range of the sensor. e.g. gMessage = "";
...
listen(integer c, string name, key id, string msg) { gMessage = msg; llSensor("", id, AGENT, 5.0, PI); }
sensor(integer n) { llOwnerSay("Within 5m, position " + (string)llDetectedPos(0) + ", message was " + gMessage); }
no_sensor() { llOwnerSay("Not within 5m"); }
|
|
Elvawin Rainbow
Registered User
Join date: 30 Aug 2005
Posts: 172
|
05-23-2006 12:57
From: Eloise Pasteur Even with that you can't listen to all channels. There's a limit of 64 listeners, there's a lot of channels. I could probably work it out, but I'll lay long odds you'd crash the sim just from the listeners. Adding in the sensors to check out the range, bye bye sim for sure. Which is why I just said no - any solution thaat is workable is gonna make me wanna kill whoever is using it hee hee
_____________________
"Off with their Heads"
|
|
Gaius Goodliffe
Dreamsmith
Join date: 15 Jan 2006
Posts: 116
|
05-23-2006 14:30
Are you wanting to listen to all channels in order to discover what channel some particular communications are occuring on?
You can't listen to all channels at once, but you can listen to a fairly large range without too much effort or noticable hit to sim performance. If you don't find anything in one range, switch to the next, repeat until you find what you're looking for. That way, rather than lagging the sim with a "super-scanner", you just take a little more time to find what you're looking for.
|
|
Gaius Goodliffe
Dreamsmith
Join date: 15 Jan 2006
Posts: 116
|
05-23-2006 14:35
Are you wanting to listen to all channels in order to discover what channel some particular communications are occuring on?
You can't listen to all channels at once, but you can listen to a fairly large range without too much effort or noticable hit to sim performance. If you don't find anything in one range, switch to the next, repeat until you find what you're looking for. That way, rather than lagging the sim with a "super-scanner", you just take a little more time to find what you're looking for.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
05-23-2006 14:56
From: Elvawin Rainbow Which is why I just said no - any solution thaat is workable is gonna make me wanna kill whoever is using it hee hee My answer would have matched yours. But, after the next poster talked about how to make a listener that ignored things more than 5m away, I thought it worth explaining that the other part of the equation wasn't really doable either.
|
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
05-23-2006 17:50
Hi Thorne
Channel numbers are signed 32 bit integers ranging +- 2 billion. You may catch fixed numeric low channel transmissions but you'd have to be very lucky to catch randomly selected channels. I use those random channels for dialog boxes from multiple prims.
Ed
|