Event that changes the player sprite tied to a left/right press

Is this possible? Basically I want to set a flag when pressing left, which is unset when pressing right, that changes what sprite the player uses. The idea is I want the player's directions to be diagonal (visually), so walking up after going left makes them up-left, but walking up after walking right will face up-right. Same with walking down. I dug up a project from 2013 that was made in VX Ace and I kinda want to amp up the production value, as at the time I wasn't even smart enough to figure this idea out as a potential solution. But now I have, I just need to know if it's possible in the program as this is a program I haven't used since 2014 at the latest.

Edit: After digging around I found something that gave me an idea. I tried it for this, and it seems to work! I used a common event triggered by parallel process, with a conditional switch that gets activated on game start. Though the initial one I posted is imperfect but at the bottom of the thread is a good solution.

So now this thread can serve as a resource for anyone else looking to do this weirdly specific thing.

Spoiler: image of imperfect setup
1713837724450.png

Spoiler: my ramblings as I made things worse trying to fix a very small issue and then ended up stumped for a while
Edit again: ...OK, not quite. This setup works ALMOST perfectly, but when moving horizontally now there are slight pauses in movement. It's more noticeable when moving faster. It's only like a frame, but I assumed it was the "wait" part that was doing it, but when I removed that it became exponentially worse: the player now could not move but one tile horizontally without needing to release the input and press it again. So I guess I still need help: how do I get rid of the single frame hiccup?

Edit... so I tried using further conditional branches within to set switches and such so that it only performs the task the first time the button is pressed and then never again unless the other direction is pressed. But now I can't even get my player to move at all. I don't get it, why did layering extra conditions which I've been thorough in making sure they shouldn't create any hanging scenarios, hang my scenario anyway?

Spoiler: image of scuffed setup
1713848795223.png

Edit: OK finally I think i figured it out. The culprit was the GameStart flag, the events tied to it were somehow looping in on themselves, when I removed that and just set the "FaceRight" flag to initiate this system, it worked. I also had to remove a common event tied to the GameStart flag that set the player's speed higher and just activate that via a regular in-map event too. Having it as an auto-run common event created a loop in which the player couldn't move. I'm sad to say that removes all uses for my GameStart flag that I intentionally put on the funny number for the meme 🙁

Anyway here are the setups that worked:
1713852508579.png

1713852552351.png

Original thread: https://forums.rpgmakerweb.com/threads/event-that-changes-the-player-sprite-tied-to-a-left-right-press.167982/