how to make it like when mob hits me theres a chance of striking it with lighting? a

Started by vonbanan on Thu, 05/27/2021 - 09:51

Topic category: Help with modding (Java Edition)

Last seen on 09:56, 28. May 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how to make it like when mob hits me theres a chance of striking it with lighting? a
Thu, 05/27/2021 - 09:51

uh so help me to make the thing like when mob hits me theres 20% chance of strike it with lighting(i already made that lighting doesnt dmg me)

Last seen on 06:13, 16. Mar 2023
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yes easy there should be a…
Fri, 06/04/2021 - 04:31

yes easy there should be a trigger in the procedure called when entity gets hit, add a if block to check if the target that got hit is the player, playerMP if its multiplayer mod, them make another if block nested in it, and have a random chance it strike lightning on the source entity.

hope I could help but I don't know if you understand what I am even saying