ID:264219
 
mob
Move()
if(!usr.walk)
return 0
else
sleep(usr.speed)
return 1



Ok, i want it so where when walk=1 they cant move then when they move it sleeps for speed so they cant run super fast. i dont know why it wont work

Instead of returning 1, return the parent, first of all. Second of all, that will only make them not walk when walk is false. if(walk) is what you want, not if(!walk).

if(walk) = if walk is true (not 0, "", or null)
if(!walk) = if walk is false (0, "", or null)
Ungh. No put usr in proc.

Meh. Put your code between the <DM> tags when posting, not above them.

Bah. You should look up Move() (and perhaps learn some more) to see how it even works before messing with it, since whether you immediately return 0 or 1 in your override, no movement will take place. Unsurprisingly, Move() is the proc which makes the actual movement, so if you're terminating it after overriding it without calling the default action first, of course no movement will be done.
Also, you should really override client/Move() for this, instead of mob/Move().
First of all, you should put your code in the middle of DM tags
 at the start of your code and
at the end of your code, now, using 'usr' in procs isn't very smart.

mob
var
tmp
walking = 0 //so when they ever re log, they can move once
speed = 2
Move() //no 'usr' here sir, 'src' is way much better.
if(walking) return
walking = 1
..() // let's move
sleep(speed)
walking = 0


You also should try looking at some libraries before asking here.
In response to Danny Kenobi
That spawn() does nothing.