Falling animation

What combination of logic bricks would I need to make the character “know” when he’s falling? Sorry for the newb question… :frowning:

I had a basic setup once that triggered a fall animation based on a jump timer. The character had a prop timer called jump.

Collision:Material:Ground------------and---------------Prop:Jump=0
Prop:Jump>2-----------------------------and---------------Play IPO falling

When you jump, the timer goes off. When you land, it gets set back to zero. If you jump off a cliff or something, the timer keeps going. I also had it set so you could only jump if prop:Jump=0, so you couldn’t jump infinitely. The only problem with this setup was that any object you can land on needs to have the same Ground texture, otherwise the fall animation starts. I don’t know if there’s a simple way to make it work with any material you might be standing on.

Use a collision sensor, but don’t set it to anything. That way it will send a pulse when it comes in contact with anything, regardless of prop/material.

I usually write python to make everything “exactly” as a want it, but for a quick and dirty method:

Collision(inversepulse)---->And---->IPO/Action Fall

Sorry for the newb question…
Don’t think thats a noob question :slight_smile:

I’ve been searching the forums for a falltime script, that will make your character lose HP upon impact of a long fall, but couldn’t find it… Does anyone have a link, or the time to tell me how?

If I was using a method with a jump timer, it would be fairly simple

Collision:Material:blank---------->and------------------>prop:hp -10
prop:jumpTimer>5------------------>

or for variable damage:
Collision:Material:blank--------->prop:jumpTimer>2------------------>prop:hp -10
------------------------------------------->prop:jumpTimer>4------------------>prop:hp -10

It mostly depends on what method you use for jumping.

I never got around to it, but I was going to switch to a short ray pointing down that controlled the jump timer, instead of a collision sensor. I had issues with being able to jump when i was touching walls, regardless of whether I was already jumping, because the walls were reseting my jump timer.

Another trick I found was to give a bit of downward force when the timer got to a certain point, which gave me snappier movement. The character was a bit to floaty during jumps, and that fixed it.