Why loop 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.

mahdi

Member
Jun 22, 2021
4
0
1
22
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
 
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.
 
Status
Not open for further replies.