Sliding after landing

Get help using Construct 2

Post » Sat Jul 21, 2012 10:55 pm

I used search function and didn't find the answer, though it's a very simple question: I'm using the platform behaviour, and after landing, my character is sliding if I keep pressing the left or right arrow.

I have an animation for standing and one for running.

I tried to add:
Platform on landed - set animation "standing"

But he still sliding.

Then I'm adding another condition to this:
"Keyboard - Left arrow is down - Invert" - set animation "running"
Same with right.

Now the character is running on landing...

Help :)

Also, I'd like to know to add a "crouch" behaviour.

Thx!



EDIT: Fixed this by replacing "onlanded" animation by "running". I noticed that the problem appears when I stop pressing any key when the character is jumping.

If I do that, he will keep running after landing, any idea how to fix that?
Stampedo2012-07-21 23:08:43
B
6
Posts: 34
Reputation: 643

Post » Sat Jul 21, 2012 11:31 pm

Instead of using "On landed" for standing animations, you should use "Is (not) jumping" and "Is (not) moving". (not meaning inverted events)

Those two conditions should be all you need for standing, walking and jumping animations.Nimtrix2012-07-21 23:31:41
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Jul 21, 2012 11:56 pm

Thanks for your answer.

- "Is (not) jumping" and "Is (not) moving". (not meaning inverted events)
What do you mean by "not inverted events"?

My problem occurs when I stop pressing a key while jumping, the animation will loop even after landing.
What I would like is when I don't press any key while jumping, the "standing" animation" will play on landing (and not cycling the running animation)
B
6
Posts: 34
Reputation: 643

Post » Sun Jul 22, 2012 12:23 am

Where I write (not), I mean an inverted event. I didn't say "not inverted events", but I see how easy it is to misunderstand that, sorry for the confusion.

I meant to say:
"(not)" meaning inverted events.Nimtrix2012-07-22 00:26:12
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 12:32 am

Ok thx.

When I'm using "is not jumping", it overrides the running animation.
Same for "not moving".

I'm forced to use "on landed", and it makes sense to me.
But I can't find a way to fix my problem (animation looping forever)
B
6
Posts: 34
Reputation: 643

Post » Sun Jul 22, 2012 12:36 am

Use both conditons in the same event.

[code]+Is not moving
+Is not jumping
-> Standing animation

+Is moving
+Is not jumping (might not need this)
-> Running animation

+Is jumping
-> Jumping animation[/code]

If you're still having troubles, could you upload a .capx to a filehost like dropbox so I could have a look?

Edit: By the way, after the platform object reaches the top of it's jump, it's no longer jumping, but falling.Nimtrix2012-07-22 00:44:49
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 1:02 am

I'm bored, so I made a .capx for you

BasicPlatformAnim.capx (r99)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 1:07 am

Thanks a lot Nimtrix, it worked!

I'm still wondering how to create this crouch behaviour.

EDIT: Havent checked your capx, I'm using r95Stampedo2012-07-22 01:08:41
B
6
Posts: 34
Reputation: 643

Post » Sun Jul 22, 2012 1:13 am

I did crouching as well. Updated file in previous post to work with r95. (might crash, just let me know)Nimtrix2012-07-22 01:14:19
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 1:34 am

Thanks a lot again, it helped a lot! You rule ;)

Btw how do you write titles in the event sheet?
=Stampedo2012-07-22 01:37:55
B
6
Posts: 34
Reputation: 643

Next

Return to How do I....?

Who is online

Users browsing this forum: Braus and 11 guests