@iEatRazorz
On Landed is the event that will trigger execution. It’s triggered when is falling is changed to false. This is automated through CMC.
Location and Speed will be used quite often down the line for various other functions. You’ll see this as you continue development. So instead of piping a long line from the events hit result or constantly breaking hit result, we just set them as their own vars. It helps keep things clean. The naming schema OL_variable also helps in this regard.
Blocking hit refers to Collision…stops movement at impact.
Normalize to Range (NtR) will return a value based on a curve from min to max (0.0 to 1.0) without the multiply your max damage from any height would be 1.0
You can think of it as Alpha return from timeline.
e.g. Say our min/max speeds are 0 -> 400. at 100 NtR will return 0.25, at 200|0.5, at 300|0.75 and so forth.
Typically player health is a float and max health is 100.00. Thus multiplying the NtR return by 100 would result in 25.00, 50.00, 75.00 100.00 for the above example.
You can have your player heath be 1.0 and use the direct result of NtR.
This just keeps the numbers clean. For example if your Max NtR is 1200 and your impact speed is 1600, then you’ll have a greater than player max health damage.
e.g. player health max is 100, damage is 137.56
If you allow for negative values, then you have to code for their “potential” existence. This can add bloat where it’s not needed in the first place. There’s no point in ever subtracting a damage value from Player Health that’s greater than the players max health. The result is the same… death.
We clamp Player Health, so that we do not ever get a player health value below 0.00
If your game tracks Hit Points based on damage, then you need another variable to store that.
e.g. Raw damage of 137.56 -> hit points. Raw Damage (clamped) -> player health.