Victim Condition/Variables

  • 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 comminuty!

    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.

mxntie

New Member
Sep 4, 2021
5
0
1
24
Code:
 variables:
    {%player%.kills} = 0

on death:
    if victim is a player:
        add 1 attacker's {%player%.kills}

If I am being honest, I don't have much experience with skript and I am just trying to learn. Anyone know the solution? Do I have to add some new variable like {%attacker%.kills} just specifically for this?? I really have no idea, sorry for seeming stupid.
 
Last edited:
variables:
{%player%.kills} = 0

on death:
if victim is a player:
add 1 attacker's {%player%.kills}

If I am being honest, I don't have much experience with skript and I am just trying to learn. Anyone know the solution? Do I have to add some new variable like {%attacker%.kills} just specifically for this?? I really have no idea, sorry for seeming stupid


Don't worry, a few tips, avoid using {nest.variables}, {list::variables} are much better.
And the
Code:
variables:
    #
section sucks ass, don't use it for anything at all.
 
Code:
 variables:
    {%player%.kills} = 0

on death:
    if victim is a player:
        add 1 attacker's {%player%.kills}

If I am being honest, I don't have much experience with skript and I am just trying to learn. Anyone know the solution? Do I have to add some new variable like {%attacker%.kills} just specifically for this?? I really have no idea, sorry for seeming stupid.
Also you should use "victim" on the variable too instead of "player", I think that this is necessary.
On the death event btw.
Also just want to let you know that if you dont use uuids and do something like {variable::%victim%} there's a problem, when the player changes their name their stats will reset. Just wanna let you know, I'd do {variable::%victim's uuid%}.
 
Status
Not open for further replies.