Click()
if(usr.turn==1)
if(usr.moving==1)
usr.dir=get_dir(usr,src)
sleep(1)
step(usr,usr.dir)
usr.moving=0
usr.turn=0
for(var/obj/O in world)
if(O.owner==usr)
del(O)
Problem description: This code comes from a tile where if you click it, the user moves onto it. There are 4 that are created when you click a button and I need them to disappear after clicking one of the tiles.
They should disappear, but only the one I clicked disappears.
Did you consider what would happen to an atom's proc when the atom is deleted (Hint: It's terminated instantly)?
As a side-note, you might want to reconsider the way you're getting the reference to the atoms you want deleted.
Looping through each obj in the world seems a waste for that kind of task, when you could simply store the reference in a list upon creation.