How do I add a directional jump?

Get help using Construct 2

Post » Mon Jan 16, 2017 6:36 pm

I'm just getting to grips with Construct2 and so far everything is flowing pretty smoothly.

However, my character has an animation for a simple jump straight up, but I'd also like her to perform a different animation if she jumps whilst moving left or right. How best would I achieve this?
B
10
S
3
Posts: 51
Reputation: 804

Post » Mon Jan 16, 2017 9:14 pm

Sure - if the Platform speed is not equal to 0, use a different animation :)
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Mon Jan 16, 2017 9:16 pm

I think this should work:
Player On jump
(Sub-Event)Player platform is moving --> Set animation to "this"
(Sub-Event)Player platform is not moving --> Set animation to "that"

Same for On landed, if you want to have different animations (Idle, Run)
B
36
S
10
G
9
Posts: 212
Reputation: 6,945

Post » Tue Jan 17, 2017 9:04 am

Thank you very much, that's fantastic!

One last question on the same topic - if I wanted to add an animation in for a pre-jump (so the player crouches down and prepares to spring forward) how would I ensure that this plays before the sprite jumps?
B
10
S
3
Posts: 51
Reputation: 804

Post » Tue Jan 17, 2017 10:53 am

On key down "space" --> Set anim to "pre-jump"
On anim "pre-jump" finished --> Similate platform pressing jump

I don't now if this will work, but try it.
B
36
S
10
G
9
Posts: 212
Reputation: 6,945

Post » Tue Jan 17, 2017 11:08 am

Thank you for replying, unfortunately that doesn't work for me :(

It seems like the pre-jump animation isn't playing at all. However, it is definitely there.
B
10
S
3
Posts: 51
Reputation: 804


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 12 guests