How to give procedures cooldowns

Started by Real_bizzy on

Topic category: Help with modding (Java Edition)

Last seen on 06:55, 19. Jul 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to give procedures cooldowns

So I want procedures to have a cooldown, say when someone uses a procedure once, they cant use it for 1200 more ticks

Last seen on 19:03, 13. Jul 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can either create a…
Wed, 06/12/2024 - 20:47

you can either create a effect that lasts 1200 ticks and have it so the procedure won't run if that effect is active for the player.

Or you can have at the end of the procedure, set variable "procedurename" cooldown to 1 then wait 1200 ticks then set it to 0. At the beginning, have it check if the variable is 0 and if it is continue, otherwise text "this is on cooldown" to player. Have the variable a player persistant ot player lifetime as a number variable.

-PixelKid

Last seen on 06:55, 19. Jul 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok thanks!  
Fri, 06/14/2024 - 06:21

ok thanks!