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

Started by itzmodestep3 on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 months ago
Joined Apr 2020
Points:
754

User statistics:

  • Modifications: 2
  • Forum topics: 19
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 22
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

Active 3 months ago
Joined Jan 2020
Points:
888

User statistics:

  • Modifications: 3
  • Forum topics: 23
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 208
idk bro
Thu, 05/07/2020 - 18:08

idk bro

Active 4 days ago
Joined Dec 2018
Points:
1353

User statistics:

  • Modifications: 18
  • Forum topics: 17
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 832
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

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
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 🙌🙌

Active 3 years ago
Joined Feb 2018
Points:
826

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 136
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