Aaron Craig
Member
Greetings.
I believe there's a small bug when checking the arrow keys and the spacebar (spacebar appears to be the worst culprit, though I've tried other keys and they have problems, too). I've got this code inside of an object:
if(keyboard_check(vk_right))
x += 15;
if(keyboard_check(vk_left))
x -= 15;
if(keyboard_check(vk_up))
y -= 15;
if(keyboard_check(vk_down))
y += 15;
if(keyboard_check(vk_space))
show_message("fire");
And when I hold any combination except up and right, spacebar doesn't trigger. I've tried it in separate events for each key, I've tried beginning and end steps, I've tried different projects, different logins, but it always doesn't work.
If I switch it to WASD movement, then it does. This makes me think it's something specific with the arrow keys and the way gamemaker handles them being pushed down.
I have even set the movement to WASD, gotten spacebar to work properly, then mapped the arrow keys to WASD and tried it, and it doesn't work. It's something specific about the arrow keys being pushed down.
I don't think I'm overlooking anything obvious, but if I am please point it out.
I believe there's a small bug when checking the arrow keys and the spacebar (spacebar appears to be the worst culprit, though I've tried other keys and they have problems, too). I've got this code inside of an object:
if(keyboard_check(vk_right))
x += 15;
if(keyboard_check(vk_left))
x -= 15;
if(keyboard_check(vk_up))
y -= 15;
if(keyboard_check(vk_down))
y += 15;
if(keyboard_check(vk_space))
show_message("fire");
And when I hold any combination except up and right, spacebar doesn't trigger. I've tried it in separate events for each key, I've tried beginning and end steps, I've tried different projects, different logins, but it always doesn't work.
If I switch it to WASD movement, then it does. This makes me think it's something specific with the arrow keys and the way gamemaker handles them being pushed down.
I have even set the movement to WASD, gotten spacebar to work properly, then mapped the arrow keys to WASD and tried it, and it doesn't work. It's something specific about the arrow keys being pushed down.
I don't think I'm overlooking anything obvious, but if I am please point it out.