Help adding a cooldown to a procedure (solved)

Started by HVDES on

Topic category: Help with modding (Java Edition)

Last seen on 05:05, 7. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help adding a cooldown to a procedure (solved)
Sat, 07/06/2024 - 04:09 (edited)

i made a sword that gives you strength if anyone hits you when your life is below 50%, but if i keep getting damage even when i have the potion effect, it keeps activating, so i want to add a cooldown to that ability 

Edited by HVDES on Sat, 07/06/2024 - 04:09
Last seen on 13:10, 7. Jul 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you dont actually have to…
Fri, 07/05/2024 - 16:30

you dont actually have to add cooldown. just check if player already has potion effect and if not give it to him.https://ibb.co/SRpV05R

 

Last seen on 13:10, 7. Jul 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i forgot to tell you to…
Fri, 07/05/2024 - 16:32

i forgot to tell you to change the part where it checks for the item in main or off hand to your item. as it is now its checking for any sword

Last seen on 05:05, 7. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it really worked brooo,…
Sat, 07/06/2024 - 04:02

it really worked brooo, thank you so much!!!