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

Looping regions not working

Discussion in 'Skript' started by x6270, May 9, 2017.

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

    x6270 Member

    Joined:
    May 9, 2017
    Messages:
    1
    Likes Received:
    0
    Hi, i have this script:
    Code (Skript):
    1.  
    2. every 10 seconds:
    3.     broadcast "1"
    4.     loop {zombies::*}:
    5.         broadcast "2"
    6.         loop all blocks in the region {zombies::%loop-value%}:
    7.             broadcast "3"
    8.             spawn zombie at loop-block
    9.             set name of last spawned entity to "Boss"
    10.  
    And I'm trying to spawn a zombie in all the blocks of the looped region of {zombies::*}, but it isn't working, i was trying to use the "broadcast "number"" to see where it fails and every 10 seconds it broadcast "122" and any 3.
    Any ideas?
    Thanks
    PD: Also I tried to define 1 region with just the variable (not the variable list) and it isn't working.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Try that:
    Code (Skript):
    1. every 10 seconds:
    2.     broadcast "1"
    3.     loop {zombies::*}:
    4.         broadcast "2"
    5.         set {_region} to loop-value parsed as text #(or region if don't work)
    6.         loop all blocks in the region {_region}:
    7.             broadcast "3"
    8.             spawn zombie at loop-block
    9.             set name of last spawned entity to "Boss"
    or using this line if don't work:
    Code (Skript):
    1. loop all blocks in the region "%{_region}%":
     
    #2 ShaneBee, May 9, 2017
    Last edited by a moderator: May 9, 2017
Thread Status:
Not open for further replies.
Loading...