ID:262009
 
I'm having trouble with some automatic edging. I want it too look like this:

X = normal wall
O = edged wall
XOOOOOOOOX
X________X
X________X
X________X
OOOOOOOOOO

I tried out this:
turf                            
MouseDrop(turf/a,turf/b)
var/turf/T
for(T in block(a,b))
if (T.x==a.x || T.y==a.y || T.x==b.x || T.y==b.y)

--> if(T.x==a.x||T.x==b.x&&T.loc!=b.loc&&locate(a.x,b.y,T.z)!=T)
new /turf/wall/walledge (T)
else
new /turf/wall/wall (T)

It just gave me this:
XXXXXXXXO
X_______O
X_______O
X_______O
XXXXXXXXO

the variable a is the bottom left and b is the top-right.


Any way to fix this?

~~> Dragon Lord

Bump...
Unknown Person wrote:
if(T.x==a.x||T.x==b.x&&T.loc!=b.loc&&locate(a.x,b.y,T.z)!=T)

You are checking it on the x axis. The tiles along the bottom will all have the same y axis, not x.