how do I make fall damage?

how do I make fall damage in my game The Neverlands

@“The Kodex”

@glithctyrus I actually saw this and could not answer. I have wondered about this for a while. I suspect now with new k owlage Ray casting but ultimately maybe @“JR 01” Could help you with this.

Sorry for late reply, I have been busy. Thanks for the tag though! When you need help, please do be free too!

I have done a thing like this in my Terraria games. My favorite, balanced way to do this is:
Have an extractor find the X velocity, and, if positive, subtracts something around 10 from the velocity. If that number is larger than 0, it deals that amount of damage.

1 Like

Similar to what Slime said,
You could extract Y Velocity and when the player reaches a fast speed, create fall damage.

Another way to make Fall damage is to use timers (or handmade timer).
If the player is off the ground after a timer, then turn on a switch to allow fall damage.
With a handmade timer (just Always --> +1), you can also take how long the player is off the ground (handmade timers also pause with the game) and slowly increase the damage after several increments of the timer.

1 Like

@“JR 01” and @meburningslime Thanks for figuring this out, but to be honest, it still kinda confuses me. Well, not the timer one, but the extractor one. Okay a little bit the timer one too. It just feels like I know part 3 of what to do, but not part 1 or 2. Maybe an example? Screenshot? Or maybe just a more detailed version with more info of how to get to what you explained.

Either way, thanks for giving me an idea of how to do this!

how can i make it so it only hurts you when you hit the ground though because my collisions block is super inconsistent.

Make sure that the collision is set only to “Bottom” on the player

my example