All you need to do for 2d graphics is make it so the character image can only move in parallel directions such as North and South or East and West, but never North and West or any 90 degree relativity.
Then make all the tileset passabilities match the character directional graphic. So this means if you want your character to only go north and south then make the passability for the tileset north & south.
Second way: Make a common event on autostart, and make a conditional branch where if the left and right button are pressed do nothing or vice-versa depending on which way you want your character to progress.