ID:2131354
 
(See the best response by Nadrew.)
Code:
#define DEBUG

world
fps = 60
icon_size = 32
name = "DemoInterface"
view = ("31x19")
loop_checks=0


mob
icon='Truck.dmi'
icon_state="truck"
var
angle = 0
acceleration = 1
Login()
loc=locate(1,1,1)
..()
mob
verb
TurnLeft()

angle +=5

var/icon/I = icon('Truck.dmi', "truck")
I.Turn(-angle)
icon = I
TurnRight()
angle += -5
var/icon/I = icon('Truck.dmi', "truck")
I.Turn(-angle)
icon = I
TurnUp()
if(speed < 10)
speed += acceleration
if(speed != 0)
var/dx = round(cos(angle) * speed + 0.5)
var/dy = round(sin(angle) * speed + 0.5)
Step(dx,dy)
TurnDown()
if(speed > acceleration)
speed -= acceleration
else if(speed < -acceleration)
speed += acceleration
else
speed = 0

turf
floor
icon='MapTurfs.dmi'


Problem description:

It`s working fine but the problem is that whenever I use left/right to turn the angle it will stop walking and pause.


Best response
You'll need to write a key handler, BYOND only supports one macro firing at any given time. You'd want to write something that detects when you've pressed a key and released a key, and inside of an action loop you'd determine what keys being down entails.
Oh i see. Thanks for the replay