forum_accounts keyboard lib
&
client
key_down()
key_repeat()
New()
..()
spawn()
movement_loop()
proc
movement_loop()
while(1)
sleep(world.tick_lag)
move()
move()
var/d = 0
if(keys["shift"])
mob.running = 1
else mob.running = 0
if(keys["w"]) d |= NORTH
if(keys["s"]) d |= SOUTH
if(keys["d"]) d |= EAST
if(keys["a"]) d |= WEST
if(!mob.running)
mob.icon_state = ""
mob.step_size = 3
else
mob.icon_state = "run"
mob.step_size = mob.movementspeed
if(mob.slowed == 1)
mob.step_size = mob.step_size/2
if(mob.slowed == 2)
return
step(mob, d)
Problem description:
Okay so everything works fine except for when you press 2 opposite directions like if I pressed East & West it'll make me face South and run either east or west, I'd really like it if it didn't face south XD, I'm not all that great of a programmer so I could really use the help fixing this XD
Thank you very much, yeah I agree, it's now that way so it completely stops. :) It's perfect now thanks a lot