I'm making a script that increases damage by adding values to variables when I kill monsters. My script is to right-click, summon lightning and kill damage
The phrase is
strike lightning effect at the target block
@loop all living entities in radius 5 around target block:
@@damage loop-entity by {lighting.%player%} + 1
However, if you use this phrase, the attacker will not become a player and no variables will be added The syntax for adding variables is
on death of zombie:
@if nbt of attacker's held item contains "CustomModelData":
@@if nbt of attacker's held item contains "Unbreakable":
@@@add 1 to {lighting.%attacker%}
How can I make that lightning into the player's and add variables? Please tell me any way
Let me know if you need anything else
The phrase is
strike lightning effect at the target block
@loop all living entities in radius 5 around target block:
@@damage loop-entity by {lighting.%player%} + 1
However, if you use this phrase, the attacker will not become a player and no variables will be added The syntax for adding variables is
on death of zombie:
@if nbt of attacker's held item contains "CustomModelData":
@@if nbt of attacker's held item contains "Unbreakable":
@@@add 1 to {lighting.%attacker%}
How can I make that lightning into the player's and add variables? Please tell me any way
Let me know if you need anything else