#Top Damage List

1 messages · Page 1 of 1 (latest)

dark sundial
#

you should be using global variables for this

#

and instead of setting the var to 0 when youre done with it, you can just delete it

torpid magnet
#

so I should switch every variable to global?

dark sundial
#

oh hang on i missread the code

#

i dont hink you need the loop, just set {_sorted::*} to sorted indices of {damage::*} in descending order

#

and its only showing one player because you use attacker in the loop instead of loop-player

torpid magnet
#
on death:
    if victim is {zombie}:
        wait 1 tick   
        set {_sorted::*} to sorted indices of {_damage::*} in descending order
        send "&b&lBOSS DAMAGE" to attacker
        loop first 3 elements of {_sorted::*}:
            send "%loop-iteration%. %loop-player% %{_damage::%loop-value%::*}%" to attacker
        wait 1 tick
        set {damage::%attacker's uuid%} to 0```
#

?

dark sundial
#

The damage list should be the global one

torpid magnet
#

But it changes every boss kill

#

It’s not permanent