Custom Armor Ability with timer

Started by WitPantix on

Topic category: Help with modding (Java Edition)

Last seen on 14:09, 13. Sep 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Armor Ability with timer

How can I do this skill: "Every 120 seconds the player can receive a damage and speed increase but removes half health" Having the armor on (If possible send the image of the procedure)

Last seen on 16:04, 16. Sep 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do a tick event for the…
Mon, 09/09/2024 - 23:42

Do a tick event for the armour, i assume all 4 pieces need to be on, check if all 4 pieces are on the player, if not then do nothing. If the skill is on a keybind then use that to start the skill procedure only when all 4 armour pieces, or the correct ones are worn. On skill used procedure. Create cooldown variable, on tick check if cooldown = 0, if not then do cooldown -1, and send message etc that skill is on cooldown. If cooldown = 0, then use effects to buff speed and strength as well as remove 50% of player max health, could also check if player has more than 50% max health to be able to use the skill. Then set the cooldown variable to 2400 ticks (120 seconds), the event will then tick and the cooldown will count down.

Last seen on 14:09, 13. Sep 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the reply!
Fri, 09/13/2024 - 14:10
Thanks for the reply!