help plz, number of loop-entity

  • 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.

DaviPatrick

Member
Mar 16, 2018
23
0
0
25
code_language.skript:
on damage:
    damage cause is fall
    name of victim's boot is "&4&lStomper"
    cancel event
    wait 2 seconds
    damage victim by 4.2
    loop players in radius 7 around victim:
#        push loop-entity backwards at speed 1
#        push loop-entity backwards at speed 0.8
        delete {kit.%loop-entity%}
        add 1 to {_%loop-entity%} <---
        send "&aYou killed %loop-entity%" to victim
        kill loop-entity

i need the number of all looped entity
 
I belive you only need to change
  1. add 1 to {_%loop-entity%} <---
  2. send "&aYou killed %loop-entity%" to victim
to
  1. add 1 to {_entitycount} <--- #or any other variable name
  2. send "&aYou killed %{_entitycount}%" to victim
I also added a little thing to make sure the player themselves don't get killed
code_language.skript:
on damage:
    damage cause is fall
    name of victim's boot is "&4&lStomper"
    cancel event
    wait 2 seconds
    damage victim by 4.2
    set {_notplayer.%victim%} to true
    loop entities in radius 7 around victim:
        {_notplayer.%loop-entity%} is not set
        push loop-entity backwards at speed 1
        push loop-entity backwards at speed 0.8
        add 1 to {_entitykill}
        kill loop-entity
    send "&aYou killed %{_entitykill}%" to victim
    delete {_notplayer.%victim%}
:emoji_grinning:
 
Last edited:
Status
Not open for further replies.