М
Матвей Чередниченко
Guest
How to make a character move independently (after pressing a button), and I use only buttons to change its horizontal and vertical directions? Help me please
Last edited by a moderator:
if (keyboard_check_pressed(vk_space)) speed = 5;
if (keyboard_check_pressed(vk_up)) direction = 90;
if (keyboard_check_pressed(vk_down)) direction = 270;
if (keyboard_check_pressed(vk_left)) direction = 180;
if (keyboard_check_pressed(vk_right)) direction = 0;
Did you drag the object into the room?didn’t work I don’t know what’s the matter the player doesn’t even move
You don't need to attach an image every time to answer a simple question.Well, yes, I just do not move the ball
In this case, I think it showed us the issue.You don't need to attach an image every time to answer a simple question.
The code works as I just copied it into an object to test it and it moved the instance as expected.press space nothing happens