ID:264461
 
Code:
mob
proc/Dodge(mob/M)
if(src.stamina>=10000)
if(src.canmove==1)
if(src.dodged==0)
src.icon_state="Dodge"
src<<"You feel your Body Fly forward as you dodge the incoming atack"
src.dodged=1
sleep(2)
src.dodged=0
step(src,src.dir)
step(src,src.dir)


Problem description:
the code itself works the player moves two steps in what ever direction they are facing. the problem is i need them to move there faster is there anyway to do that from this code?
You could... step them three times? Or... sleep for less than 2 ticks?
In response to Garthor
no garthor i dont mean the distance i mean hte speed in which they move each step.
In response to B-mut
They're already moving instantly, ignoring the sleep(2). It cannot move faster.

[edit] Unless you are referring to the graphical effect, which you can adjust using the pixel_step_size variable.
In response to Garthor
alright thanks garthor i got it
Also, it would be cleaner if you used:
if(src.dodged) //in stead of if(src.dodged == 1)
//and
if(src.canmove) //in stead of if(src.canmove == 1)

//and also

if(!src.dodged) //in stead of if(src.dodged == 0)
//and
if(!src.canmove) //in stead of if(src.canmove == 0)