Detecting when an entity attacks another one

Started by BeicolaDev on Wed, 04/14/2021 - 15:37

Topic category: Help with modding (Java Edition)

Last seen on 20:49, 18. Apr 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Detecting when an entity attacks another one
Wed, 04/14/2021 - 15:37

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.