ID:2258797
 
(See the best response by Kaiochao.)
Code:
turf
Enter(var/mob/M)
if(ismob(M) && M.client)
world<<"[M] entered on turf"
return 1


Problem description:
https://puu.sh/wm8oX.gif

Why when i enter on turf i get 2 messages, not just one? I try to make blocking turf who send message for player - "You shall not pass". Any ideas how to do it?
Best response
You're using pixel movement, so it's possible for a mob's bounding box to overlap multiple turfs simultaneously. Each turf will have its procs called.

If you want to prevent something from entering a turf, you have to return FALSE (or 0) in its Enter() proc.

Enter(), unlike Entered(), returns a value that is used by Move() to determine if the movement is allowed. Returning FALSE blocks movement, and returning TRUE allows movement. By default, it returns TRUE if src or the mover are non-dense. See the DM Reference.
In response to Kaiochao
Kaiochao wrote:
You're using pixel movement, so it's possible for a mob's bounding box to overlap multiple turfs simultaneously. Each turf will have its procs called.

If you want to prevent something from entering a turf, you have to return FALSE (or 0) in its Enter() proc.

Enter(), unlike Entered(), returns a value that is used by Move() to determine if the movement is allowed. Returning FALSE blocks movement, and returning TRUE allows movement. By default, it returns TRUE if src or the mover are non-dense. See the DM Reference.

I replace it to area, sorry for dumb-post.