The title is self-explanatory. I would like to know how I can achieve this system. Specifically, I want my ‘fall’ damage system to follow this way:
- Player jumps
- Damage the player according to the difference from the max position and the ‘ground’ position
- Slow down the player’s walk speed by
Xamount, depending on how many studs they felt
Example
The player has jumped from the starting position 0, 0, 0. The max position he achieved with the jump was 0, 30, 0 (30 studs upwards). Then, he landed on the ground’s position 0, -10, 0 (10 studs downwards). The minimum height to receive damage is, for instance, 10 studs, and the damage increases linearly from this starting point. We can assume 100 studs equals 100% of the player’s life; therefore, they would take damage of approximately 50% of their max health.
All I want to know is ideas from you all; don’t send the full code, I just want you all to share thoughts on how to do this system. Additionally, it may be more precise to calculate the player’s max velocity, since the player can fall from 100 studs upwards but move at a constant, slow speed. Any help is really appreciated, thanks!