ID:148474
 
    N()
src.dir = NORTH
var/A = 0
for(var/atom/T in locate(src.x,src.y+1))
if(T.density == 0)
A = 1
if(py < 32)
py += 8
pixel_y = py
return
if(y == world.maxy-1)
return
if(py == 32)
if(A==1)
y++
py = 8
pixel_y = 8
return
else return<dm>

Var A wont change to 1 even if there is no dense atom in the tile above it. Can anyone explain why it wont change to 1 to me?
You're doing it all wrong. It would just be easier to do a simple Enter() check:
var/turf/T = get_step(src,NORTH)
A = T.Enter(src)
In response to Garthor
Yes, it will set A to 1, but it does not check to see if the turf is dense or not. How can I check that?
In response to Jotdaniel
Check if the turf is dense. Duh. =P
In response to Crispy
Yes, now that I'm not so tired thats just what I did.