I wanted to make a simple fall damage check.
But becouse i am learning python i dont fully understand how i can get this done.
what i got so far:
speed = Object.getLinearVelocity() if speed < -5 and speed > -10: //so if speed is between -5 and -10 Object['Health'] -= 5 //subtract health, but this gets kinda repeated a few times while i just want it to subtract it once print (speed)
My question would be, how can i make it so it only subtract once when hit the ground.
i have also added an “and Groundcheck.positive” but then the script wont work at all (yes Groundcheck exists).
all i want is if it hits the ground that it subtract the damage.
it would even be better if the speed could be directly substracted to reduce the script size, but thats not the main thing that i want, i just want it to work
Is there an easy way to fix this?