GML Visual Movement Issues

SuchGamer

Member
I'm having trouble adding some sort of way that when the player is moving to not allow the player to click another key to change directions until the player hits the wall.
 

Nidoking

Member
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.
 

TsukaYuriko

☄️
Forum Staff
Moderator
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.
 

SuchGamer

Member
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.
So do i transfer my code into a boolean variable and then make a if statement?
 
Last edited:
Top