Cooldowns for spells using variables (SOLVED)

Started by ProGaMEr1105211 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Cooldowns for spells using variables (SOLVED)
Fri, 05/31/2024 - 19:02 (edited)

I'm doing a sword (I'ts uncraftable this mod is for local server play with friends and done for one of them) I'am trying to add several spells that activates on binds like Z or X so the problem is in cooldowns. I tried to use player lifetime persistent and procedure that updates on player tick but nothing works. How can I do cooldowns for them. I'm planning several spells on a single sword.

Edited by ProGaMEr1105211 on Fri, 05/31/2024 - 19:02
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've solved this problem…
Fri, 05/31/2024 - 19:01

I've solved this problem using effects. Just created an effect to every ability and checking it's left time