problems with my jump animation

Get help using Construct 2

Post » Fri Sep 20, 2013 11:48 pm

Hello C2 community! Back with another one... I'm running into an issue with my platform game. When the "jump" key is pressed and held too long, my sprite will stay in the "jump" animation frame even when I'm back on a solid object... Is there a condition I can use to retain my still/walking animation even with the "jump" key still held down?
Image
B
35
S
17
G
9
Posts: 103
Reputation: 8,131

Post » Sat Sep 21, 2013 12:17 am

If player is not jumping
AND jump key is down > Play Idle animation

Although it's not really clear why you want the player to move left/right etc when they are pressing the jump key.

If you have it set up as:
On jump key PRESSED > Jump

then holding down the jump key after you have finished the jump shouldn't do anything either.plinkie2013-09-21 00:19:27
B
46
S
16
G
74
Posts: 2,088
Reputation: 44,185

Post » Sat Sep 21, 2013 2:41 pm

I don't think I'm explaining this right... Normally, when I play a retro side scrolling platform and hit the jump key, the sprite will jump... Now if I press and hold the jump key down (And the jump animation has already concluded) once the player sprite has fell back down onto a solid object, they do not stay in a jump animation... rather the player sprite reverts back to the walking or still animation (idle)... A good example of a retro game with this mechanic is Mega Man... I hope I'm explaining this right (though I haven't had the best luck getting answers from this forum... Not a knock on you guys, It's my explanations I'm sure)... Basically my player sprite stays in the jump animation(with the jump key held down) even when it reaches back down onto the solid platform object... I need my sprite to revert back to the walking animation (idle) even though I still have the jump key held...
Image
B
35
S
17
G
9
Posts: 103
Reputation: 8,131

Post » Sat Sep 21, 2013 4:17 pm

Use correctly the On Landed, is moving condition.

an exemple :



I use the PlatFormPlus plugin, but it is the same with the official PlatForm plugin.anata2013-09-21 16:18:03
B
38
S
13
G
4
Posts: 152
Reputation: 5,147

Post » Sat Sep 21, 2013 5:44 pm

Thank you @anata! This is very helpful... It may help solve my issue.
Image
B
35
S
17
G
9
Posts: 103
Reputation: 8,131

Post » Sat Sep 21, 2013 11:06 pm

UPDATE:

I want to share this with everyone since lately people have been trying to help me when I do post a question... I'm excited because I've been on the site all day (Mostly reading Ashley's tutorials) and finally had that "light bulb" brainstorm moment. :) As to my dilemma, What I did wrong was this: keyboard(key) is down = sprite = set animation to "jumping" when in fact is should be; keyboard(key) is pressed = sprite = set animation to "jumping"... RELIEF!!! Also FYI: I figured out a problem that was puzzling me for a while... My sprite overlapping(or under-lapping)the solid platform object... I understand this problem can be fixed with events, but I figured out a crude, but effective way to speed this up: Invisible walls... So far it's working out fine... Now when I decide to create bigger maps with more assets on them, I'm hoping I don't run into lag issues... :/
Image
B
35
S
17
G
9
Posts: 103
Reputation: 8,131


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests