Armor ability that triggers on keybind press

Started by EpicTheJet on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Armor ability that triggers on keybind press

I've been trying to make a procedure that checks that a full set of armor is being worn, then on key press it applies potion effects for a few seconds then goes into a cooldown period. Ive gotten it to work but once the armor set is taken off and put back on, it never allows the player to trigger the ability again Any ideas on what I'm doing wrong?

Procedure that im using

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok so I tried this out…
Sat, 01/14/2023 - 13:31

Ok so I tried this out myself and at first i got the exact same issue as you. What i think happened was that you took off the armor while it was still on cooldown and so it didnt get the chance to revert the NBT tag back to false. Taking off the armor when it's inactive but not on cooldown and putting it back on again works just fine. Also, if its broken and you switch dimension, it starts working again. However, I currently still don't know what you can do in the procedure to prevent this from happening entirely

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update: ok so i should've…
Sat, 01/14/2023 - 21:58

Update: ok so i should've found a solution! Instead of using the "wait (x) ticks" and NBT logic tags, i used NBT number tags. You will have to define the same nbt tag on the individual armor pieces' tick update procedures. Make it so that if the number is greater than 0, it will subtract one every tick. Then in the key bind procedure, make the if condition check that all their tags are equal to 0, and make it so after you cast the ability, it sets the number tag to the number of ticks you want the cooldown to be. Idk if that makes sense, I added a picture of the procedure you need to add to every armor piece in their trigger section hopefully that will help

 

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It doesn't work for me
Sun, 07/21/2024 - 21:20

It doesn't work for me

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why not use the cooldown…
Sun, 07/21/2024 - 21:21

Why not use the cooldown blocks?

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This procedure was made with…
Mon, 07/22/2024 - 06:10

This procedure was made with an older version of mcreator so maybe it doesn't work anymore. I haven't used mcreator in quite a while so idk if there are new cooldown blocks, but iirc there was only one for items, you know to give them a cooldown like the ender pearl. Im pretty sure it shouldn't work in this case.