ID:149209
 
I'm working with a psedu-turn based game and have a problem with movement. More exatly movement via the arrow keys.

mouse movement via this simple code:
DblClick()
walk_to(usr,src)
moves at a nice pace.

the problem is when a user holds down the arrow (spamming the system with move up commands) and the short burst of speed they recive before the server spams thier chat with "no more movement" messages.

Now I've tried various timing and placements for sleep commands, but always ended up with either no change, or system not moving the user far enough.

I would really like a way to have the system wait untill the last move command finishs before it starts reciving the next one.

Any help would be great.

Salarn
Try locking the movement, then moving, then unlocking it a tick later. Or two ticks. It should retain good speed while keeping extended movement. If you want to be absolutely sure they didn't move to far, create a "dummy" obj at where they were (invisibility 101, or a ghost for reference) and check to see if they've left the max movement area around it. Or just check to see if they've reached that limit in teh move proc, and stop them.