Make a sword do more damage after killing an entity

Started by dbm1234 on Thu, 06/23/2022 - 22:38

Topic category: Help with modding (Java Edition)

Last seen on 00:37, 29. Jun 2022
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make a sword do more damage after killing an entity
Thu, 06/23/2022 - 22:38

How make a sword do more damage after killing an entity? I intended to make the sword I made increase its damage by 5 when killing a villager with it. Can someone help me?

Last seen on 00:17, 2. Jul 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry but could I ask your…
Fri, 06/24/2022 - 07:31

Sorry but could I ask your some more questions about your question? When you said you want it to increase damage after killing a villager, you want it to increase permanently or just for an amount of time or maybe increase the damage of the next attack?

Last seen on 00:37, 29. Jun 2022
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Permanently
Sat, 06/25/2022 - 02:24

Permanently

Last seen on 00:17, 2. Jul 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry for not finding the…
Mon, 06/27/2022 - 06:14

Sorry for not finding the best solution for your problem, but I think you could try this for the mean time:

First you should create a global variable like this:

https://ibb.co/Wy41rWG

Then create a procedure like this one:

https://ibb.co/PgLf1xP

Anyway, hope this helps.