I'm working on a mechanic where the player character and enemies will take falling damage depending on the height they jump from.
However, there are some issues with my current result.
It only works after the platform falls and triggers the code once. It does not set the speed value to 0 in the beginning, instead it needs to fall once, in order to work as normal.
Secondly, even if it may work some times, it just doesn't at about 10% of the time, in my original project. In this capx, it seems to be more frequent. Not only that, the damage doesn't trigger if the player's is especially moving during the jump/fall, or at least that seems to be the case.
Any ideas as to what the causes may be?
This is what I have so far -