Run()
switch(input("Which state?") in list ("Walk","Run","MaxRun","Superspeed"))
if("Walk")
usr.icon_state=""
step_size=8
if("Run")
usr.icon_state="Run"
step_size=12
if("MaxRun")
usr.icon_state="Run"
step_size=15
if("Superspeed")
usr.icon_state="Run"
step_size=20
Problem description:
At the moment, this is my running system.. It doesn't work very smoothly, and I'm really open to suggestions. I do like the old BYOND movement, moving one frame by pressing an arrow once. I'd like to have it like that, moving one frame by pressing the arrow once, but having some sort of delay, so running would be faster by comparison.
With the way it is now, it's hard to be exactly infront of a mob and punch, due to the different step sizes and whatnot.. Anyone have any ideas?
Edit: This is my TEST running system. When I figure out a good system, it won't be -verb press- to change running. Just to state.:P
Here's a quick example of someone doing a run button via the HUD
www.byond.com/forum/?post=924097&hl=run#comment2964279
Here's another by using the r key
http://www.byond.com/forum/?post=1122237&hl=run
Here's a good one that show you how to add a fatigue type system
http://www.byond.com/ forum/?post=572925&hl=sprint#comment1654462
This one adds an extra step to the player when they active the command
http://www.byond.com/forum/?post=154880&hl=sprint