Topic category: Troubleshooting, bugs, and solutions
i made an NBT tag that decreased by 1 every tick, and i wanted to make a procedure to make it so an entity has an attack delay and cooldown when it attacks another
this is what it looks like https://ibb.co/XRG49k7
its supposed to check if the entity that attacked is the right one, check if its on cooldown or not, and so cancel the original attack and replace it by playing an animation + playing a noise, dealing damage to the entity (both delayed) and adding the cooldown
if the entity attacked but the cooldown isnt over it cancels the attack
the problem is that it just cancels the entity attack without doing any of the things i set in all cases. Someone help please
and changing 'entity attacked' to 'before entity is hurt' doens't work
i saw that if i change the damage type to damage without source entity (which i don't want because it doesn't make it so entities get aggro'd when they are attacked) instead it works pretty well. I need it to work with the source entity tho.. what can i do