Dark Vendetta wrote: > Walk, Step, Loc?
mob/Zombies/Body
var/mob/Zombies/Head/MahHead
Move()
.=..()
if(.)
MahHead.loc=loc |
First line is self explanatory,
Second line is a variable where you will need to store a reference to your head.
Third line is where we begin to override the Move() proc
Fourth line is a tiny bit more complex, and most people who use it don't understand what it does. '.' is an internal variable that any proc will return by default unless you manually override return. ..() calls the parent of whatever proc you're using, so in this case it would be calling atom/movable/Move() (unless you overrode Move() again in /mob or /mob/Zombies, in which case it would be referring to that.)
The Move() proc by default returns a 1 if it is successful and a 0 if it fails, so the next line ('if(.)') basically means "If the move() was successful", and the line after that moves the head to the body loc. |
|