mob
var
movedelay = 0.01
movestop = 0
Move()
if(dir == SOUTHWEST)
return
if(dir == NORTHWEST)
return
if(dir == NORTHEAST)
return
if(dir == SOUTHEAST)
return
else
if(movestop)
return 0
movestop = 1
..()
sleep(movedelay)
movestop = 0
Problem description:
The mob can move fine, but when the directional button is held down the mob moves very fast
It is desired for the proc to respond very quickly, but to stop the super fast movement that is the result of holding the key down
Examples
E.G.1
The player moves left and quickly press up
It moves left and right after it goes into the next tile it starts to move up
E.G.2
The player presses the right button and holds it.
The mob moves into the next space and then moves into the right space as planned, but it waits to stop moving (very short time, less than 1/10 of a second so it looks as if the mob icon doesnt stop moving) and stops moving after they release the button
(Ill try to make a video of this to make it more clear :P)
I had this working in 3.5 but its not working in 4.0
Try that.