I want to make it so when the player presses the Space key, their object (not a character) goes up into the air as dictated by a count property. Should the player delay the jump by a few nanoseconds or reach the top of the second jump or fall too fast, it counts as a completed second jump, and the player can jump no higher. I have accomplished most of this, but the object will jump continuously higher each time the spacebar is pressed past the second jump mark. The player should only be allowed to jump twice normally off the ground, and only once in water.
How to accomplish this? I’ve accomplished like 85% of this so far, but the jump cap part for the dynamic non-character object does not work, and I want to make it so when either a “grounded” or “swimming” property is 1, the properties that enable jumping and counting the jumps are reset.
I prefer dynamic objects over characters as you can get linearVelocity and angularVelocity.
I am trying to do this all in Python.