Each time the entity attack, a cooldown start so it cant attack

Started by Spayzers on

Topic category: Help with MCreator software

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Each time the entity attack, a cooldown start so it cant attack

Im making a custom boss, that uses geckolib animations, i succeed with the damage procedure, but now i have a problem : whenever the boss get close to me, instead of attack once, then start the other attack, it just spams all the existing attacks as soon as he makes contact with the target.

 

What i want to make is, for every attack, a cooldown starts so the boss cant start any other attack untill the cooldown ends.

 

If you have any answers, please share with screenshots for easier understanding.

 

Thanks in advance.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make an NBT tag that…
Thu, 07/25/2024 - 17:33

Make an NBT tag that increases by One every tick,then make It  so the boss can only Attack when the NBT tag Is like 100 and After the boss attacks It resets to 0

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if i make a procedure with…
Sun, 07/13/2025 - 22:09

if i make a procedure with global trigger 'when entity attacked' and make it so the entity resets the NBT tag number and stuff it says 'statement do does not support local variables' and if i make a global variable it doesnt show up in custom variables. Could you show me how you would do this? (i don't know how to make replies, this goes to bo_bo)

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
actually the NBT tag work…
Sun, 07/13/2025 - 23:37

actually the NBT tag work but i got another problem, i made this procedure which is supposed to make it so when my entity attacks it checks if it is the right entity and its not on cooldown, if yes it cancels the attack, adds cooldown, plays animation, deal damage to the attacked entity and plays a noise. But if its on cooldown it will simply cancels the attack. This is what it looks like https://ibb.co/XRG49k7

(changing to before entity is hurt doesnt work, and i have the procedure so the NBT tag decreased every tick)