What is it?
It's a brother to the view() proc like hearers is to viewers. It will act the same as view() with a small difference, it can add objects which are in the dark (on turf with has no luminosity).
Why would this be useful?
I need a way to get a list of objects that the user can see, even if it's in the dark. An example would be if there was a special item which reacted to speech, and doesn't need to be seen. I can get around this by setting the turf's luminosity, of the source, to the max amount of 6, get my list of objects from view() and then set the luminosity back to the original amount. This does create problems, because for example you may want enter a range of 7 or more in the parameters, when luminosity only has a max range of 6.
Syntax
It would be like view.
hear(dist=5, Center=usr)
Please consider this as it has created a lot of problems for me in the past.
| |||||||
Dec 10 2012, 8:47 am
|
|
Unlike view/viewers, hearers is not affected by a variable like sight. There is no hear proc because hearers will return the exact same thing.
|
In the documentation, hearers only produces a list of mobs, while view does not. You are then incorrect because it would not return the exact same thing.
|
Ah, good catch. Though are you sure you don't want to use the range/orange proc?
|
I'm sure because for example if I wanted to make a security camera get a list turf which it can see, so I can add an overlay, I wouldn't be able to use view() because if the camera was in the dark then it would not be able to return anything, since it would have no see_in_darkness variable.
|
Well, you can use view on a turf or obj on the map. It will use plain visibility calculation which is purely based on opacity, I believe.
|
Why hear would be useful to ME: Use opacity on a room to block the view of people outside the room, however they should be able to hear whats going on. :3 (Text wise, and Sound wise.)
|
In response to Jemai1
|
|
Jemai1 wrote:
Well, you can use view on a turf or obj on the map. It will use plain visibility calculation which is purely based on opacity, I believe. I tried and tested it that but it didn't work, it still accounts darkness. |
range() returns a list of atoms a certain distance away regardless of visibility. Is that what you mean?
|
In response to Fugsnarf
|
|
Fugsnarf wrote:
range() returns a list of atoms a certain distance away regardless of visibility. Is that what you mean? There is also orange(dist, center). It's like range, and it has nothing to do with the citrus fruit. It excludes the center in its list calculations. |
I want opacity to block what someone hears but I don't want darkness to block it. If I want a way to check if an object can hear another object in the dark I wouldn't be able to that because view() is blocked by darkness.
|
What's wrong with hearers()? You mentioned it in your original post, but you didn't say what the problem with it was.
|
In response to Kaiochao
|
|
hearers() only returns mobs. He wants other atoms too.
|
The way I'm doing it is very ineffecient and hacky. Also yes I want other atoms too.
|
Have you checked to see if DarkCampainger's Line of Sight can do what you want?
|
Bump, I'd like to see if this is possible now that BYOND development has continued.
Just to recap, basically a view() for low luminosity turfs (i.e: a hear()) to help free up some processing power, instead of having to use a hacky method. viewers() and hearers() isn't an option as it's for getting a list of mobs only. |