How to make a player not take damage from their own lightning sword?

Started by MattiDragon835 on

Topic category: Help with modding (Java Edition)

Last seen on 14:24, 21. Feb 2022
Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a player not take damage from their own lightning sword?

So as the tittle says i am trying to make a lightning sword. Well if you use it in survival it does work but deals damage to the player. Making the player immune to damage before the lightning doesn't work because the provided entity is the enemy. I also tried to run it from a attack global trigger but i couldn't get it to work. I would appreciate if you could help me.

Last seen on 23:08, 17. Mar 2024
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the player always will get…
Sun, 04/26/2020 - 09:14

the player always will get damage when you use a sword with lightning bolt.There is no way to avoid it.

Last seen on 09:48, 26. Sep 2022
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Like, ask for a procedure to…
Sun, 04/26/2020 - 09:35

Like, ask for a procedure to make player immune to lightning, explosion, poison, wither, .....

Last seen on 14:24, 21. Feb 2022
Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks for the response.
Sat, 05/16/2020 - 11:11

thanks for the response.

Last seen on 17:51, 22. Mar 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe try making the…
Fri, 10/07/2022 - 14:43

Maybe try making the lightning cordinants X: 1, Y: Y, Z: Z.