mob/verb
Pull()
set category = "Staff"
for(var/mob/M in range(src,1))
M.dir = turn(M.dir, 180)
src.dir = turn(src.dir, 360)
M.loc = src.loc
Problem description:
What I've been trying to do is pulling the mob on the top of src. But when the mob is getting pulled on the top of src, his dir should change to the opposite of src's dir. I've been trying a few things, but none of them seems to work..
You mean any mobs next to (or on the same tile on) the player using the verb, right? That's what your code says, anyway.
First, you're setting M's dir to the opposite of his own dir. You're saying you want the opposite of src's dir.
Second, you're turning src's dir by 360. That's not going to change anything and therefore has no notable effect; while 180 degrees is half a circle, 360 degrees is a full circle, so when you rotate by 360 degrees, you end up at exactly the same "place" (angle) as you started.