Use "strike lightning effect at the target" to add variable values when zombies die

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

joo0811

Member
Apr 3, 2023
1
0
1
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
 
Status
Not open for further replies.