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

Started by vonbanan on

Topic category: Help with modding (Java Edition)

Last seen on 19:51, 27. Feb 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make it like when mob hits me theres a chance of striking it with lighting? a

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 00:29, 26. May 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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