Workshop › Mario-style Platformer › Step 18 of 37
jump now asks the counter instead of grounded. Using the jump empties the counter, so there is no second jump in the
air.
```js
if (coyote > 0) {
player.vy = JUMP
coyote = 0
}
```coyote = 0 uses it up: no double jump.In jump, replace player.grounded with coyote > 0 and add coyote = 0 under player.vy = JUMP.
Skills: Keyboard and mouse input, Game states
← A few frames of grace A camera that follows →