How do i detect if a entity is in combat?

Started by Dleemod0106 on

Topic category: Help with MCreator software

Last seen on 10:06, 14. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i detect if a entity is in combat?

I want to make a boss with several attacks, however you need to detect if a entity is in combat to create those attacks,  I have found a Youtube tutorial However, I suspect its outdated as the procedure cant be built anymore, I would appreciate help.

Last seen on 22:49, 29. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not totally sure what…
Sat, 04/13/2024 - 13:47

I'm not totally sure what you're asking, but there is the confusingly named 'Get entity target entity is targeting for an attack' function, which will return the entity the target is agrooed on. You can check if the entity it's targeting is a living entity, and use this to determine whether or not it's currently in attack mode.