Detecting when an entity attacks another one

Started by BeicolaDev on

Topic category: Help with modding (Java Edition)

Last seen on 23:59, 22. Jun 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Detecting when an entity attacks another one

I need a procedure that detects when an entity attacks another, I've seen people saying that  it is possible by using the "entity attacked" global trigger, and playing the animation on the source entity, I tried that, but the animation does not play.

I know the problem is not with the animation because I tested making a procedure that makes the animation play when the entity is right clicked, and it worked normally. Now iI just need to know how to make it play by detecting an attack.