how to make a mob aggressive at half health

Started by EJwolfyXD on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a mob aggressive at half health

Hello, I am very new to this forum and VERY new to modding. I am trying to make a mob that only aggro's at half health. I am unsure of how to start making a condition do this :( could anyone help?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi! There is a Entity Health…
Wed, 11/23/2022 - 18:21

Hi!

There is a Entity Health variable and a Entity Max Health variable, i think you can do a condition with : 

return Entity health < (Max Entity Health  /2)