How to override/prevent input by other directional keys

I’ve set up a capsule on my character that moves to the direction of where the character is facing, but if i press more than one key at a time, my character flies off the map. i need to set up something that either overrides the current key that is being pressed, or prevents the other key from being activated before the current key is released

Sorry this is the second time i answer you, get some error with the page.

Use a variable, to set the direction in base of the key.
only the key that put for first the direction can undo it, so all the other key will be ignored until direction go back to 0.


I am closing this topic as a duplicate of How do i stop the input of other directional keys? - Blueprint - Unreal Engine Forums
Please refer to that post for any additional information regarding this issue.

Thank you