How to make top-down animation in four directions only

Well I was making a topdown game like Zelda and I want that my animation are play when the player is moving front it face front while moving front left and front right and player goes left it need to play left walk animation
Now the problem is that I set that I released key it set to ideal animation and it was set to character facing in direction on front,left, right, and back so I pressed key to play animation then the key released while I want to front left to right it plays left ideal animation so I need help for this

Maybe you can do:
If Up key is pressed, change animation to up
If Up key is pressed and Right Key is pressed, change the animation to right

Did you mean, when I release right key, change animation to right_idle and something like that for other direction?

Well I want that character play front walk animation while it’s going little left or right but if I want moving left so it want to play left walk animation
Note that I have only four face walk animation I don’t want make 8 direction animation

I remember making an RPG Game a while ago but I discontinued it because I got bored. I still had the project files so get it here. It might help you.

You mean something like this

Well I was not make rpg but I make hyper light difter like game

Disable Allow diagonals so your playerbox will only move in 4 directions, later in your events just do


Key Left press → Simulate left on Player
Play animation left
Key Right press → Simulate right on Player
Play animation right
and so on for the other moves

The project that you send have missing sprite and to see you extension of topdown movement

Oops, let me upload it again.

Well if I pressed down key and left key it show left walk animation how to fix
Also I still went to go diagonal

Hi. Download this folder and keep it in your E: drive and now run the Project.

Can you make a zip file of it well because I was use phone to export file in pc

You need to restrict this in your event like

If Left mouse pressed
inverted Down mouse pressed : means no down pressed
So this way the left animation only will show when left is pressed but note that your player will not move if the combination pressed is Left+Down

Do some search in the forum I read in some thread that someone solve this.
You need to implement some sort of state machine for the move and separate the animations in other events.

Hi. While downloading folders from GDrive, it starts to get Zipped automatically. But, Okay, I will make a zip
Edit: Here is the zip file

Thank I really need like that
But I also want with front and back basically it’s depend on key which you holding on
And who I can change that to asdw keys

I didn’t understand, could you please tell again.

I made a behavior for my Player’s movement, see this gif to learn where it is
LA254skl9G

Well I want to say that when I pressed key down the down animation was play and I was holding the down key it need to play down animation as I go diagonal left or right if I pressed left key it need to play left walk animation
If you don’t understand try to play hyper light difter like or any 2d Zelda like game

So, you want to change the animation to right while going right diagonally and left when going left diagonally?

If my player is moving down the character animation want to play down animation as it going down if I move diagonally left and right
it need to face the down animation if I’m going left so I need to play the left and walk animation so it’s my character is moving on left side

So, you mean, if you are moving up or down, pressing down button and then you go diagonally, right or left, you want to play Up or Down animation, but if you are moving right or left and you press up or down button then, you want to play the Right or Left Animation. Am I correct?

Yes that’s what I saying