You can have a look at this approach:
- in a Pawn
- step size, direction and player input:
- script to copy:
- project to download:
- the result moves the pawn in a direction, in steps for as long as the corresponding key is held:
Kinks: key release interruption needs to be handled better. Remove the redundant step.
edit:
Remove the redundant step.
This bit should be like this instead, because counting is hard
key release interruption needs to be handled better.
For this it might be enough to store the last pressed key to make it work better - kind of depends on how you want the movement direction transition to work. Never played the games mentioned above so not sure about the details but the methods seems solid enough to take it for a spin.
Perhaps it will inspire you.
Good luck!