Please help me. How to make a sword that will cause additional damage to certain mobs.

Started by sekret on

Topic category: Help with modding (Java Edition)

Last seen on 12:50, 11. Jul 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please help me. How to make a sword that will cause additional damage to certain mobs.

Please help me. How to make a sword that will cause additional damage to certain mobs. For example, when a zombie is hit with a sword, it will deal 6 damage and the Summoner 8.

Last seen on 22:18, 7. Feb 2022
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure that…
Mon, 07/20/2020 - 12:59

Make a procedure that activates when a mob is hit that id it is a certain mob it deals however much extra damage

Last seen on 12:50, 11. Jul 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You didn't answer my question
Mon, 07/20/2020 - 14:55

You didn't answer my question

Last seen on 12:50, 11. Jul 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's not what I meant.I…
Tue, 07/21/2020 - 07:43

That's not what I meant.I asked how to do sword damage to different mobs different
 

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that's what they said, make…
Tue, 07/21/2020 - 08:52

that's what they said, make a procedure that activates when a mob is hit and check if it's the specific mob you're looking for and do how much damage you want

Last seen on 12:50, 11. Jul 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you
Tue, 07/21/2020 - 09:27

Thank you

Last seen on 12:50, 11. Jul 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And how to implement it?
Wed, 07/22/2020 - 09:21

And how to implement it?

Last seen on 12:50, 11. Jul 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And how to implement this in…
Wed, 07/22/2020 - 15:58

And how to implement this in the procedure?

 

Last seen on 15:53, 27. Feb 2023
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's very simple. Make a…
Wed, 07/22/2020 - 16:11

It's very simple. Make a global procedure that doesn't need external calling except for when a mob is hit. Just do what everyone else said.

Last seen on 00:50, 23. Jul 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know how, give me a sec...
Sun, 06/06/2021 - 22:32

I know how, give me a sec...

Last seen on 00:50, 23. Jul 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, I now how to do it: …
Sun, 06/06/2021 - 23:05

Okay, I now how to do it:

  1. create your sword
  2. create a potion (turn of bottles and status in inventory and HUD) (don't add any triggers to the potion)
  3. Add a trigger to your sword that is "when in hand tick" and make it give you the potion effect on that trigger
  4. Great a globel trigger that is "entity attacked"
  5. do "if source entity has active potion "your potion you created in step 2" 
  6. And in the "do" section do "if event/target entity is (sub)type of "the mob you want to take more damage"
  7. in the "do" section do "deal "the amount of more damage you want" to event/target entity"

Here's a video: https://drive.google.com/file/d/1BCCL4jkDnn1R3v-Glq6yqCXEhqnpwtEE/view?…

 

I tested this so I know its works.