Boss mechanic bellow 50% health

Started by amdre on Sun, 01/15/2023 - 16:39

Topic category: Help with modding (Java Edition)

Last seen on 10:27, 25. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Boss mechanic bellow 50% health
Sun, 01/15/2023 - 16:39

Trying to make a boss do 1 action when he gets bellow 50%HP. "the trigger is when entity gets hurt in the mob triggers"

Last seen on 01:34, 30. Mar 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
A simple way to do it is to…
Tue, 01/17/2023 - 02:47

A simple way to do it is to add a hidden potion effect on tick update when below 50% hp after like a 2 tick delay when they go below that amount, then check if the entity has that hidden effect or not.

Last seen on 10:27, 25. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ty mate but I actually make…
Tue, 01/17/2023 - 23:13

Ty mate but I actually make it after 2 days of trying, with a global variable, i call for another procedure turn the variable between true and false so when he reach half of health the action only will ocour once. :D

Last seen on 01:34, 30. Mar 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yea that works too, the…
Wed, 01/18/2023 - 11:03

Yea that works too, the potion effect is usually a last resort, well good luck with your mod!