1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Loop specific amount of entities

Discussion in 'Skript' started by ZhengYueMoon, Jul 7, 2022.

Thread Status:
Not open for further replies.
  1. ZhengYueMoon

    ZhengYueMoon Member

    Joined:
    Mar 9, 2022
    Messages:
    15
    Likes Received:
    0
    So my problem is simple, I want to loop JUST 10 entities in the event, but “loop 10 entities in radius 5 blocks around player” don’t seems to be the way, it always “can’t understand this conditions”, so I am wondering is there any ways to do it?
     
    #1 ZhengYueMoon, Jul 7, 2022
    Last edited: Jul 7, 2022
  2. Best Answer:
    Post #2 by JakeTheChad, Jul 8, 2022
  3. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    98
    Likes Received:
    6
    Code (Text):
    1.     loop all entities in radius 5 of player where [input != player]:
    2.       #your code here
    3.       add 1 to {_n}
    4.       stop if {_n} >= 11
     
    • Agree Agree x 1
  4. ZhengYueMoon

    ZhengYueMoon Member

    Joined:
    Mar 9, 2022
    Messages:
    15
    Likes Received:
    0
    Ooooh this is smart!! Thank you!!
     
  5. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    98
    Likes Received:
    6
    No problem :emoji_grinning:
    also flag my answer as best answer (or what that is called in here) if that was all you needed :emoji_slight_smile:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...