Considering O is that house(the obj), I'm trying this:
for(var/mob/M in O.persons)
world << O //just to prove to you guys that O does exist and is being used.
world << M //again to prove.
O.persons -= M
M.Move(locate(O.x-1,O.y,O.z))
However, M doesn't excatly Move() out.
But that isn't even the main point. The point is, what if there was something blocking O.x-1? That would mean the mob never moves out. So how would I check that there's an empty space and then move them onto there(by empty space I mean no mobs or objs are present there)? And also a little help on why the mob isn't even moving won't hurt :)
And lets say there are 2 objs on top of each other(on the map). How would I delete one of them? No I dont want to just not add two objs on top of each other in the map...
I'm trying this:
for(var/turf/T in world)
for(var/obj/O in T)
for(var/obj/P in T)
if(!O==P)
if(O.loc==P.loc)
var/list/A = list(O,P)
var/delete = pick(A)
del(delete)
But it says cannot read null.loc.
Your false statement is wrong, it should be like this