why do zombies spawn after exiting/dying in region dungeon1?
this was not supposed to happen
on load:
loop all players:
set {dungeonscore::%loop-player's uuid%} to 0
on death of player:
kill all zombies where [region at victim is "dungeon1"]
on death of zombie:
if victim is in region "dungeon1":
if attacker's gamemode is not creative:
add 1 to {dungeonscore::%attacker's uuid%}
send action bar "&eScore: %{dungeonscore::%attacker's uuid%}%" to attacker
if {dungeonscore::%attacker's uuid%} is 120:
wait 10 ticks
spawn a zombie at location -16, -58, -187:
set displayname of entity to "&7Zombie King"
set max health of entity to 250
set health of entity to 250
set knockback resistance attribute of entity to 1
set helmet of entity to unbreakable golden helmet
set chestplate of entity to unbreakable golden chestplate
set leggings of entity to unbreakable golden leggings
set boots of entity to unbreakable golden boots
set tool of entity to unbreakable golden sword
set offhand tool of entity to unbreakable golden sword
else if {dungeonscore::%attacker's uuid%} is 20:
give chest named "&7Floor I Lootbox" with lore " " and "&fCOMMON" to attacker
teleport attacker to location -34, -60, -190
else:
set {_newHealth} to max health of the victim + 5
wait 25 ticks
spawn a zombie at location of the victim:
set max health of entity to {_newHealth}
set health of entity to {_newHealth}
on enter of region "dungeon1":
wait 15 ticks
spawn 10 zombies at player:
set displayname of entity to "&7Zombie"
set max health of entity to 50
set health of entity to 50
set knockback resistance attribute of entity to 0.05
on exit of region "dungeon1":
kill all zombies where [region at player is "dungeon1"]
set {dungeonscore::%player's uuid%} to 0
this was not supposed to happen
on load:
loop all players:
set {dungeonscore::%loop-player's uuid%} to 0
on death of player:
kill all zombies where [region at victim is "dungeon1"]
on death of zombie:
if victim is in region "dungeon1":
if attacker's gamemode is not creative:
add 1 to {dungeonscore::%attacker's uuid%}
send action bar "&eScore: %{dungeonscore::%attacker's uuid%}%" to attacker
if {dungeonscore::%attacker's uuid%} is 120:
wait 10 ticks
spawn a zombie at location -16, -58, -187:
set displayname of entity to "&7Zombie King"
set max health of entity to 250
set health of entity to 250
set knockback resistance attribute of entity to 1
set helmet of entity to unbreakable golden helmet
set chestplate of entity to unbreakable golden chestplate
set leggings of entity to unbreakable golden leggings
set boots of entity to unbreakable golden boots
set tool of entity to unbreakable golden sword
set offhand tool of entity to unbreakable golden sword
else if {dungeonscore::%attacker's uuid%} is 20:
give chest named "&7Floor I Lootbox" with lore " " and "&fCOMMON" to attacker
teleport attacker to location -34, -60, -190
else:
set {_newHealth} to max health of the victim + 5
wait 25 ticks
spawn a zombie at location of the victim:
set max health of entity to {_newHealth}
set health of entity to {_newHealth}
on enter of region "dungeon1":
wait 15 ticks
spawn 10 zombies at player:
set displayname of entity to "&7Zombie"
set max health of entity to 50
set health of entity to 50
set knockback resistance attribute of entity to 0.05
on exit of region "dungeon1":
kill all zombies where [region at player is "dungeon1"]
set {dungeonscore::%player's uuid%} to 0