#is there anyway to make a mob not target a player and instead target mobs?

1 messages · Page 1 of 1 (latest)

lament cairn
#

i need this for my skript and i cant figure out a way to do it

#

i also dont really have much all i really tried was on target

#

i need to make it so if the mob has "&9Shadow" in their name to only target other mobs

#

this is what i have so far:

on target:
if name of event-entity contains "Shadow":
if target is a player:
cancel event
set {_nearest} to null
loop all living entities in radius 10 around event-entity:
if loop-entity is not a player:
if loop-entity is not event-entity:
if {_nearest} is not set:
set {_nearest} to loop-entity
else if distance between event-entity and loop-entity < distance between event-entity and {_nearest}:
set {_nearest} to loop-entity
if {_nearest} is set:
set target of event-entity to {_nearest}

#

i cant use the symbols that make it formatted since im on a 60% keyboard

scenic radish
scenic radish
lament cairn
#

no errors

#

just doesnt work

tribal folio
# lament cairn just doesnt work

debug. debugging is the process of using broadcast statements to check:

  1. are your if statements correct
  2. are your variables/expressions correct
lament cairn
#

ive already bebugged it like 7 times

#

everything is correct

#

i just dont know how to fix it

tribal folio
#

well everything can't be correct because that would mean it's working