How can I set the player pawn to run by itself without input?

I need the pawn to run in a straight line the whole time… I had it working however I also need the ability the change direction (the game is a 2d platformer).

But when I changed direction it did not run in that direction, instead it turned back around and ran the same way (left to right).

Any ideas would be great. I know a tick event is possibly the way to go but as I said I need to be able to turn 180 degrees and then run in right to left.

Thanks.

what exactly you want to do?
you want to create a bot that walks? (you can do this with IA you can follow another actor or ask him to go to a specific position)

you want to make the player walk by itself for a moment? (you can still ask him to go to a specific position, try typing walk to… and you should find what you want)

or you’re looking for a “infinite run” game? (i think there’s a tutorial about it in the unreal channel on youtube)

try to be more specific in your question so i can give you a more specific answer

This is a crude way of doing what I think it is you want to do.

Just hook up the movement input to the tick event. Set the direction to the actors forward vector. Then just add input for rotation how you want it, and it will just go in whatever direction you point.