P
piksil_demon
Guest
hey guys, so heres my problem. I used this code before and it worked perfectly, but now for some reason my character moves to the right without intervention. What went wrong? How do i fix it?
Code:
up = keyboard_check(ord('W'))
down = keyboard_check(ord('S'))
left = keyboard_check(ord('A'))
right = keyboard_check(ord('D'))
var Hspd= (right - left);
var Vspd= (down - up);
var d = point_direction(0, 0, Hspd, Vspd);
x += lengthdir_x(Spd, d);
y += lengthdir_y(Spd, d);