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.

chunks at player in radius 10

Discussion in 'Skript' started by FUZIK, Aug 14, 2017.

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

    FUZIK Active Member

    Joined:
    Jan 26, 2017
    Messages:
    115
    Likes Received:
    10
    please help me.

    how to receive all chunks in a radius?

    Code (Skript):
    1. #example
    2. command chunks <location> <integer>:
    3.     trigger:
    4.         loop chunks at arg-1 in radius arg-2:
    5.             broadcast "%loop-chunk%"
    thanks.
     
    #1 FUZIK, Aug 14, 2017
    Last edited: Aug 14, 2017
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    here you go

    Code (Skript):
    1.  
    2. function chunkradius(player: player, radius: int):
    3.     set {_radius} to {_radius} * 16
    4.     set {player::*} to all players in radius {_radius} around {_player}
    5.     return {player::*}
    6.  
    then you just need to call it in your code like

    Code (Skript):
    1. loop chunkradius(arg1, arg2):
    2.      if loop-value = player:
    3.          #do stuff
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    your function return players.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...