Jumping without moving

I was thinking of trying to make some kind of game for the first time in my life.

I’ve been struggling for 9 hours trying to make my character animation with jumping while not moving and facing to the correct direction.

I have an animation “jumpright” where the character jump animation is faced to the right.

I have another animation “jumpleft” where the character jump animation is faced to the left.

So when I run to the left or right and jump at the same time it plays the correct animation.

My problem is, if I stop and press the jump key, there is no animation. I know how to link it with either “jumpright” or “jumpleft” but it depends on which way Im facing when I stopped. So I cant link it only to the other one.

Can you guys help me to get this right?

In the picture I stripped all the commands I tried regarding my problem and returned to the starting point. How should I proceed from here?

Thank you for everyone.

You should make all animations for right side
And nothing for left

And now you only make events for run attack idle and jumping

You are using platformer behavior so you have access to condition which checks horizontal speed of player
So you simply make 2 events

Condition
Player horizontal speed is less than 0
Trigger once

Action
Flip Player horizontally YES

And

Condition
Player horizontal speed is greater than 0
Trigger once

Action
Flip Player horizontally NO

And now you have one animation which mirrors itself depending on which direction you move

Where idle would be just
Player is on floor
Player animation is not equal to attack

Change animation to idle

1 Like

Thank you for your reply!

The flip thing makes absolutely sense! you know Im just a beginner, didn’t realize you can do that obviously :smiley: Thanks!

1 Like