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

Started by Knifej on

Topic category: Help with modding (Java Edition)

Last seen on 11:27, 23. Jan 2023
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
Last seen on 11:27, 23. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I realized that this image…
Sat, 01/21/2023 - 14:39

I realized that this image doesnt show up so here is link. https://imgur.com/a/nI7fBgE

Last seen on 17:20, 17. Mar 2024
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.

Last seen on 11:27, 23. Jan 2023
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!