ID:264718
 
Initial.


Code:
for(var/atom/A in oview(2,src))
flick('turf.dmi',A)
flick("bound",A)
sleep(1)


Problem description:

I want to change the icons only in the "5x5" range. Problem is, this code changes tiles in the "1x1 to 5x5" range.

What I want. (blue)


What I get.

Perhaps just add a if (get_dist(src,A) == 2) in there?
In response to Murrawhip
Murrawhip wrote:
Perhaps just add a if (get_dist(src,A) == 2) in there?

I ended up just subtracting "oview(2) - oview(1)". Apparently, oview() stores every tile in distance and only excludes the src.

In response to Hulio-G
Well, oview is:

A list of visible objects within Dist tiles of Center, excluding Center.

EVERY defined atom in the distance between the src and the specified boundary.
Like I said in Chatters, things like oview(), view(), range(), orange() can be manipulated to include and exclude other atoms that you specify like oview(10,src) - range(1,src).
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
Well, oview is:

A list of visible objects within Dist tiles of Center, excluding Center.

EVERY defined atom in the distance between the src and the specified boundary.
Like I said in Chatters, things like oview(), view(), range(), orange() can be manipulated to include and exclude other atoms that you specify like oview(10,src) - range(1,src).

The suggestion "oview(1,src) - src" was on the right track but had no effect. It was mainly the concept of why you were subtracting src from a list supposedly built with src already subtracted that was bothering me.