[FIXED] How to do delay after action like double jump

Started by Knifej on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[FIXED] How to do delay after action like double jump
Sat, 01/21/2023 - 15:50 (edited)

I want to make double jump item. After testing the "code" i realized that you can jump endlessly. Is there anyway for fixing that?

Here is my code.
 

(And sorry for my bad england)

 

Edited by Knifej on Sat, 01/21/2023 - 15:50
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try making a player variable…
Sat, 01/21/2023 - 14:48

Try making a player variable that's 1 by default. 

Make it so the player can't double jump when it's equal to 0.

When player double jumps, set the variable to 0, and when he touches the ground, set it to 1.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It worked. Thanks!
Sat, 01/21/2023 - 15:50

It worked. Thanks!