✔ How could I restrict the Coyote Jump to when the Player falls below the ,,y Pos Before Unfloored"?
I put a Coyote Jump in my Player Script, because it's a very important ,,Invisible Ability" in any good 2D Platformer.
It works as intended, but also has the unwanted side effect of making Double-Jumps possible.
I want to remove this Double-Jump, and I already have the idea of how I would go about it, but not the necessary knowledge for the execution:
I first want to record a snapshot of the Player's Y-Position inside a decimal number variable called ,,yPosBeforeUnfloored" every time the Player leaves the floor (,,floored" turns false).
And then I want to add something along the lines of
yPos == yPosBeforeUnfloored || yPos > yPosBeforeUnfloored to this if-line:
if Input.is_action_just_pressed("jump") && coyoteTimer < 0.2: