ID:834943
 
Not a bug
BYOND Version:495
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 13.0.1
Applies to:DM Language
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
There appears to be a limit of 16 tiles in any direction to the range proc.
Regardless of the amount of tiles you specify for range, it only returns a list of atoms in the area of 16x16 or XxY, whichever direction is the smallest. (X and Y being the tiles specified for range)
So in example if you set up a range of 20x10, it will return a list of atoms in 20x10. If you set up a range of 40x10, it will return a list of 32x10. (16 for each direction = 32)
The issue also exists with using square sizes like just typing 15 or 20. They will be limited by 16 in all directions.

Numbered Steps to Reproduce Problem:
1. Set the mob view size.
2. Set up a proc/verb that will do stuff when the player character is in a certain range which is greater than 16 in any direction.

Code Snippet (if applicable) to Reproduce Problem:
world
view="51x31"

mob/proc
Work()
for(var/mob/A in range("101x1",src))
DoStuff()


Expected Results:
Should return a list of atoms in the specified area.

Actual Results:
Returns a list of atoms in the specified area limited by a maximum of 16 tiles in each direction.
So 16 acts like a limit of range you can specify.

Does the problem occur:
Every time? Or how often? Everytime
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
N/A

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:
No idea
The max range() can go is based upon your view. Try using block() instead.
You are correct however regardless of what you set for view var or whatever you see the mob running the proc/verb in your map, any atom beyond 16 tiles on X or Y axes won't be listed.

In my case, I'm using range proc for AI to come from sleep once a player enters the range. Block simply seems a little too inefficient for me as for every time the AI calls the proc, it will have to do at least 2 more processes to calculate the two corner points for the block. In my example there may be hundreds of such AI at any given time, therefore it just seems too inefficient for me.

I can confirm that max range is somehow further limited by 16 tiles when view is above 16. I have tried "51x31" "51x51" "71x71" for view however regardless the AI proc kept returning list of atoms at most 16 tiles farther.
Lummox JR resolved issue (Not a bug)