turf
ice
Entered(mob/M)
if(istype(M,/mob/))
if(M.dir == SOUTH)
M.y-1
if(M.dir == NORTH)
M.y+1
if(M.dir == EAST)
M.x-1
if(M.dir == WEST)
M.x+1
?
ID:269458
Jul 4 2005, 12:30 pm
|
|
How would you make ice that when entered, you slide to the next turf in your dir?
turf ? |
In response to Ol' Yeller
|
|
You forgot ..()!
turf/Ice/Entered(var/atom/movable/a) |
In response to Jp
|
|
You don't need ..() in Entered(), it has no default action.
|
In response to Ol' Yeller
|
|
It's often a good idea to include it anyway. What if a library you're using depends on Entered() to work properly? You might end up preventing the library's Entered() from executing, causing it to mess up.
As a general rule of thumb, it's good practice to include ..() in built-in procs unless you know that you specifically don't want the default action to occur. |
Something like that :p