Can i see a code example of this?This is a very basic application of a boolean variable. Set it to (abritrarily) false when the player starts moving and true when the player hits the wall. While it's false, don't process movement keys.
ok i see now but im unable to find how i make a player unable to use keys while the character is moving, is it keyboard_check_pressed?You can find that in the manual:
So do i transfer my code into a boolean variable and then make a if statement?keyboard_check_pressed checks whether a key was just pressed.
The basic idea is to use a boolean variable and an if statement to ensure the code that causes movement won't run while you're supposed to be unable to move.
Sorry im just a bit confused from this and still trying to figure it out. This is what i have for right movementkeyboard_check_pressed checks whether a key was just pressed.
The basic idea is to use a boolean variable and an if statement to ensure the code that causes movement won't run while you're supposed to be unable to move.