how do you make weapon instatly kill if entity below certain health level

Started by itzmodestep3 on

Topic category: Help with modding (Java Edition)

Last seen on 20:01, 13. Mar 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do you make weapon instatly kill if entity below certain health level

I was wondering how do you make weapon instatly kill if entity below certain health level, cause i need that for one of my items in the mod im making

Last seen on 20:00, 16. Apr 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could probably figure…
Thu, 05/07/2020 - 18:36

You could probably figure something out with procedures ;)

something like on "when entity hit with item/bullet" do something like : if "Target Entity" has health = *amount of health*

Do Kill "Target Entity" with drop

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
supermj767 way may work, if…
Tue, 06/02/2020 - 13:18

supermj767 way may work, if it doesn't let me know and I can help you out with any custom code 🙌🙌

Last seen on 05:52, 18. Oct 2021
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you do if (entity health <…
Mon, 06/08/2020 - 02:30

you do if (entity health < clvl) {

       do clvl damage to entity

}

replace clvl with the maximum health