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.

Why loop not working

Discussion in 'Skript' started by mahdi, Jul 17, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. mahdi

    mahdi Member

    Joined:
    Jun 22, 2021
    Messages:
    4
    Likes Received:
    0
    command /joindungeon:
    trigger:
    if {dungeon.begin} is false:
    if {dungeon.%player%.begin} is false:
    set {dungeon.%player%.begin} to true
    add player to {dungeons.players.list::*}
    add 1 to {dungeon.playercount}
    teleport player to {dungeon::wait}
    if {dungeon.playercount} is equal to 2:
    wait 2 second
    set {dungeon.begin} to true
    if {dungeon.begin} is true:
    loop {dungeons.players.list::*}:
    teleport loop-player to {dungeon::spawn}
    send title "&e5" with subtitle "&c" to loop-player for 1 seconds with fadein 1 second and fade out 1 second
    play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at loop-player
    wait 1 seconds
    send title "&a4" with subtitle "&c" to loop-player for 1 seconds with fadein 1 second and fade out 1 second
    play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at loop-player
    wait 1 seconds
    send title "&a3" with subtitle "&c" to loop-player for 1 seconds with fadein 1 second and fade out 1 second
    play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at loop-player
    wait 1 seconds
    send title "&a2" with subtitle "&c" to loop-player for 1 seconds with fadein 1 second and fade out 1 second
    play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at loop-player
    wait 1 seconds
    send title "&a1" with subtitle "&c" to loop-player for 1 seconds with fadein 1 second and fade out 1 second
    play sound "block.anvil.place" with volume 1 and pitch 1 at loop-player
    wait 1 seconds
    send title "&aSTART" with subtitle "&c" to loop-player for 1 seconds with fadein 1 second and fade out 1 second
    spawn 1 zombie at location of {zombie.1}
    set name of last spawned entity to "&aArmoredzombie &e[1]"
    equip last spawned zombie with iron helmet
    equip last spawned zombie with iron chestplate
    equip last spawned zombie with iron leggings
    equip last spawned zombie with iron boots
    equip last spawned zombie with iron sword
    spawn 1 zombie at location of {zombie.2}
    set name of last spawned entity to "&aArmoredzombie &e[2]"
    equip last spawned zombie with iron helmet
    equip last spawned zombie with iron chestplate
    equip last spawned zombie with iron leggings
    equip last spawned zombie with iron boots
    equip last spawned zombie with iron sword
    spawn 1 zombie at location of {zombie.3}
    set name of last spawned entity to "&aArmoredzombie &e[3]"
    equip last spawned zombie with iron helmet
    equip last spawned zombie with iron chestplate
    equip last spawned zombie with iron leggings
    equip last spawned zombie with iron boots
    equip last spawned zombie with iron sword
    spawn 1 zombie at location of {zombie.4}
    set name of last spawned entity to "&aArmoredzombie &e[4]"
    equip last spawned zombie with iron helmet
    equip last spawned zombie with iron chestplate
    equip last spawned zombie with iron leggings
    equip last spawned zombie with iron boots
    equip last spawned zombie with iron sword
    set the last spawned entity's max health to 35
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    1. Please put your code in a code box
    2. I recommend using list variables with the same name
    3. "Why loop not working" isn't very informative, please provide a proper description

    For more information on how to create a better thread, see here.
     
  3. mahdi

    mahdi Member

    Joined:
    Jun 22, 2021
    Messages:
    4
    Likes Received:
    0
Thread Status:
Not open for further replies.

Share This Page

Loading...