ID:141866
 
Code:
client  //This is for the client...
Northeast() //If you hit northeast(9)
var/olddir = mob.dir //This is the old direction which we will call the mob direction.
switch(mob.dir) //Let's switch the mob direction to...
if(NORTH,SOUTH) //If we are facing north or south...
step(mob,EAST) //Let the mob step east.
mob.dir = olddir //The mob's direction is the variable's direction.
if(EAST,WEST) //If we are facing east or west...
step(mob,NORTH) //Let the mob step north.
mob.dir = olddir //The mob's direction is the variable's direction.

Northwest() //If you hit northwest(7)
var/olddir = mob.dir //This is the old direction which we will call the mob direction.
switch(mob.dir) //Let's switch the mob direction to...
if(NORTH,SOUTH) //If we are facing north or south...
step(mob,WEST) //Let the mob step west
mob.dir = olddir //The mob's direction is the variable's direction.
if(EAST,WEST) //If we are facing east or west...
step(mob,NORTH) //Let the mob step north.
mob.dir = olddir //The mob's direction is the variable's direction.

Southeast()
var/olddir = mob.dir //This is the old direction which we will call the mob direction.
switch(mob.dir) //Let's switch the mob direction to...
if(NORTH,SOUTH) //If we are facing north or south...
step(mob,EAST) //Let the mob step east.
mob.dir = olddir //The mob's direction is the variable's direction.
if(EAST,WEST) //If we are facing east or west...
step(mob,SOUTH) //Let the mob step south.
mob.dir = olddir //The mob's direction is the variable's direction.

Southwest()
var/olddir = mob.dir //This is the old direction which we will call the mob direction.
switch(mob.dir) //Let's switch the mob direction to...
if(NORTH,SOUTH) //If we are facing north or south...
step(mob,WEST) //Let the mob step west.
mob.dir = olddir //The mob's direction is the variable's direction.
if(EAST,WEST) //If we are facing east or west...
step(mob,SOUTH) //Let the mob step south.
mob.dir = olddir //The mob's direction is the variable's direction.


Problem description:
Changing the speed works for North, South, East, and West. I implemented strafing code (shown above), and changing the mobs speed doesn't change the strafe speed.

I use the following code to change a mobs speed:
client//Its better to use this for client so other mobs don't get affected
var{MoveDelay=3;Moving}
Move()
if(Moving) return
Moving=1
..()
sleep(MoveDelay)
Moving=0


Help is greatly appreceated.
Your Move() proc where the delay is in effect is under client. In your strafing procs, you're moving the mob. client/Move() happens when the human player moves, which causes the mob to be moved.

It will work if you define Move() under /mob instead.
If you want the delay to only affect mobs with clients, that's what if()s are for.
In response to Kaiochao
Thanks!
Problem solved.