#All of the sudden my zombies are killing their team mates
1 messages · Page 1 of 1 (latest)
it was supposed to be this i guess writing code at 3am isnt good for me
while {_zombie} is alive:
wait 1 tick
if path target of {_zombie} is not set:
loop all entities in radius 45 of {_zombie}:
if all:
loop-entity is not a player
metadata "%player%" of loop-entity is not true
then:
set {_enemy} to loop-entity
set path target with speed 1 of {_zombie} to {_enemy}
while {_enemy} is alive:
if {_enemy} is alive:
wait 1 tick
if distance between {_zombie} and {_enemy} is less than or equal to 1:
damage {_enemy} by 1 heart
push {_enemy} backwards with force 0.1
else:
set path target with speed 1 of {_zombie} to {_enemy}
if distance between {_zombie} and {_enemy} is less than or equal to 1:
damage {_enemy} by 1 heart
push {_enemy} backwards with force 0.1
same topic: this doesnt work they dont patfhind