ID:146827
 
mob/var
speeding = 0
rundelay = 5

client/Move()
..()
if(mob.speeding <= 0)
mob.speeding = 1
..()
sleep(mob.rundelay)
mob.speeding = 0
else
return
if(mob.step == 1)
view(10,mob) <<'pl_step1.wav'
mob.step = 2
return 0
if(mob.step == 2)
view(10,mob) <<'pl_step2.wav'
mob.step = 1
return 0


It doesn't delay movement nor play sounds.
Well I've almost got the same thing, but looks like this if it helps. Works a treat.


For the client side of it.

client/Move()
if(!mob.dead && mob.moving==0)
if(mob.speeding <= 0)
mob.speeding = 1
..()
sleep(mob.rundelay)
mob.walking(mob)
mob.speeding = 0
else
return
else
return


For the mob/proc section

walking(mob/M)
if(usr.breed=="Fairy")
return
else
view(1)<<sound('foot_grass_l.wav')
spawn(M.rundelay)
walking2(M)

walking2(mob/M)
view(1)<<sound('foot_grass_r.wav')


Hope that helps the usr.breed bit is to play a content sound for the fairy... It's my wife she wants to play a fairy. :)

Also this way if you create a different speed the walking will speed up to as I've got Crawl, Walk, Run and Sprint in my game. Using M.rundelay 0= ordinary game speed and 2 Sprint, 3 Run, 5 Walk and 7 crawl. Thjis gives you chance to magicialy enhance the walk to UP the running and Sprint etc, but you can not get better then M.rundelay=0 I'm afraid.