Looping regions not working

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

x6270

Member
May 9, 2017
1
0
0
21
Hi, i have this script:
code_language.skript:
every 10 seconds:
    broadcast "1"
    loop {zombies::*}:
        broadcast "2"
        loop all blocks in the region {zombies::%loop-value%}:
            broadcast "3"
            spawn zombie at loop-block
            set name of last spawned entity to "Boss"
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.
 
Try that:
code_language.skript:
every 10 seconds:
    broadcast "1"
    loop {zombies::*}:
        broadcast "2"
        set {_region} to loop-value parsed as text #(or region if don't work)
        loop all blocks in the region {_region}:
            broadcast "3"
            spawn zombie at loop-block
            set name of last spawned entity to "Boss"
or using this line if don't work:
code_language.skript:
loop all blocks in the region "%{_region}%":
 
Last edited by a moderator:
Status
Not open for further replies.